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

urllib fails without headers #11

Open
Olamyy opened this issue Sep 16, 2019 · 0 comments
Open

urllib fails without headers #11

Olamyy opened this issue Sep 16, 2019 · 0 comments

Comments

@Olamyy
Copy link

Olamyy commented Sep 16, 2019

Hi,
Thanks for this great tool.

I noticed urllib fails with a Forbidden Request error when I call download_page on some links. You can reproduce the error by trying the code below:

import lazynlp
link = "https://punchng.com/"
page = lazynlp.download_page(link, context=None, timeout=None)

This raises a 403 as shown below.
Screen Shot 2019-09-16 at 2 09 51 PM

I've attempted to create a PR that adds headers to the request by default.

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