Fix LA7
This commit is contained in:
+18
-27
@@ -4,7 +4,8 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from core import support
|
from core import support, httptools
|
||||||
|
from platformcode import logger
|
||||||
|
|
||||||
DRM = 'com.widevine.alpha'
|
DRM = 'com.widevine.alpha'
|
||||||
key_widevine = "https://la7.prod.conax.cloud/widevine/license"
|
key_widevine = "https://la7.prod.conax.cloud/widevine/license"
|
||||||
@@ -27,7 +28,7 @@ def mainlist(item):
|
|||||||
('Replay {bold}', ['', 'replay_channels'])]
|
('Replay {bold}', ['', 'replay_channels'])]
|
||||||
|
|
||||||
menu = [('Programmi TV {bullet bold}', ['/tutti-i-programmi', 'peliculas', '', 'tvshow']),
|
menu = [('Programmi TV {bullet bold}', ['/tutti-i-programmi', 'peliculas', '', 'tvshow']),
|
||||||
('Teche La7 {bullet bold}', ['/i-protagonisti', 'peliculas', '', 'tvshow'])]
|
('Teche La7 {bullet bold}', ['/la7teche', 'peliculas', '', 'tvshow'])]
|
||||||
|
|
||||||
search = ''
|
search = ''
|
||||||
return locals()
|
return locals()
|
||||||
@@ -83,13 +84,18 @@ def search(item, text):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
search = item.search
|
search = item.search
|
||||||
|
action = 'episodios'
|
||||||
|
pagination = 20
|
||||||
disabletmdb = True
|
disabletmdb = True
|
||||||
addVideolibrary = False
|
addVideolibrary = False
|
||||||
downloadEnabled = False
|
downloadEnabled = False
|
||||||
action = 'episodios'
|
|
||||||
patron = r'<a href="(?P<url>[^"]+)"[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"></div><div class="titolo">\s*(?P<title>[^<]+)<'
|
patron = r'<a href="(?P<url>[^"]+)"[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]+)"></div><div class="titolo">\s*(?P<title>[^<]+)<'
|
||||||
|
|
||||||
|
if 'la7teche' in item.url:
|
||||||
|
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="teche-i-img".*?url\(\'(?P<thumb>[^\']+)'
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
|
|
||||||
item.fanart = item.thumb
|
item.fanart = item.thumb
|
||||||
return item
|
return item
|
||||||
return locals()
|
return locals()
|
||||||
@@ -97,33 +103,18 @@ def peliculas(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
data = support.match(item).data
|
|
||||||
# debug = True
|
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
if '>puntate<' in data:
|
|
||||||
patronBlock = r'>puntate<(?P<block>.*?)home-block-outbrain'
|
|
||||||
url = support.match(data, patron=r'>puntate<[^>]+>[^>]+>[^>]+><a href="([^"]+)"').match
|
|
||||||
data += support.match(host + url).data
|
|
||||||
else:
|
|
||||||
item.url += '/video'
|
|
||||||
data = support.match(item).data
|
|
||||||
|
|
||||||
patron = r'(?:<a href="(?P<url>[^"]+)">[^>]+><div class="[^"]+" data-background-image="(?P<t>[^"]*)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?(?:[^>]+>){6}?)\s*(?P<title>[^<]+)<(?:[^>]+>[^>]+>[^>]+><div class="data">(?P<date>[^<]+))?|class="heading">[^>]+>(?P<Title>[^<]+).*?window.shareUrl = "(?P<Url>[^"]+)".*?poster:\s*"(?P<Thumb>[^"]+)", title: "(?P<desc>[^"]+)"'
|
|
||||||
patronNext = r'<a href="([^"]+)">›'
|
|
||||||
addVideolibrary = False
|
addVideolibrary = False
|
||||||
downloadEnabled = False
|
downloadEnabled = False
|
||||||
|
|
||||||
def itemHook(item):
|
if 'la7teche' in item.url:
|
||||||
if item.Thumb: item.t = item.Thumb
|
patron = r'<a href="(?P<url>[^"]+)">\s*<div class="holder-bg">.*?data-background-image="(?P<thumb>[^"]+)(?:[^>]+>){4}\s*(?P<title>[^<]+)(?:(?:[^>]+>){2}\s*(?P<plot>[^<]+))?'
|
||||||
item.thumbnail = 'http:' + item.t if item.t.startswith('//') else item.t if item.t else item.thumbnail
|
else:
|
||||||
if item.Title: item.title = support.typo(item.Title, 'bold')
|
data = str(support.match(item.url, patron=r'"home-block home-block--oggi(.*?)</section>').matches)
|
||||||
if item.date:
|
data += httptools.downloadpage(item.url + '/video').data
|
||||||
item.title = support.re.sub(r'[Pp]untata (?:del )?\d+/\d+/\d+', '', item.title)
|
|
||||||
item.title += support.typo(item.date, '_ [] bold')
|
patron = r'item[^>]+>\s*<a href="(?P<url>[^"]+)">.*?image="(?P<thumb>[^"]+)(?:[^>]+>){4,5}\s*(?P<title>[\d\w][^<]+)(?:(?:[^>]+>){7}\s*(?P<title2>[\d\w][^<]+))?'
|
||||||
if item.desc: item.plot = item.desc
|
patronNext = r'<a href="([^"]+)">›'
|
||||||
item.forcethumb = True
|
|
||||||
item.fanart = item.thumbnail
|
|
||||||
return item
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -621,7 +621,7 @@ def scrape(func):
|
|||||||
else: autorenumber.start(itemlist)
|
else: autorenumber.start(itemlist)
|
||||||
|
|
||||||
if itemlist and action != 'play' and 'patronMenu' not in args and 'patronGenreMenu' not in args \
|
if itemlist and action != 'play' and 'patronMenu' not in args and 'patronGenreMenu' not in args \
|
||||||
and not stackCheck(['add_tvshow', 'get_newest']) and (function not in ['episodios', 'mainlist']
|
and not stackCheck(['add_tvshow', 'get_newest']) and not disabletmdb and (function not in ['episodios', 'mainlist']
|
||||||
or (function in ['episodios', 'seasons'] and config.get_setting('episode_info') and itemlist[0].season)):
|
or (function in ['episodios', 'seasons'] and config.get_setting('episode_info') and itemlist[0].season)):
|
||||||
# dbg()
|
# dbg()
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user