mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-08 20:59:25 +01:00
Remove requests iter_content
- inter_content might have been the reason for repeated encoding issues - let's try with good old r.text
This commit is contained in:
@@ -89,9 +89,10 @@ def addTorrent(link, data=None):
|
||||
r = requests.get(link, headers=headers)
|
||||
if r.status_code == 200:
|
||||
logger.debug('Deluge: 200 OK')
|
||||
for chunk in r.iter_content(chunk_size=1024):
|
||||
if chunk: # filter out keep-alive new chunks
|
||||
torrentfile = torrentfile + chunk
|
||||
torrentfile = r.text
|
||||
#for chunk in r.iter_content(chunk_size=1024):
|
||||
# if chunk: # filter out keep-alive new chunks
|
||||
# torrentfile = torrentfile + chunk
|
||||
else:
|
||||
logger.debug('Deluge: Trying to GET %s returned status %d' % (link, r.status_code))
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user