Fix Guardaserie icu e Italiaserie
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@
|
|||||||
"hd4me": "https://hd4me.net",
|
"hd4me": "https://hd4me.net",
|
||||||
"ilgeniodellostreaming": "https://ilgeniodellostreaming.pet",
|
"ilgeniodellostreaming": "https://ilgeniodellostreaming.pet",
|
||||||
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.gold",
|
"ilgeniodellostreaming_cam": "https://ilgeniodellostreaming.gold",
|
||||||
"italiaserie": "https://italiaserie.eu",
|
"italiaserie": "https://italiaserie.run",
|
||||||
"mondoserietv": "https://mondoserietv.fun",
|
"mondoserietv": "https://mondoserietv.fun",
|
||||||
"piratestreaming": "https://www.piratestreaming.deals",
|
"piratestreaming": "https://www.piratestreaming.deals",
|
||||||
"polpotv": "https://polpotv.life",
|
"polpotv": "https://polpotv.life",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ def mainlist(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
patronBlock = r'movies-list movies-list-full(?P<block>.*?)footer>'
|
patronBlock = r'movies-list movies-list-full(?P<block>.*?)footer>'
|
||||||
patron = r'<div data-movie-id[^>]+> <a href="(?P<url>[^"]+).*?<img data-original="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+).*?rel="tag">(?P<year>\d+).*?jt-info">(?P<duration>\d+)'
|
patron = r'<div data-movie-id[^>]+>\s*<a href="(?P<url>[^"]+)"[^>]+>[^>]+>[^>]+><img src="(?P<thumbnail>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+).*?jt-info[^>]+>[^:]+:\s*(?P<rating>[^<]+)[^>]+>[^>]+>[^>]+>(?P<year>\d*)[^>]+>[^>]+>[^>]+>(?P<duration>\d*)'
|
||||||
patronNext = '<li class=.active.>.*?href=.(.*?).>'
|
patronNext = '<li class=.active.>.*?href=.(.*?).>'
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
return locals()
|
return locals()
|
||||||
|
|||||||
+33
-55
@@ -2,22 +2,11 @@
|
|||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Canale per italiaserie
|
# Canale per italiaserie
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
"""
|
|
||||||
|
|
||||||
Problemi noti che non superano il test del canale:
|
|
||||||
|
|
||||||
|
|
||||||
Avvisi:
|
|
||||||
|
|
||||||
|
|
||||||
Ulteriori info:
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import re
|
|
||||||
from core import support, httptools, scrapertools
|
from core import support, httptools, scrapertools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import config
|
from platformcode import config, logger
|
||||||
|
|
||||||
host = config.get_channel_url()
|
host = config.get_channel_url()
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
@@ -25,11 +14,11 @@ headers = [['Referer', host]]
|
|||||||
|
|
||||||
@support.menu
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
support.info()
|
tvshow = ['',
|
||||||
|
('Aggiornamenti', ['/aggiornamento-episodi/', 'peliculas', 'update']),
|
||||||
tvshow = ['/category/serie-tv/',
|
('Top 10', ['/top-10', 'peliculas', 'top']),
|
||||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'update']),
|
('Netflix {tv submenu}', ['/genere/netflix', 'peliculas']),
|
||||||
('Generi', ['', 'category', 'Serie-Tv per Genere'])
|
('A-Z', ['/lista-completa', 'peliculas', 'a-z'])
|
||||||
]
|
]
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
@@ -37,44 +26,46 @@ def mainlist(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
support.info()
|
|
||||||
|
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\
|
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"\[]+)[^>]+>\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
||||||
'title="(?P<title>[^"]+)">\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
|
||||||
|
|
||||||
if item.args == 'update':
|
if item.args == 'update':
|
||||||
patron += r'.*?aj-eps">(?P<episode>.+?)[ ]?(?P<lang>Sub-Ita|Ita)</span>'
|
pagination = ''
|
||||||
|
patron = r'br />(?P<title>[^–]+)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+)\s*(?P<title2>[^\(<]+)(?:\((?P<lang>[^\)]+))??'
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
|
if item.args == 'top':
|
||||||
|
patron = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>[^>]+>[^>]+>[^>]+><img.*?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>:\s*(?P<rating>[^/]+)'
|
||||||
|
if item.args =='a-z':
|
||||||
|
pagination = ''
|
||||||
|
patron = r'<li ><a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)"'
|
||||||
patronNext = r'<a class="next page-numbers" href="(.*?)">'
|
patronNext = r'<a class="next page-numbers" href="(.*?)">'
|
||||||
|
|
||||||
## debug = True
|
def itemHook(item):
|
||||||
|
item.title = support.re.sub(r'<[^>]+>','', item.title)
|
||||||
|
return item
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
support.info()
|
res = support.match(item, patron=r'<a href="([^"]+)">>')
|
||||||
|
if res.match: data = support.match(res.match).data
|
||||||
|
else: data = res.data
|
||||||
|
|
||||||
patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\
|
patronBlock = r'(?:Stagione|STAGIONE)\s*(?P<lang>[^<]+)?(?:</p>)?(?P<block>.*?)</p>'
|
||||||
'<div class="su-spoiler-content".*?)<div class="clearfix">'
|
patron = r'(?:p>|/>)(?P<title>[^–]+)–(?P<data>.*?)(?:<br|$)'
|
||||||
patron = r'(?:(?P<season>\d+)?</div> <div class="su-spoiler-content"(:?.+?)?> )?'\
|
|
||||||
'<div class="su-link-ep">\s+<a.*?href="(?P<url>[^"]+)".*?strong>[ ]'\
|
|
||||||
'(?P<title>.+?)[ ](?P<episode>\d+-\d+|\d+)[ ](?:-\s+(?P<title2>.+?))?'\
|
|
||||||
'[ ]?(?:(?P<lang>Sub-ITA))?[ ]?</strong>'
|
|
||||||
|
|
||||||
|
def itemHook(item):
|
||||||
#debug = True
|
item.title = support.re.sub('<[^>]+>','', item.title)
|
||||||
|
return item
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def category(item):
|
def category(item):
|
||||||
support.info()
|
|
||||||
|
|
||||||
action = 'peliculas'
|
action = 'peliculas'
|
||||||
patron = r'<li class="cat-item.*?href="(?P<url>[^"]+)".*?>(?P<title>.*?)</a>'
|
patron = r'<li class="cat-item.*?href="(?P<url>[^"]+)".*?>(?P<title>.*?)</a>'
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
|
|
||||||
@@ -111,41 +102,28 @@ def newest(categoria):
|
|||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
support.info("{0}".format(line))
|
logger.error("{0}".format(line))
|
||||||
return []
|
return []
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
support.info()
|
logger.debug()
|
||||||
|
|
||||||
if item.args == 'update':
|
if item.args == 'update':
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item.infoLabels['mediatype'] = 'episode'
|
item.infoLabels['mediatype'] = 'episode'
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
data = support.match(item.url, headers=headers).data
|
||||||
data = re.sub('\n|\t', ' ', data)
|
url_video = support.match(data, patron=r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>').matches
|
||||||
data = re.sub(r'>\s+<', '> <', data)
|
url_serie = support.match(data, patron=r'<link rel="canonical" href="([^"]+)" />').matches
|
||||||
url_video = scrapertools.find_single_match(data, r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>', -1)
|
|
||||||
url_serie = scrapertools.find_single_match(data, r'<link rel="canonical" href="([^"]+)" />')
|
|
||||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||||
itemlist = support.server(item, data=url_video)
|
itemlist = support.server(item, data=url_video)
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(item.clone(title=goseries + series, contentType='tvshow', url=url_serie, action='episodios', plot = goseries + series + "con tutte le puntate"))
|
||||||
Item(channel=item.channel,
|
|
||||||
title=goseries + series,
|
|
||||||
fulltitle=item.fulltitle,
|
|
||||||
show=item.show,
|
|
||||||
contentType='tvshow',
|
|
||||||
contentSerieName=item.contentSerieName,
|
|
||||||
url=url_serie,
|
|
||||||
action='episodios',
|
|
||||||
contentTitle=item.contentSerieName,
|
|
||||||
plot = goseries + series + "con tutte le puntate",
|
|
||||||
))
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
else:
|
else:
|
||||||
return support.server(item, data=item.url)
|
return support.server(item, data=item.data)
|
||||||
|
|||||||
Reference in New Issue
Block a user