You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
401 B
12 lines
401 B
12 months ago
|
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}.")
|