Fix Segna già visti CB01 con Autoplay
This commit is contained in:
+30
-32
@@ -35,7 +35,7 @@ def mainlist(item):
|
|||||||
('HD', ['', 'menu', 'Film HD Streaming']),
|
('HD', ['', 'menu', 'Film HD Streaming']),
|
||||||
('Generi', ['', 'menu', 'Film per Genere']),
|
('Generi', ['', 'menu', 'Film per Genere']),
|
||||||
('Anni', ['', 'menu', 'Film per Anno']),
|
('Anni', ['', 'menu', 'Film per Anno']),
|
||||||
('Paese', ['', 'menu', 'Film per Paese']),
|
('Paese', ['', 'menu', 'Film per Paese']),
|
||||||
('Ultimi Aggiornati',['/lista-film-ultimi-100-film-aggiornati/', 'peliculas', 'newest']),
|
('Ultimi Aggiornati',['/lista-film-ultimi-100-film-aggiornati/', 'peliculas', 'newest']),
|
||||||
('Ultimi Aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'peliculas', 'newest'])
|
('Ultimi Aggiunti', ['/lista-film-ultimi-100-film-aggiunti/', 'peliculas', 'newest'])
|
||||||
]
|
]
|
||||||
@@ -63,7 +63,7 @@ def menu(item):
|
|||||||
|
|
||||||
# @support.scrape
|
# @support.scrape
|
||||||
# def newest(categoria):
|
# def newest(categoria):
|
||||||
#
|
#
|
||||||
# # debug = True
|
# # debug = True
|
||||||
# patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
# patron = r'<a href="?(?P<url>[^">]+)"?>(?P<title>[^<([]+)(?:\[(?P<lang>Sub-ITA|B/N|SUB-ITA)\])?\s*(?:\[(?P<quality>HD|SD|HD/3D)\])?\s*\((?P<year>[0-9]{4})\)<\/a>'
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ def menu(item):
|
|||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
support.log(categoria)
|
support.log(categoria)
|
||||||
|
|
||||||
item = support.Item()
|
item = support.Item()
|
||||||
try:
|
try:
|
||||||
if categoria == "series":
|
if categoria == "series":
|
||||||
@@ -170,7 +170,7 @@ def episodios(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
|
|
||||||
|
|
||||||
if item.contentType == "episode":
|
if item.contentType == "episode":
|
||||||
return findvid_serie(item)
|
return findvid_serie(item)
|
||||||
@@ -178,18 +178,15 @@ def findvideos(item):
|
|||||||
def load_links(itemlist, re_txt, color, desc_txt, quality=""):
|
def load_links(itemlist, re_txt, color, desc_txt, quality=""):
|
||||||
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
|
streaming = scrapertools.find_single_match(data, re_txt).replace('"', '')
|
||||||
support.log('STREAMING',streaming)
|
support.log('STREAMING',streaming)
|
||||||
support.log('STREAMING=', streaming)
|
matches = support.match(streaming, patron = r'<td><a.*?href=([^ ]+) [^>]+>([^<]+)<').matches
|
||||||
# patron = '<td><a.*?href=(.*?) (?:target|rel)[^>]+>([^<]+)<'
|
for url, server in matches:
|
||||||
patron = '<td><a.*?href=([^ ]+) [^>]+>([^<]+)<'
|
logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, url, server))
|
||||||
matches = re.compile(patron, re.DOTALL).findall(streaming)
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
logger.debug("##### findvideos %s ## %s ## %s ##" % (desc_txt, scrapedurl, scrapedtitle))
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="play",
|
action="play",
|
||||||
title=scrapedtitle,
|
title=server,
|
||||||
url=scrapedurl,
|
url=final_links(url),
|
||||||
server=scrapedtitle,
|
server=server,
|
||||||
fulltitle=item.fulltitle,
|
fulltitle=item.fulltitle,
|
||||||
thumbnail=item.thumbnail,
|
thumbnail=item.thumbnail,
|
||||||
show=item.show,
|
show=item.show,
|
||||||
@@ -220,15 +217,15 @@ def findvideos(item):
|
|||||||
|
|
||||||
# Estrae i contenuti - Streaming 3D
|
# Estrae i contenuti - Streaming 3D
|
||||||
load_links(itemlist, '<strong>Streamin?g 3D[^<]+</strong>(.*?)cbtable', "pink", "Streaming 3D")
|
load_links(itemlist, '<strong>Streamin?g 3D[^<]+</strong>(.*?)cbtable', "pink", "Streaming 3D")
|
||||||
|
|
||||||
itemlist=support.server(item, itemlist=itemlist)
|
itemlist=support.server(item, itemlist=itemlist)
|
||||||
if itemlist and QualityStr:
|
if itemlist and QualityStr:
|
||||||
itemlist.insert(0,
|
itemlist.insert(0,
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="",
|
action="",
|
||||||
title="[COLOR orange]%s[/COLOR]" % QualityStr,
|
title=support.typo(QualityStr,'[] color kod bold'),
|
||||||
folder=False))
|
folder=False))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# Estrae i contenuti - Download
|
# Estrae i contenuti - Download
|
||||||
@@ -239,23 +236,22 @@ def findvideos(item):
|
|||||||
|
|
||||||
|
|
||||||
def findvid_serie(item):
|
def findvid_serie(item):
|
||||||
def load_vid_series(html, item, itemlist, blktxt):
|
def load_vid_series(html, item, itemlist, blktxt=''):
|
||||||
logger.info('HTML' + html)
|
# logger.info('HTML' + html)
|
||||||
patron = r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)</a>'
|
# patron = r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)</a>'
|
||||||
# Estrae i contenuti
|
# Estrae i contenuti
|
||||||
matches = re.compile(patron, re.DOTALL).finditer(html)
|
# matches = re.compile(patron, re.DOTALL).finditer(html)
|
||||||
for match in matches:
|
matches = support.match(html, patron = r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)</a>').matches
|
||||||
scrapedurl = match.group(1)
|
for url, server in matches:
|
||||||
scrapedtitle = ("%s" % support.color(blktxt,"orange") + " - " if blktxt else "") + match.group(2)
|
|
||||||
# title = item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]"
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="play",
|
action="play",
|
||||||
title=scrapedtitle,
|
title=server,
|
||||||
url=scrapedurl,
|
url=final_links(url),
|
||||||
server=scrapedtitle,
|
server=server,
|
||||||
fulltitle=item.fulltitle,
|
fulltitle=item.fulltitle,
|
||||||
show=item.show,
|
show=item.show,
|
||||||
|
quality=blktxt,
|
||||||
contentType=item.contentType,
|
contentType=item.contentType,
|
||||||
folder=False))
|
folder=False))
|
||||||
|
|
||||||
@@ -266,9 +262,9 @@ def findvid_serie(item):
|
|||||||
lnkblkp = []
|
lnkblkp = []
|
||||||
|
|
||||||
data = item.url
|
data = item.url
|
||||||
|
|
||||||
# Blocks with split
|
# Blocks with split
|
||||||
blk=re.split("(?:>\s*)?([A-Za-z\s0-9]*):\s*<",data,re.S)
|
blk=re.split(r"(?:>\s*)?([A-Za-z\s0-9]*):\s*<",data,re.S)
|
||||||
blktxt=""
|
blktxt=""
|
||||||
for b in blk:
|
for b in blk:
|
||||||
if b[0:3]=="a h" or b[0:4]=="<a h":
|
if b[0:3]=="a h" or b[0:4]=="<a h":
|
||||||
@@ -280,9 +276,11 @@ def findvid_serie(item):
|
|||||||
return support.server(item, itemlist=itemlist)
|
return support.server(item, itemlist=itemlist)
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
def final_links(url):
|
||||||
support.log()
|
support.log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
item= Item()
|
||||||
|
item.url = url
|
||||||
### Handling new cb01 wrapper
|
### Handling new cb01 wrapper
|
||||||
if host[9:] + "/film/" in item.url:
|
if host[9:] + "/film/" in item.url:
|
||||||
iurl = httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location", "")
|
iurl = httptools.downloadpage(item.url, only_headers=True, follow_redirects=False).headers.get("location", "")
|
||||||
@@ -306,9 +304,9 @@ def play(item):
|
|||||||
data, c = unshortenit.unwrap_30x_only(data)
|
data, c = unshortenit.unwrap_30x_only(data)
|
||||||
else:
|
else:
|
||||||
data = scrapertools.find_single_match(data, r'<a href="([^"]+)".*?class="btn-wrapper">.*?licca.*?</a>')
|
data = scrapertools.find_single_match(data, r'<a href="([^"]+)".*?class="btn-wrapper">.*?licca.*?</a>')
|
||||||
|
|
||||||
logger.debug("##### play go.php data ##\n%s\n##" % data)
|
logger.debug("##### play go.php data ##\n%s\n##" % data)
|
||||||
else:
|
else:
|
||||||
data = support.swzz_get_url(item)
|
data = support.swzz_get_url(item)
|
||||||
|
|
||||||
return servertools.find_video_items(data=data)
|
return data
|
||||||
|
|||||||
+1
-1
@@ -1044,7 +1044,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
|||||||
|
|
||||||
item.title = typo(item.contentTitle.strip(),'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
item.title = typo(item.contentTitle.strip(),'bold') if item.contentType == 'movie' or (config.get_localized_string(30161) in item.title) else item.title
|
||||||
|
|
||||||
videoitem.plot= typo(videoitem.title, 'bold')
|
videoitem.plot= typo(videoitem.title, 'bold') + typo(videoitem.quality, '_ [] bold')
|
||||||
videoitem.title = item.title + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
videoitem.title = item.title + (typo(videoitem.title, '_ color kod [] bold') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||||
videoitem.fulltitle = item.fulltitle
|
videoitem.fulltitle = item.fulltitle
|
||||||
videoitem.show = item.show
|
videoitem.show = item.show
|
||||||
|
|||||||
Reference in New Issue
Block a user