mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33: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,7 +1174,9 @@ def getURL(url, post_data=None, params=None, headers=None, timeout=30, session=N
|
||||||
else:
|
else:
|
||||||
resp = session.get(url, timeout=timeout, **kwargs)
|
resp = session.get(url, timeout=timeout, **kwargs)
|
||||||
if resp.ok and not resp.content and 'url=' in resp.headers.get('Refresh', '').lower():
|
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 = resp.headers.get('Refresh').lower().split('url=')[1].strip('/')
|
||||||
|
if not url.startswith('http'):
|
||||||
|
parsed[2] = '/%s' % url
|
||||||
url = urlparse.urlunparse(parsed)
|
url = urlparse.urlunparse(parsed)
|
||||||
resp = session.get(url, timeout=timeout, **kwargs)
|
resp = session.get(url, timeout=timeout, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue