From 31673889df4e0a19aa5f2f04848840be3f1b7af5 Mon Sep 17 00:00:00 2001 From: mac12m99 Date: Mon, 23 Sep 2019 21:04:03 +0200 Subject: [PATCH] Revert "Cambio Indirizzo CB01" This reverts commit 39a6561c --- channels.json | 1 - channels/cineblog01.py | 15 ++++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/channels.json b/channels.json index 67af7961..e42f75b6 100644 --- a/channels.json +++ b/channels.json @@ -14,7 +14,6 @@ "casacinema": "https://www.casacinema.uno", "casacinemainfo": "https://www.casacinema.info", "cb01anime": "https://www.cineblog01.ink", - "cineblog01": "https://www.cb01.uno", "cinemalibero": "https://www.cinemalibero.best", "documentaristreamingda": "https://documentari-streaming-da.com", "dreamsub": "https://www.dreamsub.stream", diff --git a/channels/cineblog01.py b/channels/cineblog01.py index 04cea7a3..78e858a3 100644 --- a/channels/cineblog01.py +++ b/channels/cineblog01.py @@ -10,11 +10,16 @@ from core.item import Item from lib import unshortenit from platformcode import logger, config +#impostati dinamicamente da findhost() +host = "" +headers = "" -__channel__ = "cineblog01" -host = config.get_channel_url(__channel__) -headers = [['Referer', host]] +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]] list_servers = ['verystream', 'openload', 'streamango', 'wstream'] list_quality = ['HD', 'SD', 'default'] @@ -30,6 +35,7 @@ blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’ @support.menu def mainlist(item): + findhost() film = [ ('HD', ['', 'menu', 'Film HD Streaming']), ('Generi', ['', 'menu', 'Film per Genere']), @@ -47,6 +53,7 @@ def mainlist(item): @support.scrape def menu(item): + findhost() patronBlock = item.args + r'<\/span>.*?(?P.*?)<\/ul>' patronMenu = r'href="?(?P[^">]+)"?>(?P.*?)<\/a>' action = 'peliculas' @@ -56,6 +63,7 @@ def menu(item): @support.scrape def newest(categoria): + findhost() if type(categoria) != Item: item = Item() item.contentType = 'movie' @@ -111,6 +119,7 @@ def episodios(item): def findvideos(item): + findhost() if item.contentType == "episode": return findvid_serie(item)