I get the following error when trying to run this script python scraping from the CMD:
Microsoft Windows [Version 10]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Far\Desktop\Coding>python scraping_imdb_episodes.py
Traceback (most recent call last):
File "C:\Users\Far\Desktop\Coding\scraping_imdb_episodes.py", line 7, in <module>
response = get('https://www.imdb.com/title/tt1439629/episodes?season=' + str(sn))
NameError: name 'get' is not defined
I searched for the solution here and here but don’t grasp what’s going wrong.
>Solution :
"get" is a method from requests library. Make sure that you have imported get from requests or else use
response = requests.get('https://www.imdb.com/title/tt1439629/episodes?season=' + str(sn))