parent
086f3361ff
commit
3107f216ec
2 changed files with 13 additions and 1 deletions
@ -0,0 +1,12 @@ |
|||||||
|
import requests |
||||||
|
|
||||||
|
url = "https://www.bea.gov/news/2024/personal-income-and-outlays-february-2024" # 請將這裡替換為你的網址 |
||||||
|
|
||||||
|
response = requests.get(url) |
||||||
|
|
||||||
|
if response.status_code == 200: |
||||||
|
print("Successfully accessed the website.") |
||||||
|
elif response.status_code == 403: |
||||||
|
print("Your IP is forbidden to access this website.") |
||||||
|
else: |
||||||
|
print(f"Received status code {response.status_code}.") |
Loading…
Reference in new issue