fix cinemalibero

This commit is contained in:
mac12m99
2020-01-24 20:52:08 +01:00
committed by marco
parent 3313e0f7cf
commit 0256004bec
2 changed files with 7 additions and 2 deletions

View File

@@ -14,7 +14,11 @@ list_quality = ['default']
def findhost():
permUrl = httptools.downloadpage('https://www.cinemalibero.online/', follow_redirects=False).headers
return 'https://www.' + permUrl['location'].replace('https://www.google.com/search?q=site:', '')
import urlparse
p = list(urlparse.urlparse(permUrl['location'].replace('https://www.google.com/search?q=site:', '')))
if not p[0]:
p[0] = 'https'
return urlparse.urlunparse(p)
host = config.get_channel_url(findhost)
headers = [['Referer', host]]

View File

@@ -515,7 +515,8 @@ class UnshortenIt(object):
return uri, r.code if r else 200
except Exception as e:
return uri, str(e)
logger.error(e)
return uri, 0
def _unshorten_linkup(self, uri):