more efficient way to get host
This commit is contained in:
@@ -16,9 +16,11 @@ from platformcode import logger, config
|
|||||||
host = ""
|
host = ""
|
||||||
headers = ""
|
headers = ""
|
||||||
|
|
||||||
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
def findhost():
|
||||||
host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
global host, headers
|
||||||
headers = [['Referer', host]]
|
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'}
|
IDIOMAS = {'Italiano': 'IT'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
@@ -33,7 +35,7 @@ blacklist = ['BENVENUTI', 'Richieste Serie TV', 'CB01.UNO ▶ TROVA L’
|
|||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
support.log()
|
findhost()
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
|
||||||
@@ -94,7 +96,7 @@ def search(item, text):
|
|||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
support.log()
|
findhost()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
item.url = host + '/lista-film-ultimi-100-film-aggiunti/'
|
||||||
@@ -128,6 +130,8 @@ def episodios(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
|
findhost()
|
||||||
|
|
||||||
if item.contentType == "episode":
|
if item.contentType == "episode":
|
||||||
return findvid_serie(item)
|
return findvid_serie(item)
|
||||||
|
|
||||||
|
|||||||
@@ -13,15 +13,21 @@ from platformcode import logger
|
|||||||
from channelselector import thumb
|
from channelselector import thumb
|
||||||
|
|
||||||
headers = ""
|
headers = ""
|
||||||
|
host = ""
|
||||||
|
|
||||||
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
|
||||||
cb01Url = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
|
||||||
data = httptools.downloadpage(cb01Url).data
|
|
||||||
host = scrapertoolsV2.get_match(data, r'<a class="?mega-menu-link"? href=(https://vedohd[^/"]+)')+'/'
|
|
||||||
|
|
||||||
if 'https' not in host: # in caso cb01 cambi, si spera di riuscire ad accedere da questo URL
|
def findhost():
|
||||||
host = "https://vedohd.pw/"
|
permUrl = httptools.downloadpage('https://www.cb01.uno/', follow_redirects=False).headers
|
||||||
headers = [['Referer', host]]
|
cb01Url = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||||
|
data = httptools.downloadpage(cb01Url).data
|
||||||
|
global host, headers
|
||||||
|
|
||||||
|
host = scrapertoolsV2.get_match(data, r'<a class="?mega-menu-link"? href=(https://vedohd[^/"]+)')+'/'
|
||||||
|
|
||||||
|
if 'https' not in host: # in caso cb01 cambi, si spera di riuscire ad accedere da questo URL
|
||||||
|
host = "https://vedohd.pw/"
|
||||||
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
|
||||||
IDIOMAS = {'Italiano': 'IT'}
|
IDIOMAS = {'Italiano': 'IT'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
@@ -34,6 +40,7 @@ blacklist = ['CB01.UNO ▶ TROVA L’INDIRIZZO UFFICIALE ', 'AVVISO IMP
|
|||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info("[vedohd.py] mainlist")
|
logger.info("[vedohd.py] mainlist")
|
||||||
|
findhost()
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
|
||||||
@@ -65,6 +72,7 @@ def peliculas(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
|
findhost()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
for link in support.dooplay_get_links(item, host):
|
for link in support.dooplay_get_links(item, host):
|
||||||
if link['title'] != 'Trailer':
|
if link['title'] != 'Trailer':
|
||||||
|
|||||||
Reference in New Issue
Block a user