sigma_coding_youtube icon indicating copy to clipboard operation
sigma_coding_youtube copied to clipboard

403 Forbidden

Open oonisim opened this issue 2 years ago • 0 comments

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')

oonisim avatar Oct 29 '21 20:10 oonisim