Skip to content

Updated spider.py: moved BeautifulSoup html.parser to fix "cannot retrieve or parse page" error #456

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Amanda-P-bus
Copy link

Moved
' soup = BeautifulSoup(html, "html.parser") '
from line 92 to line 80.

I was getting parsing errors every time I attempted to run it. Moving it above the if statements in the try finally got it running smoothly. I saw many people online with the same issues/error attempting to run this code so they could follow along with the Page Rank worked example.

Hope this isn't too wordy, it's my very first pull request.

Moved 
' soup = BeautifulSoup(html, "html.parser") '
from line 92 to line 80. 

I was getting parsing errors every time I attempted to run it. Moving it above the if statements in the try finally got it running smoothly.  I saw many people online with the same issues/error attempting to run this code so they could follow along with the Page Rank worked example.

Hope this isn't too wordy, it's my very first pull request.
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

Successfully merging this pull request may close these issues.

1 participant