sigma_coding_youtube
sigma_coding_youtube copied to clipboard
403 Forbidden
Describe the bug
Need user agent as explained in https://github.com/jadchaar/sec-edgar-downloader/issues/77.
headers = {"User-Agent": "Company Name [email protected]"}
response = requests.get(TEXT_URL, headers=headers)
if response.status_code == 200:
content_html = response.content.decode("utf-8")
else:
print(f"HTML from {TEXT_URL} failed with status {response.status_code}")
soup = BeautifulSoup(response.content, 'lxml')