mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-16 00:25:31 +01:00
Merge remote-tracking branch 'evanjd/master' into develop
This commit is contained in:
@@ -1553,6 +1553,9 @@ def preprocesstorrent(resultlist, pre_sorted_list=False):
|
||||
if result[3] == 'Kick Ass Torrent':
|
||||
request.add_header('Referer', 'http://kat.ph/')
|
||||
|
||||
if result[3] == 'What.cd':
|
||||
request.add_header('User-Agent', 'Headphones')
|
||||
|
||||
response = urllib2.urlopen(request)
|
||||
if response.info().get('Content-Encoding') == 'gzip':
|
||||
buf = StringIO(response.read())
|
||||
|
||||
@@ -98,7 +98,7 @@ class GazelleAPI(object):
|
||||
loginpage = 'https://what.cd/login.php'
|
||||
data = {'username': self.username,
|
||||
'password': self.password}
|
||||
r = self.session.post(loginpage, data=data, timeout=self.default_timeout)
|
||||
r = self.session.post(loginpage, data=data, timeout=self.default_timeout, headers=self.default_headers)
|
||||
self.past_request_timestamps.append(time.time())
|
||||
if r.status_code != 200:
|
||||
raise LoginException("Login returned status code %s" % r.status_code)
|
||||
|
||||
Reference in New Issue
Block a user