nuovo fix cb01 (ennesimo cambio struttura)

This commit is contained in:
mac12m99
2019-09-23 20:58:36 +02:00
parent 52096a8380
commit 63220c1e1f
3 changed files with 14 additions and 4 deletions
+14 -3
View File
@@ -11,9 +11,16 @@ from lib import unshortenit
from platformcode import logger, config
from specials import autoplay
__channel__ = "cineblog01"
host = config.get_channel_url(__channel__)
headers = [['Referer', host]]
#impostati dinamicamente da getUrl()
host = ""
headers = ""
def findhost():
global host, headers
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
headers = [['Referer', host]]
IDIOMAS = {'Italiano': 'IT'}
list_language = IDIOMAS.values()
@@ -30,6 +37,7 @@ blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L&#8217
def mainlist(item):
findhost()
autoplay.init(item.channel, list_servers, list_quality)
@@ -56,6 +64,7 @@ def mainlist(item):
def menu(item):
findhost()
itemlist= []
data = httptools.downloadpage(item.url, headers=headers).data
data = re.sub('\n|\t', '', data)
@@ -94,6 +103,7 @@ def search(item, text):
def newest(categoria):
findhost()
itemlist = []
item = Item()
item.contentType = 'movie'
@@ -218,6 +228,7 @@ def episodios(item):
def findvideos(item):
findhost()
if item.contentType == "episode":
return findvid_serie(item)