From 1dca11c0be695ac5adc4249f0a103dbde3f134a0 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 2 Sep 2019 01:17:52 +0200 Subject: [PATCH] HTTP headers should always be an argument of the Request object --- platypush/plugins/torrent.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platypush/plugins/torrent.py b/platypush/plugins/torrent.py index 997d9000..2ab1fd92 100644 --- a/platypush/plugins/torrent.py +++ b/platypush/plugins/torrent.py @@ -160,8 +160,8 @@ class TorrentPlugin(Plugin): for show in shows: request = urllib.request.urlopen(urllib.request.Request( - 'https://tv-v2.api-fetch.website/show/' + show.get('_id')), - headers=self.headers) + 'https://tv-v2.api-fetch.website/show/' + show.get('_id'), + headers=self.headers)) show = json.loads(request.read().decode('utf-8')) @@ -209,8 +209,8 @@ class TorrentPlugin(Plugin): for show in shows: request = urllib.request.urlopen(urllib.request.Request( - 'https://anime.api-fetch.website/anime/' + show.get('_id')), - headers=self.headers) + 'https://anime.api-fetch.website/anime/' + show.get('_id'), + headers=self.headers)) show = json.loads(request.read().decode('utf-8'))