mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 01:43:37 +00:00
Add Zooqle icon.
Change get url to also handle absolute redirects.
This commit is contained in:
parent
013c79d16a
commit
cb25fc2e03
2 changed files with 4 additions and 2 deletions
BIN
gui/slick/images/providers/zooqle.png
Normal file
BIN
gui/slick/images/providers/zooqle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 172 B |
|
@ -1174,8 +1174,10 @@ def getURL(url, post_data=None, params=None, headers=None, timeout=30, session=N
|
|||
else:
|
||||
resp = session.get(url, timeout=timeout, **kwargs)
|
||||
if resp.ok and not resp.content and 'url=' in resp.headers.get('Refresh', '').lower():
|
||||
parsed[2] = '/%s' % resp.headers.get('Refresh').lower().split('url=')[1].strip('/')
|
||||
url = urlparse.urlunparse(parsed)
|
||||
url = resp.headers.get('Refresh').lower().split('url=')[1].strip('/')
|
||||
if not url.startswith('http'):
|
||||
parsed[2] = '/%s' % url
|
||||
url = urlparse.urlunparse(parsed)
|
||||
resp = session.get(url, timeout=timeout, **kwargs)
|
||||
|
||||
if not resp.ok:
|
||||
|
|
Loading…
Reference in a new issue