Python for Everybody - ERROR: Page Spider Exercise

Hi everyone,

I’m trying to complete the Page Spider Exercise linked in the last lesson of the Python for Everybody course, so I can better understand the learnings.

However, when I try to run the program (spider.py) it comes up with an error, like this:

users-MacBook-Air:webspider abigailnottingham$ python3 spider.py
Enter web url or enter:
[‘http://www.dr-chuck.com’]
How many pages:5
1 h…dr-chuck.com Unable to retrieve or parse page
No unretrieved HTML pages found

I’ve watched the exercise video and Dr Chuck says that if this error comes up it’s likely an issue with BeautifulSoup or something, but I have version 4 installed which is the latest version.

Does anyone have any ideas why this won’t run for me?

The file I’m using is spider.py located on the PY4E website:
PY4E

Thanks!
Abi