forked from platypush/platypush
HTTP headers should always be an argument of the Request object
This commit is contained in:
parent
e673b3e0c7
commit
1dca11c0be
1 changed files with 4 additions and 4 deletions
|
@ -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'))
|
||||
|
||||
|
|
Loading…
Reference in a new issue