From 785a1375478efd0cdf6e846200b2cbddc05661bb Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Sat, 6 Apr 2019 22:32:20 +0200 Subject: [PATCH] Trying to make the code clearer --- sources/marvel/marvel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/marvel/marvel.py b/sources/marvel/marvel.py index 0ceb40e..5fe1f67 100644 --- a/sources/marvel/marvel.py +++ b/sources/marvel/marvel.py @@ -42,9 +42,8 @@ class Client: def make_request(self, query): params = self.auth.generate_params() params.update(query.params()) - url = Client.base_url + query.path() - url_query = urllib.parse.urlencode(params) - full_url = url + "?" + url_query + query_string = urllib.parse.urlencode(params) + full_url = Client.base_url + query.path() + "?" + query_string with urllib.request.urlopen(full_url) as response: status_code = response.getcode() if status_code != 200: