Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

403 Forbidden #16

Open
oonisim opened this issue Oct 29, 2021 · 0 comments
Open

403 Forbidden #16

oonisim opened this issue Oct 29, 2021 · 0 comments

Comments

@oonisim
Copy link

oonisim commented Oct 29, 2021

Describe the bug

Need user agent as explained in jadchaar/sec-edgar-downloader#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')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant