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}.")