This is my third python project, and I\'ve received an error message: \'module object\' is not callable.
I know that this means I\'m referencing a varia
urllib.request is a module. urllib.request.Request is a class. Calling a module like you're currently doing raises an error. You probably want to call the class, like this:
request = urllib.request.Request(url, headers=req_headers) # create a request object for the URL
You'll also probably want to use build_opener of urllib.request rather than just urllib:
opener = urllib.request.build_opener() # create an opener object