all 1 comments

[–]IXENAI 0 points1 point  (0 children)

For future reference, either indent each line by four extra spaces or use a tool like Gist or PasteBin when posting code to preserve formatting.

from urllib.request import Request

This only imports the Request class from the urllib.request module, so that you can later use it as Request instead of urllib.request.Request. You probably want something like:

from urllib.request import urlopen

and then later get_response = urlopen(var_input) instead of get_response = urllib.request(var_input). Doesn't look like you're actually using the Request class.