decorato eurostreaming, e modifiche a support e fix a strings
per far funzionare il canale eurostreaming ho dovuto apportare modifiche a support.py
This commit is contained in:
@@ -7,15 +7,7 @@
|
|||||||
"thumbnail": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png",
|
"thumbnail": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png",
|
||||||
"bannermenu": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png",
|
"bannermenu": "https://eurostreaming.cafe/wp-content/uploads/2017/08/logocafe.png",
|
||||||
"categories": ["tvshow","anime","vosi"],
|
"categories": ["tvshow","anime","vosi"],
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
|
||||||
"id": "channel_host",
|
|
||||||
"type": "text",
|
|
||||||
"label": "Host del canale",
|
|
||||||
"default": "https://eurostreaming.cafe",
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "include_in_global_search",
|
"id": "include_in_global_search",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|||||||
+42
-43
@@ -18,7 +18,7 @@ from platformcode import logger, config
|
|||||||
|
|
||||||
__channel__ = "eurostreaming"
|
__channel__ = "eurostreaming"
|
||||||
host = config.get_channel_url(__channel__)
|
host = config.get_channel_url(__channel__)
|
||||||
headers = ['Referer', host]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload']
|
list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
@@ -29,47 +29,44 @@ checklinks_number = config.get_setting('checklinks_number', 'cineblog01')
|
|||||||
IDIOMAS = {'Italiano': 'ITA', 'Sub-ITA':'vosi'}
|
IDIOMAS = {'Italiano': 'ITA', 'Sub-ITA':'vosi'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
|
|
||||||
|
@support.menu
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
#import web_pdb; web_pdb.set_trace()
|
support.log()
|
||||||
support.log()
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
support.menu(itemlist, 'Serie TV', 'serietv', host, contentType = 'tvshow') # mettere sempre episode per serietv, anime!!
|
tvshow = [
|
||||||
('Serie TV Archivio ', ["/category/serie-tv-archive/", 'serietv', ]), contentType = 'tvshow')
|
## ('tvshow', [ '', 'peliculas', '', 'tvshow']), # mettere sempre episode per serietv, anime!!
|
||||||
('Ultimi Aggiornamenti ', ['/aggiornamento-episodi/', 'serietv', ]), args='True', contentType = 'tvshow')
|
('Archivio ', ['/category/serie-tv-archive/', 'peliculas', '', 'tvshow']),
|
||||||
support.menu(itemlist, 'Anime / Cartoni', 'serietv', host + '/category/anime-cartoni-animati/', contentType = 'tvshow')
|
('Aggiornamenti ', ['/aggiornamento-episodi/', 'peliculas', True, 'tvshow'])
|
||||||
|
]
|
||||||
|
anime =[
|
||||||
|
('Anime / Cartoni', ['/category/anime-cartoni-animati/','peliculas', '', 'tvshow'])
|
||||||
|
]
|
||||||
|
|
||||||
|
return locals()
|
||||||
## itemlist = filtertools.show_option(itemlist, item.channel, list_language, list_quality)
|
#### itemlist = filtertools.show_option(itemlist, item.channel, list_language, list_quality)
|
||||||
# autoplay
|
## # autoplay
|
||||||
support.aplay(item, itemlist, list_servers, list_quality)
|
## support.aplay(item, itemlist, list_servers, list_quality)
|
||||||
# configurazione canale
|
## # configurazione canale
|
||||||
support.channel_config(item, itemlist)
|
## support.channel_config(item, itemlist)
|
||||||
|
##
|
||||||
return itemlist
|
## return itemlist
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def serietv(item):
|
def peliculas(item):
|
||||||
## import web_pdb; web_pdb.set_trace()
|
## import web_pdb; web_pdb.set_trace()
|
||||||
support.log()
|
support.log()
|
||||||
itemlist = []
|
if item.args == True:
|
||||||
if item.args:
|
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?).[^–]<a href="(?P<url>[^"]+)"'\
|
||||||
#patron = r'<span class="serieTitle" style="font-size:20px">(.*?).[^–]<a href="([^"]+)"\s+target="_blank">(.*?)<\/a>'
|
'\s+target="_blank">(?P<episode>\d+x\d+) (?P<title2>.*?)</a>'
|
||||||
## # DA SISTEMARE - problema: mette tutti gli episodi in sub-ita
|
|
||||||
## patron = r'<span class="serieTitle" style="font-size:20px">(.*?).[^–]<a href="([^"]+)"'\
|
|
||||||
## '\s+target="_blank">(\d+x\d+) (.*?)(?:|\((.+?)\))</a>'
|
|
||||||
patron = r'<span class="serieTitle" style="font-size:20px">(.*?).[^–]<a href="([^"]+)"'\
|
|
||||||
'\s+target="_blank">(\d+x\d+) (.*?)</a>'
|
|
||||||
listGroups = ['title', 'url', 'episode', 'title2']
|
|
||||||
patronNext = ''
|
|
||||||
|
|
||||||
# permette di vedere episodio e titolo + titolo2 in novità
|
## # permette di vedere episodio e titolo + titolo2 in novità
|
||||||
def itemHook(item):
|
## def itemHook(item):
|
||||||
item.show = item.episode + item.title
|
## item.show = item.episode + item.title
|
||||||
return item
|
## return item
|
||||||
else:
|
else:
|
||||||
patron = r'<div class="post-thumb">.*?\s<img src="([^"]+)".*?><a href="([^"]+)".*?>(.*?(?:\((\d{4})\)|(\d{4}))?)<\/a><\/h2>'
|
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?>'\
|
||||||
listGroups = ['thumb', 'url', 'title', 'year', 'year']
|
'<a href="(?P<url>[^"]+)".*?>(?P<title>.*?(?:\((?P<year>\d{4})\)|(\4\d{4}))?)<\/a><\/h2>'
|
||||||
|
|
||||||
patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
||||||
action='episodios'
|
action='episodios'
|
||||||
|
|
||||||
@@ -94,11 +91,13 @@ def episodios(item):
|
|||||||
# Carica la pagina
|
# Carica la pagina
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
#=========
|
#=========
|
||||||
patron = r'(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(ITA|SUB ITA)(?:\))?<\/div>'\
|
## patron = r'(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(?P<lang>ITA|SUB ITA)(?:\))?<\/div>'\
|
||||||
|
## '<div class="su-spoiler-content su-clearfix" style="display:none">|'\
|
||||||
|
## '(?:\s|\Wn)?(?:<strong>)?(?P<title>\d+&#.*?)(?:|–)?<a\s(?P<url>.*?)<\/a><br\s\/>)'
|
||||||
|
patron = r'(?:<\/span>\w+ STAGIONE\s\d+ (?:\()?(?P<lang>ITA|SUB ITA)(?:\))?<\/div>'\
|
||||||
'<div class="su-spoiler-content su-clearfix" style="display:none">|'\
|
'<div class="su-spoiler-content su-clearfix" style="display:none">|'\
|
||||||
'(?:\s|\Wn)?(?:<strong>)?(\d+&#.*?)(?:|–)?<a\s(.*?)<\/a><br\s\/>)'
|
'(?:\s|\Wn)?(?:|<strong>)?(?P<episode>\d+&#\d+;\d+)(?:|</strong>) '\
|
||||||
|
'(?P<title>.*?)(?:|–)?<a\s(?P<url>.*?)<\/a><br\s\/>)'
|
||||||
listGroups = ['lang', 'title', 'url']
|
|
||||||
action = 'findvideos'
|
action = 'findvideos'
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
@@ -114,7 +113,7 @@ def search(item, texto):
|
|||||||
support.log()
|
support.log()
|
||||||
item.url = "%s/?s=%s" % (host, texto)
|
item.url = "%s/?s=%s" % (host, texto)
|
||||||
try:
|
try:
|
||||||
return serietv(item)
|
return peliculas(item)
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
@@ -127,14 +126,14 @@ def newest(categoria):
|
|||||||
support.log()
|
support.log()
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
item.contentType= 'episode'
|
item.contentType = 'episode'
|
||||||
item.args= 'True'
|
item.args = True
|
||||||
try:
|
try:
|
||||||
item.url = "%s/aggiornamento-episodi/" % host
|
item.url = "%s/aggiornamento-episodi/" % host
|
||||||
item.action = "serietv"
|
item.action = "peliculas"
|
||||||
itemlist = serietv(item)
|
itemlist = peliculas(item)
|
||||||
|
|
||||||
if itemlist[-1].action == "serietv":
|
if itemlist[-1].action == "peliculas":
|
||||||
itemlist.pop()
|
itemlist.pop()
|
||||||
|
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
|
|||||||
+40
-33
@@ -251,7 +251,12 @@ def scrape(func):
|
|||||||
val = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+') + val
|
val = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+') + val
|
||||||
scraped[kk] = val
|
scraped[kk] = val
|
||||||
|
|
||||||
title = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["title"]).replace('"',"'").replace('×', 'x').replace('–','-')).strip() # fix by greko da " a '
|
if scraped['title']:
|
||||||
|
title = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped['title'])
|
||||||
|
.replace('"',"'").replace('×', 'x').replace('–','-')).strip() # fix by greko da " a '
|
||||||
|
else:
|
||||||
|
title = ''
|
||||||
|
|
||||||
plot = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["plot"]))
|
plot = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["plot"]))
|
||||||
|
|
||||||
longtitle = typo(title, 'bold')
|
longtitle = typo(title, 'bold')
|
||||||
@@ -260,7 +265,8 @@ def scrape(func):
|
|||||||
scraped['episode'] = re.sub(r'\s-\s|-|x|–', 'x', scraped['episode'])
|
scraped['episode'] = re.sub(r'\s-\s|-|x|–', 'x', scraped['episode'])
|
||||||
longtitle = typo(scraped['episode'] + ' - ', 'bold') + longtitle
|
longtitle = typo(scraped['episode'] + ' - ', 'bold') + longtitle
|
||||||
if scraped['title2']:
|
if scraped['title2']:
|
||||||
title2 = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped["title2"]).replace('"', "'").replace('×', 'x').replace('–','-')).strip()
|
title2 = scrapertoolsV2.htmlclean(scrapertoolsV2.decodeHtmlentities(scraped['title2'])
|
||||||
|
.replace('"', "'").replace('×', 'x').replace('–','-')).strip()
|
||||||
longtitle = longtitle + typo(title2, 'bold _ -- _')
|
longtitle = longtitle + typo(title2, 'bold _ -- _')
|
||||||
|
|
||||||
## Aggiunto/modificato per gestire i siti che hanno i video
|
## Aggiunto/modificato per gestire i siti che hanno i video
|
||||||
@@ -278,20 +284,20 @@ def scrape(func):
|
|||||||
infolabels = item.infoLabels
|
infolabels = item.infoLabels
|
||||||
else:
|
else:
|
||||||
infolabels = {}
|
infolabels = {}
|
||||||
if scraped["year"]:
|
if scraped['year']:
|
||||||
infolabels['year'] = scraped["year"]
|
infolabels['year'] = scraped['year']
|
||||||
if scraped["plot"]:
|
if scraped["plot"]:
|
||||||
infolabels['plot'] = plot
|
infolabels['plot'] = plot
|
||||||
if scraped["duration"]:
|
if scraped['duration']:
|
||||||
matches = scrapertoolsV2.find_multiple_matches(scraped["duration"],
|
matches = scrapertoolsV2.find_multiple_matches(scraped['duration'],
|
||||||
r'([0-9])\s*?(?:[hH]|:|\.|,|\\|\/|\||\s)\s*?([0-9]+)')
|
r'([0-9])\s*?(?:[hH]|:|\.|,|\\|\/|\||\s)\s*?([0-9]+)')
|
||||||
for h, m in matches:
|
for h, m in matches:
|
||||||
scraped["duration"] = int(h) * 60 + int(m)
|
scraped['duration'] = int(h) * 60 + int(m)
|
||||||
if not matches:
|
if not matches:
|
||||||
scraped["duration"] = scrapertoolsV2.find_single_match(scraped["duration"], r'(\d+)')
|
scraped['duration'] = scrapertoolsV2.find_single_match(scraped['duration'], r'(\d+)')
|
||||||
infolabels['duration'] = int(scraped["duration"]) * 60
|
infolabels['duration'] = int(scraped['duration']) * 60
|
||||||
if scraped["genere"]:
|
if scraped['genere']:
|
||||||
genres = scrapertoolsV2.find_multiple_matches(scraped["genere"], '[A-Za-z]+')
|
genres = scrapertoolsV2.find_multiple_matches(scraped['genere'], '[A-Za-z]+')
|
||||||
infolabels['genere'] = ", ".join(genres)
|
infolabels['genere'] = ", ".join(genres)
|
||||||
if scraped["rating"]:
|
if scraped["rating"]:
|
||||||
infolabels['rating'] = scrapertoolsV2.decodeHtmlentities(scraped["rating"])
|
infolabels['rating'] = scrapertoolsV2.decodeHtmlentities(scraped["rating"])
|
||||||
@@ -304,29 +310,30 @@ def scrape(func):
|
|||||||
for name, variants in typeActionDict.items():
|
for name, variants in typeActionDict.items():
|
||||||
if scraped['type'] in variants:
|
if scraped['type'] in variants:
|
||||||
action = name
|
action = name
|
||||||
|
|
||||||
if scraped["title"] not in blacklist:
|
|
||||||
it = Item(
|
|
||||||
channel=item.channel,
|
|
||||||
action=action,
|
|
||||||
contentType= 'episode' if (action == 'findvideos' and item.contentType == 'tvshow') else item.contentType,
|
|
||||||
title=longtitle,
|
|
||||||
fulltitle=item.fulltitle if (action == 'findvideos' and item.contentType != 'movie') else title,
|
|
||||||
show=item.show if (action == 'findvideos' and item.contentType != 'movie') else title,
|
|
||||||
quality=scraped["quality"],
|
|
||||||
url=scraped["url"],
|
|
||||||
infoLabels=infolabels,
|
|
||||||
thumbnail=scraped["thumb"],
|
|
||||||
args=item.args,
|
|
||||||
contentSerieName = title if (action == 'episodios' and item.contentType != 'movie') else ''
|
|
||||||
)
|
|
||||||
|
|
||||||
for lg in list(set(listGroups).difference(known_keys)):
|
|
||||||
it.__setattr__(lg, match[listGroups.index(lg)])
|
|
||||||
|
|
||||||
if 'itemHook' in args:
|
if scraped["title"]:
|
||||||
it = args['itemHook'](it)
|
if scraped["title"] not in blacklist:
|
||||||
itemlist.append(it)
|
it = Item(
|
||||||
|
channel=item.channel,
|
||||||
|
action=action,
|
||||||
|
contentType= 'episode' if (action == 'findvideos' and item.contentType == 'tvshow') else item.contentType,
|
||||||
|
title=longtitle,
|
||||||
|
fulltitle=item.fulltitle if (action == 'findvideos' and item.contentType != 'movie') else title,
|
||||||
|
show=item.show if (action == 'findvideos' and item.contentType != 'movie') else title,
|
||||||
|
quality=scraped["quality"],
|
||||||
|
url=scraped["url"],
|
||||||
|
infoLabels=infolabels,
|
||||||
|
thumbnail=scraped["thumb"],
|
||||||
|
args=item.args,
|
||||||
|
contentSerieName = title if (action == 'episodios' and item.contentType != 'movie') else ''
|
||||||
|
)
|
||||||
|
|
||||||
|
for lg in list(set(listGroups).difference(known_keys)):
|
||||||
|
it.__setattr__(lg, match[listGroups.index(lg)])
|
||||||
|
|
||||||
|
if 'itemHook' in args:
|
||||||
|
it = args['itemHook'](it)
|
||||||
|
itemlist.append(it)
|
||||||
checkHost(item, itemlist)
|
checkHost(item, itemlist)
|
||||||
|
|
||||||
if (item.contentType == "tvshow" and (action != "findvideos" and action != "play")) \
|
if (item.contentType == "tvshow" and (action != "findvideos" and action != "play")) \
|
||||||
|
|||||||
@@ -5587,12 +5587,12 @@ msgstr "Non riesco a trovare automaticamente il numero dell'episodio speciale, p
|
|||||||
|
|
||||||
msgctxt "#70720"
|
msgctxt "#70720"
|
||||||
msgid "Dear User\n,You are currently not connected to any modem/router. You cannot access KOD because the channels will not be reachable! We advise you to check at least that the modem/router is switched on and/or your device is connected.\n"
|
msgid "Dear User\n,You are currently not connected to any modem/router. You cannot access KOD because the channels will not be reachable! We advise you to check at least that the modem/router is switched on and/or your device is connected.\n"
|
||||||
msgstr "Gentile Utente,\nAttualmente non risulti connesso a nessun modem/router.\nNON POTRAI ACCEDERE A KOD!\npoichè i canali non saranno raggiungibili, finchè non risolverai il problema. Ti consigliamo di controllare quanto meno che il modem/router sia acceso e/o il tuo dispositivo connesso.\n"
|
msgstr "Gentile Utente,\nAttualmente non risulti connesso a nessun Modem/Router.\nNON POTRAI ACCEDERE A KOD!\npoichè i canali non saranno raggiungibili, finchè non risolverai il problema. Controlla quanto meno che il modem/router sia acceso e/o il tuo dispositivo connesso.\n"
|
||||||
|
|
||||||
msgctxt "#70721"
|
msgctxt "#70721"
|
||||||
msgid "Dear user, you seem to have problems with ADSL! You cannot access KOD because the channels will not be accessible! We suggest you call your manager's toll-free number or check it out at least that the modem/router is on and/or your device is connected."
|
msgid "Dear user, you seem to have problems with ADSL! You cannot access KOD because the channels will not be accessible! We suggest you call your manager's toll-free number or check it out at least that the modem/router is on and/or your device is connected."
|
||||||
msgstr "Gentile Utente, sembra tu abbia problemi con l'ADSL! Non puoi accedere a KOD poichè i canali non saranno raggiungibili! Ti consigliamo di chiamare il numero verde del tuo gestore o di controllare quanto meno che il modem/router sia acceso e/o il tuo dispositivo connesso."
|
msgstr "Gentile Utente, sembra tu abbia problemi con l'ADSL! NON POTRAI ACCEDERE A KOD!\npoichè i canali non saranno raggiungibili, finchè non risolverai il problema. Controlla quanto meno che il modem/router sia acceso e/o il tuo dispositivo connesso."
|
||||||
|
|
||||||
msgctxt "#70722"
|
msgctxt "#70722"
|
||||||
msgid "Dear User, your current DNS do not allow you to reach all ergo sites, not all Channels will work. We recommend that you set up your DNS to take advantage of more channels. Search your favorite search engine how to set them up on your device."
|
msgid "Dear User, your current DNS do not allow you to reach all ergo sites, not all Channels will work. We recommend that you set up your DNS to take advantage of more channels. Search your favorite search engine how to set them up on your device."
|
||||||
msgstr "Gentile Utente, i tuoi DNS attuali non ti permettono di raggiungere tutti i siti, ergo, non tutti i Canali funzioneranno. Ti consigliamo per usufruire di un maggior numero di canali, di impostare i DNS. Cerca sul tuo motore di ricerca preferito come impostarli sul tuo dispositivo."
|
msgstr "Gentile Utente, i tuoi DNS attuali non ti permettono di raggiungere tutti i siti, ergo, non tutti i Canali funzioneranno. Ti consigliamo, per usufruire di un maggior numero di canali, di impostare i DNS. Cerca sul tuo motore di ricerca preferito come impostarli sul tuo dispositivo."
|
||||||
|
|||||||
Reference in New Issue
Block a user