Merge branch 'master' of https://github.com/kodiondemand/addon
This commit is contained in:
@@ -0,0 +1,267 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per 'cinemalibero'
|
||||
|
||||
"""
|
||||
Questi sono commenti per i beta-tester.
|
||||
|
||||
Su questo canale, nelle categorie:
|
||||
-'Ricerca Globale'
|
||||
- Novità, voce interna al canale
|
||||
- Nella lista anime
|
||||
non saranno presenti le voci:
|
||||
- 'Aggiungi alla Videoteca'
|
||||
- 'Scarica Film'/'Scarica Serie',
|
||||
Inoltre nella lista Anime non è presente la voce rinumerazione!
|
||||
dunque, la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE.
|
||||
|
||||
|
||||
Novità ( globale ), presenti solo i film:
|
||||
- film ( 20 titoli ) della pagina https://www.cinemalibero.best/category/film/
|
||||
|
||||
Avvisi:
|
||||
- Eventuali avvisi per i tester
|
||||
|
||||
Ulteriori info:
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
# per l'uso dei decoratori, per i log, e funzioni per siti particolari
|
||||
from core import support
|
||||
# se non si fa uso di findhost()
|
||||
from platformcode import config
|
||||
|
||||
# in caso di necessità
|
||||
from core import scrapertoolsV2, httptools#, servertools
|
||||
from core.item import Item # per newest
|
||||
#from lib import unshortenit
|
||||
|
||||
# se necessaria la variabile __channel__
|
||||
# da cancellare se non utilizzata
|
||||
__channel__ = "cinemalibero"
|
||||
# da cancellare se si utilizza findhost()
|
||||
host = config.get_channel_url('cinemalibero')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['akstream', 'wstream', 'openload', 'streamango']
|
||||
list_quality = ['default']
|
||||
|
||||
### fine variabili
|
||||
|
||||
#### Inizio delle def principali ###
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
|
||||
film = ['/category/film/',
|
||||
('Generi', ['', 'genres', 'genres']),
|
||||
]
|
||||
|
||||
# Voce SERIE, puoi solo impostare l'url
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Novità', ['/aggiornamenti-serie-tv/', 'peliculas', 'update'])
|
||||
]
|
||||
# Voce ANIME, puoi solo impostare l'url
|
||||
Anime = [('Anime', ['/category/anime-giapponesi/', 'peliculas', 'anime', 'tvshow']), # url per la voce Anime, se possibile la pagina con titoli di anime
|
||||
## #Voce Menu,['url','action','args',contentType]
|
||||
## ('Novità', ['', '', '']),
|
||||
## ('In Corso',['', '', '', '']),
|
||||
## ('Ultimi Episodi',['', '', '', '']),
|
||||
## ('Ultime Serie',['', '', '', ''])
|
||||
]
|
||||
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log(item)
|
||||
#support.dbg() # decommentare per attivare web_pdb
|
||||
|
||||
if item.args == 'search':
|
||||
patron = r'href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">.+?class="titolo">(?P<title>[^<]+)<'
|
||||
patronBlock = r'style="color: #2C3549 !important;" class="fon my-3"><small>.+?</small></h1>(?P<block>.*?)<div class="bg-dark ">'
|
||||
action = 'select'
|
||||
else:
|
||||
if item.contentType == 'tvshow':
|
||||
if item.args == 'update':
|
||||
patron = r'<div class="card-body p-0">\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ]<div class="genere">(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
action = 'select'
|
||||
|
||||
def itemHook(item):
|
||||
if item.lang2:
|
||||
if len(item.lang2) <3:
|
||||
item.lang2 = 'ITA'
|
||||
item.contentLanguage = item.lang2
|
||||
item.title += support.typo(item.lang2, '_ [] color kod')
|
||||
return item
|
||||
|
||||
elif item.args == 'anime':# or 'anime' in item.url:
|
||||
patron = r'<div class="card-body p-0"> <a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>(?:[ ](?P<rating>\d+.\d+))?[^>]+>[^>]+>(?P<title>.+?)(?:\([sSuUbBiItTaA\-]+\))?\s?(?:(?P<year>\d{4}|\(\d{4}\)|)?)?<[^>]+>(?:<div class="genere">.+?(?:\()?(?P<lang>ITA|iTA|Sub)(?:\))?)?'
|
||||
action = 'select'
|
||||
else:
|
||||
patron = r'<div class="card-body p-0">\s?<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</div>(?:<div class="genere">(?:[ |\w]+?(?:[\dx\-]+)?[ ](?:\()?(?P<lang>[sSuUbB]+|[iItTaA]+)(?:\))?\s?(?P<quality>[\w]+)?\s?|[\s|S]?[\dx\-]+\s[|]?\s?(?:[\w]+)?\s?\(?(\4[sSuUbB]+)?\)?)?.+?</div>)?'
|
||||
action = 'episodios'
|
||||
|
||||
elif item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
patron = r'href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">[^>]+>[^>]+>[^>]+>(?:[ ](?P<rating>\d+.\d+))?[^>]+>[^>]+>(?P<title>.+?)(?:\[(?P<lang>Sub-iTA|Sub-ITA|Sub)\])?[ ]\((?P<year>\d+)\)</div>(?:<div class="genere">(?P<quality>[^<]+)<)?'
|
||||
|
||||
patronBlock = r'<h1(?: style="color: #2C3549 !important; text-transform: uppercase;"| style="text-transform: uppercase; color: #2C3549 !important;"| style="color: #2C3549 !important; text-transform: uppercase;" style="text-shadow: 1px 1px 1px #FF8C00; color:#FF8C00;"| style="text-shadow: 1px 1px 1px #0f0f0f;" class="darkorange"| style="color:#2C3549 !important;")>.+?</h1>(?P<block>.*?)<div class=(?:"container"|"bg-dark ")>'
|
||||
|
||||
patronNext = '<a class="next page-numbers".*?href="([^"]+)">'
|
||||
|
||||
## debug = True # True per testare le regex sul sito
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log(item)
|
||||
#support.dbg()
|
||||
|
||||
data = item.data1
|
||||
if item.args == 'anime':
|
||||
item.contentType = 'tvshow'
|
||||
blacklist = ['Clipwatching', 'Verystream', 'Easybytez']
|
||||
patron = r'(?:href="[ ]?(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)<|(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(\4[^<]+)(\2.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>))'
|
||||
#patron = r'<a target=.+?href="(?P<url>[^"]+)"[^>]+>(?P<title>(Epis|).+?(?P<episode>\d+)?)(?:\((?P<lang>Sub ITA)\))?</a>(?:<br />)?'
|
||||
patronBlock = r'(?:class="txt_dow">Streaming:(?P<block>.*?)at-below-post)'
|
||||
else:
|
||||
patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?[ ]?(?:(?P<title>[^<]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)'
|
||||
## patron = r'<a target=.+?href="(?P<url>[^"]+)"[^>]+>(?P<title>Epis.+?(\d+)?)(?:\((?P<lang>Sub ITA)\))?</a><br />'
|
||||
patronBlock = r'<p><strong>(?P<block>(?:.+?[Ss]tagione.+?(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?(?:|.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
action = 'findvideos'
|
||||
|
||||
debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log(item)
|
||||
#support.dbg()
|
||||
|
||||
action = 'peliculas'
|
||||
#blacklist = ['']
|
||||
patron = r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
|
||||
|
||||
return locals()
|
||||
|
||||
############## Fine ordine obbligato
|
||||
## Def ulteriori
|
||||
|
||||
def select(item):
|
||||
support.log('select --->', item)
|
||||
#support.dbg()
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
block = scrapertoolsV2.find_single_match(data, r'<div class="col-md-8 bg-white rounded-left p-5"><div>(.*?)<div style="margin-left: 0.5%; color: #FFF;">')
|
||||
if re.findall('rel="category tag">serie', data, re.IGNORECASE):
|
||||
support.log('select = ### è una serie ###')
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
args='serie',
|
||||
contentType='tvshow',
|
||||
data1 = data
|
||||
))
|
||||
elif re.findall('rel="category tag">anime', data, re.IGNORECASE):
|
||||
if re.findall('episodio', block, re.IGNORECASE) or re.findall('stagione', data, re.IGNORECASE) or re.findall('numero stagioni', data, re.IGNORECASE):
|
||||
support.log('select = ### è un anime ###')
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
args='anime',
|
||||
contentType='tvshow',
|
||||
data1 = data
|
||||
))
|
||||
else:
|
||||
support.log('select = ### è un film ###')
|
||||
return findvideos(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
args = '',
|
||||
contentType='movie',
|
||||
#data = data
|
||||
))
|
||||
else:
|
||||
support.log('select = ### è un film ###')
|
||||
return findvideos(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
contentType='movie',
|
||||
#data = data
|
||||
))
|
||||
|
||||
############## Fondo Pagina
|
||||
# da adattare al canale
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/?s=" + text
|
||||
item.contentType = item.contentType
|
||||
try:
|
||||
item.args = 'search'
|
||||
item.contentType = 'episode' # non fa uscire le voci nel context menu
|
||||
return peliculas(item)
|
||||
# Se captura la excepcion, para no interrumpir al buscador global si un canal falla
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('search log:', line)
|
||||
return []
|
||||
|
||||
|
||||
# da adattare al canale
|
||||
# inserire newest solo se il sito ha la pagina con le ultime novità/aggiunte
|
||||
# altrimenti NON inserirlo
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host+'/category/film/'
|
||||
item.contentType = 'movie'
|
||||
## item.action = 'peliculas'
|
||||
## itemlist = peliculas(item)
|
||||
elif categoria == 'series':
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'update'
|
||||
item.url = host+'/aggiornamenti-serie-tv/'
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('newest log: ', {0}.format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
#support.server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=True)
|
||||
def findvideos(item):
|
||||
support.log('findvideos ->', item)
|
||||
#return support.server(item, headers=headers)
|
||||
support.log(item)
|
||||
if item.contentType == 'movie':
|
||||
return support.server(item)
|
||||
else:
|
||||
return support.server(item, data= item.url)
|
||||
@@ -27,14 +27,12 @@ def findhost():
|
||||
host = scrapertoolsV2.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
findhost()
|
||||
|
||||
list_servers = ['verystream','openload','rapidvideo','streamango']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
findhost()
|
||||
film = [
|
||||
('Al Cinema', ['/cinema/', 'peliculas', 'pellicola']),
|
||||
('Ultimi Aggiornati-Aggiunti', ['','peliculas', 'update']),
|
||||
@@ -49,6 +47,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log('peliculas',item)
|
||||
findhost()
|
||||
## deflang = 'ITA'
|
||||
action="findvideos"
|
||||
|
||||
@@ -73,7 +72,7 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log('genres',item)
|
||||
|
||||
|
||||
if item.args != 'orderalf': action = "peliculas"
|
||||
else: action = 'orderalf'
|
||||
|
||||
@@ -94,7 +93,7 @@ def genres(item):
|
||||
@support.scrape
|
||||
def orderalf(item):
|
||||
support.log('orderalf',item)
|
||||
|
||||
|
||||
action= 'findvideos'
|
||||
patron = r'<td class="mlnh-thumb"><a href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
'.+?[^>]+>[^>]+ [^>]+[^>]+ [^>]+>(?P<title>[^<]+).*?[^>]+>(?P<year>\d{4})<'\
|
||||
@@ -106,7 +105,8 @@ def orderalf(item):
|
||||
|
||||
def search(item, text):
|
||||
support.log(item, text)
|
||||
|
||||
findhost()
|
||||
|
||||
itemlist = []
|
||||
text = text.replace(" ", "+")
|
||||
item.url = host + "/index.php?do=search&story=%s&subaction=search" % (text)
|
||||
@@ -122,6 +122,7 @@ def search(item, text):
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
"id": "altadefinizionehd",
|
||||
"name": "AltadefinizioneHD",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png",
|
||||
"bannermenu": "https://altadefinizione.doctor/wp-content/uploads/2019/02/logo.png",
|
||||
"categories": ["tvshow","movie"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in Ricerca Globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "1", "3", "5", "10" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Altadefinizione HD
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
from channelselector import thumb
|
||||
from core import httptools, scrapertools, servertools, tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
__channel__ = 'altadefinizionehd'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['openload']
|
||||
list_quality = ['default']
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("[altadefinizionehd.py] mainlist")
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="video",
|
||||
title="[B]Film[/B]",
|
||||
url=host + '/movies/',
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="menu",
|
||||
title="[B] > Film per Genere[/B]",
|
||||
url=host,
|
||||
extra='GENERE',
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="menu",
|
||||
title="[B] > Film per Anno[/B]",
|
||||
url=host,
|
||||
extra='ANNO',
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="video",
|
||||
title="Film Sub-Ita",
|
||||
url=host + "/genre/sub-ita/",
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="video",
|
||||
title="Film Rip",
|
||||
url=host + "/genre/dvdrip-bdrip-brrip/",
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="video",
|
||||
title="Film al Cinema",
|
||||
url=host + "/genre/cinema/",
|
||||
thumbnail=NovitaThumbnail,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="search",
|
||||
extra="movie",
|
||||
title="[COLOR blue]Cerca Film...[/COLOR]",
|
||||
thumbnail=CercaThumbnail,
|
||||
fanart=FilmFanart)]
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
itemlist = thumb(itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def menu(item):
|
||||
logger.info("[altadefinizionehd.py] menu")
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
logger.info("[altadefinizionehd.py] DATA"+data)
|
||||
patron = r'<li id="menu.*?><a href="#">FILM PER ' + item.extra + r'<\/a><ul class="sub-menu">(.*?)<\/ul>'
|
||||
logger.info("[altadefinizionehd.py] BLOCK"+patron)
|
||||
block = scrapertools.find_single_match(data, patron)
|
||||
logger.info("[altadefinizionehd.py] BLOCK"+block)
|
||||
patron = r'<li id=[^>]+><a href="(.*?)">(.*?)<\/a><\/li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
for url, title in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title=title,
|
||||
url=url))
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("[altadefinizionehd.py] newest" + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "peliculas":
|
||||
item.url = host
|
||||
item.action = "video"
|
||||
itemlist = video(item)
|
||||
|
||||
if itemlist[-1].action == "video":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def video(item):
|
||||
logger.info("[altadefinizionehd.py] video")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
logger.info("[altadefinizionehd.py] Data" +data)
|
||||
if 'archive-content' in data:
|
||||
regex = r'<div id="archive-content".*?>(.*?)<div class="pagination'
|
||||
else:
|
||||
regex = r'<div class="items".*?>(.*?)<div class="pagination'
|
||||
block = scrapertools.find_single_match(data, regex)
|
||||
logger.info("[altadefinizionehd.py] Block" +block)
|
||||
|
||||
patron = r'<article .*?class="item movies">.*?<img src="([^"]+)".*?<span class="quality">(.*?)<\/span>.*?<a href="([^"]+)">.*?<h4>([^<]+)<\/h4>(.*?)<\/article>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for scrapedthumb, scrapedquality, scrapedurl, scrapedtitle, scrapedinfo in matches:
|
||||
title = scrapedtitle + " [" + scrapedquality + "]"
|
||||
|
||||
patron = r'IMDb: (.*?)<\/span> <span>(.*?)<\/span>.*?"texto">(.*?)<\/div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(scrapedinfo)
|
||||
logger.info("[altadefinizionehd.py] MATCHES" + str(matches))
|
||||
for rating, year, plot in matches:
|
||||
|
||||
infoLabels = {}
|
||||
infoLabels['Year'] = year
|
||||
infoLabels['Rating'] = rating
|
||||
infoLabels['Plot'] = plot
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType="movie",
|
||||
title=title,
|
||||
fulltitle=scrapedtitle,
|
||||
infoLabels=infoLabels,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumb))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
patron = '<a class='+ "'arrow_pag'" + ' href="([^"]+)"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="video",
|
||||
title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=next_page,
|
||||
thumbnail=thumb()))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[altadefinizionehd.py] init texto=[" + texto + "]")
|
||||
item.url = host + "/?s=" + texto
|
||||
return search_page(item)
|
||||
|
||||
def search_page(item):
|
||||
itemlist = []
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'<img src="([^"]+)".*?.*?<a href="([^"]+)">(.*?)<\/a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumbnail, scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
patron = '<a class='+ "'arrow_pag'" + ' href="([^"]+)"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="search_page",
|
||||
title="[COLOR blue]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=next_page,
|
||||
thumbnail=thumb()))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = r"<li id='player-.*?'.*?class='dooplay_player_option'\sdata-type='(.*?)'\sdata-post='(.*?)'\sdata-nume='(.*?)'>.*?'title'>(.*?)</"
|
||||
matches = re.compile(patron, re.IGNORECASE).findall(data)
|
||||
|
||||
itemlist = []
|
||||
|
||||
for scrapedtype, scrapedpost, scrapednume, scrapedtitle in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
fulltitle=item.title + " [" + scrapedtitle + "]",
|
||||
show=scrapedtitle,
|
||||
title=item.title + " [COLOR blue][" + scrapedtitle + "][/COLOR]",
|
||||
url=host + "/wp-admin/admin-ajax.php",
|
||||
post=scrapedpost,
|
||||
server=scrapedtitle,
|
||||
nume=scrapednume,
|
||||
type=scrapedtype,
|
||||
extra=item.extra,
|
||||
folder=True))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
def play(item):
|
||||
import urllib
|
||||
payload = urllib.urlencode({'action': 'doo_player_ajax', 'post': item.post, 'nume': item.nume, 'type': item.type})
|
||||
data = httptools.downloadpage(item.url, post=payload).data
|
||||
|
||||
patron = r"<iframe.*src='(([^']+))'\s"
|
||||
matches = re.compile(patron, re.IGNORECASE).findall(data)
|
||||
|
||||
url = matches[0][0]
|
||||
url = url.strip()
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
NovitaThumbnail = "https://superrepo.org/static/images/icons/original/xplugin.video.moviereleases.png.pagespeed.ic.j4bhi0Vp3d.png"
|
||||
GenereThumbnail = "https://farm8.staticflickr.com/7562/15516589868_13689936d0_o.png"
|
||||
FilmFanart = "https://superrepo.org/static/images/fanart/original/script.artwork.downloader.jpg"
|
||||
CercaThumbnail = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"
|
||||
CercaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg"
|
||||
ListTxt = "[COLOR orange]Torna a video principale [/COLOR]"
|
||||
AvantiTxt = config.get_localized_string(30992)
|
||||
AvantiImg = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"
|
||||
thumbnail = "http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"
|
||||
@@ -1,36 +1,11 @@
|
||||
{
|
||||
"id": "animetubeita",
|
||||
"name": "Animetubeita",
|
||||
"name": "AnimeTubeITA",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "http:\/\/i.imgur.com\/rQPx1iQ.png",
|
||||
"bannermenu": "http:\/\/i.imgur.com\/rQPx1iQ.png",
|
||||
"categories": ["anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
"language": ["sub-ita"],
|
||||
"thumbnail": "animetubeita.png",
|
||||
"bannermenu": "animetubeita.png",
|
||||
"categories": ["anime","vos"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+110
-336
@@ -1,364 +1,138 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# ----------------------------------------------------------
|
||||
# Canale per animetubeita
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import httptools, scrapertools, tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from core import support
|
||||
|
||||
__channel__ = "animetubeita"
|
||||
host = config.get_channel_url(__channel__)
|
||||
hostlista = host + "/lista-anime/"
|
||||
hostgeneri = host + "/generi/"
|
||||
hostcorso = host + "/category/serie-in-corso/"
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
log("animetubeita", "mainlist", item.channel)
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="lista_home",
|
||||
title="[COLOR azure]Home[/COLOR]",
|
||||
url=host,
|
||||
thumbnail=AnimeThumbnail,
|
||||
fanart=AnimeFanart),
|
||||
# Item(channel=item.channel,
|
||||
# action="lista_anime",
|
||||
# title="[COLOR azure]A-Z[/COLOR]",
|
||||
# url=hostlista,
|
||||
# thumbnail=AnimeThumbnail,
|
||||
# fanart=AnimeFanart),
|
||||
Item(channel=item.channel,
|
||||
action="lista_genere",
|
||||
title="[COLOR azure]Genere[/COLOR]",
|
||||
url=hostgeneri,
|
||||
thumbnail=CategoriaThumbnail,
|
||||
fanart=CategoriaFanart),
|
||||
Item(channel=item.channel,
|
||||
action="lista_in_corso",
|
||||
title="[COLOR azure]Serie in Corso[/COLOR]",
|
||||
url=hostcorso,
|
||||
thumbnail=CategoriaThumbnail,
|
||||
fanart=CategoriaFanart),
|
||||
Item(channel=item.channel,
|
||||
action="search",
|
||||
title="[COLOR lime]Cerca...[/COLOR]",
|
||||
url=host + "/?s=",
|
||||
thumbnail=CercaThumbnail,
|
||||
fanart=CercaFanart)]
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def lista_home(item):
|
||||
log("animetubeita", "lista_home", item.channel)
|
||||
|
||||
itemlist = []
|
||||
|
||||
patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title=".*?">.*?<img.*?src="(.*?)".*?<strong>Titolo</strong></td>.*?<td>(.*?)</td>.*?<td><strong>Trama</strong></td>.*?<td>(.*?)</'
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in scrapedAll(item.url, patron):
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
title = title.split("Sub")[0]
|
||||
fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title)
|
||||
scrapedplot = scrapertools.decodeHtmlentities(scrapedplot)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="dl_s",
|
||||
contentType="tvshow",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
fulltitle=fulltitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fanart=scrapedthumbnail,
|
||||
show=fulltitle,
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
# ===========================================================
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<link rel="next" href="(.*?)"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="lista_home",
|
||||
title=AvantiTxt,
|
||||
url=next_page,
|
||||
thumbnail=AvantiImg,
|
||||
folder=True))
|
||||
# ===========================================================
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
# def lista_anime(item):
|
||||
# log("animetubeita", "lista_anime", item.channel)
|
||||
|
||||
# itemlist = []
|
||||
|
||||
# patron = '<li.*?class="page_.*?href="(.*?)">(.*?)</a></li>'
|
||||
# for scrapedurl, scrapedtitle in scrapedAll(item.url, patron):
|
||||
# title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
# title = title.split("Sub")[0]
|
||||
# log("url:[" + scrapedurl + "] scrapedtitle:[" + title + "]")
|
||||
# itemlist.append(
|
||||
# Item(channel=item.channel,
|
||||
# action="dettaglio",
|
||||
# contentType="tvshow",
|
||||
# title="[COLOR azure]" + title + "[/COLOR]",
|
||||
# url=scrapedurl,
|
||||
# show=title,
|
||||
# thumbnail="",
|
||||
# fanart=""))
|
||||
|
||||
# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# return itemlist
|
||||
|
||||
|
||||
|
||||
def lista_genere(item):
|
||||
log("lista_anime_genere", "lista_genere", item.channel)
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
bloque = scrapertools.find_single_match(data,
|
||||
'<div class="hentry page post-1 odd author-admin clear-block">(.*?)<div id="disqus_thread">')
|
||||
|
||||
patron = '<li class="cat-item cat-item.*?"><a href="(.*?)" >(.*?)</a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="lista_generi",
|
||||
title='[COLOR lightsalmon][B]' + scrapedtitle + '[/B][/COLOR]',
|
||||
url=scrapedurl,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
thumbnail=item.thumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def lista_generi(item):
|
||||
log("animetubeita", "lista_generi", item.channel)
|
||||
|
||||
itemlist = []
|
||||
patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title=".*?">.*?<img.*?src="(.*?)".*?<strong>Titolo</strong></td>.*?<td>(.*?)</td>.*?<td><strong>Trama</strong></td>.*?<td>(.*?)</'
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scrapedplot in scrapedAll(item.url, patron):
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
title = title.split("Sub")[0]
|
||||
fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title)
|
||||
scrapedplot = scrapertools.decodeHtmlentities(scrapedplot)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="dettaglio",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
contentType="tvshow",
|
||||
fulltitle=fulltitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
show=fulltitle,
|
||||
fanart=scrapedthumbnail,
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
# ===========================================================
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<link rel="next" href="(.*?)"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="lista_generi",
|
||||
title=AvantiTxt,
|
||||
url=next_page,
|
||||
thumbnail=AvantiImg,
|
||||
folder=True))
|
||||
# ===========================================================
|
||||
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def lista_in_corso(item):
|
||||
log("animetubeita", "lista_home", item.channel)
|
||||
|
||||
itemlist = []
|
||||
|
||||
patron = '<h2 class="title"><a href="(.*?)" rel="bookmark" title="Link.*?>(.*?)</a></h2>.*?<img.*?src="(.*?)".*?<td><strong>Trama</strong></td>.*?<td>(.*?)</td>'
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedplot in scrapedAll(item.url, patron):
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
title = title.split("Sub")[0]
|
||||
fulltitle = re.sub(r'[Ee]pisodio? \d+', '', title)
|
||||
scrapedplot = scrapertools.decodeHtmlentities(scrapedplot)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="dettaglio",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
contentType="tvshow",
|
||||
fulltitle=fulltitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
show=fulltitle,
|
||||
fanart=scrapedthumbnail,
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
# Paginazione
|
||||
# ===========================================================
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<link rel="next" href="(.*?)"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="lista_in_corso",
|
||||
title=AvantiTxt,
|
||||
url=next_page,
|
||||
thumbnail=AvantiImg,
|
||||
folder=True))
|
||||
# ===========================================================
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def dl_s(item):
|
||||
log("animetubeita", "dl_s", item.channel)
|
||||
|
||||
itemlist = []
|
||||
encontrados = set()
|
||||
|
||||
# 1
|
||||
patron = '<p><center><a.*?href="(.*?)"'
|
||||
for scrapedurl in scrapedAll(item.url, patron):
|
||||
if scrapedurl in encontrados: continue
|
||||
encontrados.add(scrapedurl)
|
||||
title = "DOWNLOAD & STREAMING"
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="dettaglio",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.thumbnail,
|
||||
plot=item.plot,
|
||||
folder=True))
|
||||
# 2
|
||||
patron = '<p><center>.*?<a.*?href="(.*?)"'
|
||||
for scrapedurl in scrapedAll(item.url, patron):
|
||||
if scrapedurl in encontrados: continue
|
||||
encontrados.add(scrapedurl)
|
||||
title = "DOWNLOAD & STREAMING"
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="dettaglio",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.thumbnail,
|
||||
plot=item.plot,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
def dettaglio(item):
|
||||
log("animetubeita", "dettaglio", item.channel)
|
||||
|
||||
itemlist = []
|
||||
headers = {'Upgrade-Insecure-Requests': '1',
|
||||
headers = {'Upgrade-Insecure-Requests': '1',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'}
|
||||
|
||||
episodio = 1
|
||||
patron = r'<a href="http:\/\/link[^a]+animetubeita[^c]+com\/[^\/]+\/[^s]+((?:stream|strm))[^p]+php(\?.*?)"'
|
||||
for phpfile, scrapedurl in scrapedAll(item.url, patron):
|
||||
title = "Episodio " + str(episodio)
|
||||
episodio += 1
|
||||
url = "%s/%s.php%s" % (host, phpfile, scrapedurl)
|
||||
headers['Referer'] = url
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
# ------------------------------------------------
|
||||
cookies = ""
|
||||
matches = re.compile('(.animetubeita.com.*?)\n', re.DOTALL).findall(config.get_cookie_data())
|
||||
for cookie in matches:
|
||||
name = cookie.split('\t')[5]
|
||||
value = cookie.split('\t')[6]
|
||||
cookies += name + "=" + value + ";"
|
||||
headers['Cookie'] = cookies[:-1]
|
||||
# ------------------------------------------------
|
||||
url = scrapertools.find_single_match(data, """<source src="([^"]+)" type='video/mp4'>""")
|
||||
url += '|' + urllib.urlencode(headers)
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="play",
|
||||
title="[COLOR azure]" + title + "[/COLOR]",
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.thumbnail,
|
||||
plot=item.plot))
|
||||
list_servers = ['directo']
|
||||
list_quality = ['default']
|
||||
|
||||
return itemlist
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
anime = [('Generi',['/generi', 'genres', 'genres']),
|
||||
('Ordine Alfabetico',['/lista-anime', 'peliculas', 'list']),
|
||||
('In Corso',['/category/serie-in-corso/', 'peliculas', 'in_progress'])
|
||||
]
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
blacklist = ['Ultimi Episodi', 'Serie in Corso']
|
||||
patronMenu = r'<li[^>]+><a href="(?P<url>[^"]+)" >(?P<title>[^<]+)</a>'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
log("animetubeita", "search", item.channel)
|
||||
item.url = item.url + texto
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
item.url = host + '/lista-anime'
|
||||
item.args = 'list'
|
||||
item.search = text
|
||||
try:
|
||||
return lista_home(item)
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
def scrapedAll(url="", patron=""):
|
||||
matches = []
|
||||
data = httptools.downloadpage(url).data
|
||||
MyPatron = patron
|
||||
matches = re.compile(MyPatron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
return matches
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
item = support.Item()
|
||||
try:
|
||||
if categoria == "anime":
|
||||
item.contentType='tvshow'
|
||||
item.url = host
|
||||
item.args = "last"
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
anime = True
|
||||
if not item.search: pagination = ''
|
||||
action = 'episodios'
|
||||
|
||||
def scrapedSingle(url="", single="", patron=""):
|
||||
matches = []
|
||||
data = httptools.downloadpage(url).data
|
||||
elemento = scrapertools.find_single_match(data, single)
|
||||
matches = re.compile(patron, re.DOTALL).findall(elemento)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
return matches
|
||||
if item.args == 'list':
|
||||
search = item.search
|
||||
patronBlock = r'<ul class="page-list ">(?P<block>.*?)<div class="wprc-container'
|
||||
patron = r'<li.*?class="page_.*?href="(?P<url>[^"]+)">(?P<title>.*?) Sub Ita'
|
||||
elif item.args == 'last':
|
||||
action = 'findvideos'
|
||||
item.contentType='episode'
|
||||
patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar'
|
||||
patron = r'<h2 class="title"><a href="(?P<url>[^"]+)" [^>]+>.*?<img.*?src="(?P<thumb>[^"]+)".*?<strong>Titolo</strong></td>.*?<td>(?P<title>.*?)\s*Episodio\s*(?P<episode>\d+)[^<]+</td>.*?<td><strong>Trama</strong></td>\s*<td>(?P<plot>[^<]+)<'
|
||||
elif item.args in ['in_progress','genres']:
|
||||
patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar'
|
||||
patron = r'<h2 class="title"><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)\s* Sub Ita[^<]+</a></h2>.*?<img.*?src="(?P<thumb>.*?)".*?<td><strong>Trama</strong></td>.*?<td>(?P<plot>[^<]+)<'
|
||||
patronNext = r'href="([^"]+)" >»'
|
||||
else:
|
||||
patronBlock = r'<div class="blocks">(?P<block>.*?)<div id="sidebar'
|
||||
patron = r'<img.*?src="(?P<thumb>[^"]+)".*?<strong>Titolo</strong></td>.*?<td>\s*(?P<title>.*?)\s*Episodio[^<]+</td>.*?<td><strong>Trama</strong></td>\s*<td>(?P<plot>[^<]+)<.*?<a.*?href="(?P<url>[^"]+)"'
|
||||
patronNext = r'href="([^"]+)" >»'
|
||||
return locals()
|
||||
|
||||
|
||||
|
||||
def log(funzione="", stringa="", canale=""):
|
||||
logger.debug("[" + canale + "].[" + funzione + "] " + stringa)
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock = r'<h6>Episodio</h6>(?P<block>.*?)(?:<!--|</table>)'
|
||||
patron = r'<strong>(?P<title>[^<]+)</strong>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="http://link\.animetubeita\.com/2361078/(?P<url>[^"]+)"'
|
||||
action = 'findvideos'
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist=[]
|
||||
if item.args == 'last':
|
||||
match = support.match(item, r'href="(?P<url>[^"]+)"[^>]+><strong>DOWNLOAD & STREAMING</strong>', url=item.url)[0]
|
||||
if match:
|
||||
patronBlock = r'<h6>Episodio</h6>(?P<block>.*?)(?:<!--|</table>)'
|
||||
patron = r'<a href="http://link\.animetubeita\.com/2361078/(?P<url>[^"]+)"'
|
||||
match = support.match(item, patron, patronBlock, headers, match[0])[0]
|
||||
else: return itemlist
|
||||
|
||||
AnimeThumbnail = "http://img15.deviantart.net/f81c/i/2011/173/7/6/cursed_candies_anime_poster_by_careko-d3jnzg9.jpg"
|
||||
AnimeFanart = "http://www.animetubeita.com/wp-content/uploads/21407_anime_scenery.jpg"
|
||||
CategoriaThumbnail = "http://static.europosters.cz/image/750/poster/street-fighter-anime-i4817.jpg"
|
||||
CategoriaFanart = "http://www.animetubeita.com/wp-content/uploads/21407_anime_scenery.jpg"
|
||||
CercaThumbnail = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"
|
||||
CercaFanart = "https://i.ytimg.com/vi/IAlbvyBdYdY/maxresdefault.jpg"
|
||||
AvantiTxt = config.get_localized_string(30992)
|
||||
AvantiImg = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"
|
||||
if match: item.url = match[-1]
|
||||
else: return itemlist
|
||||
data = support.httptools.downloadpage(item.url, headers=headers).data
|
||||
cookies = ""
|
||||
matches = re.compile('(.animetubeita.com.*?)\n', re.DOTALL).findall(support.config.get_cookie_data())
|
||||
for cookie in matches:
|
||||
name = cookie.split('\t')[5]
|
||||
value = cookie.split('\t')[6]
|
||||
cookies += name + "=" + value + ";"
|
||||
|
||||
headers['Referer'] = item.url
|
||||
headers['Cookie'] = cookies[:-1]
|
||||
|
||||
url = support.scrapertoolsV2.find_single_match(data, """<source src="([^"]+)" type='video/mp4'>""")
|
||||
if not url: url = support.scrapertoolsV2.find_single_match(data, 'file: "([^"]+)"')
|
||||
if url:
|
||||
url += '|' + urllib.urlencode(headers)
|
||||
itemlist.append(
|
||||
support.Item(channel=item.channel,
|
||||
action="play",
|
||||
title='diretto',
|
||||
server='directo',
|
||||
quality='',
|
||||
url=url,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show,
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
@@ -1,22 +1,15 @@
|
||||
{
|
||||
"id": "bleachportal",
|
||||
"name": "BleachPortal",
|
||||
"language": ["ita"],
|
||||
"language": ["sub-ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"fanart": "http://i39.tinypic.com/35ibvcx.jpg",
|
||||
"thumbnail": "http://www.bleachportal.it/images/index_r1_c1.jpg",
|
||||
"banner": "http://cgi.di.uoa.gr/~std05181/images/bleach.jpg",
|
||||
"deprecated": true,
|
||||
"adult": false,
|
||||
"fanart": "https://www.thetvdb.com/banners/fanart/original/74796-29.jpg",
|
||||
"thumbnail": "bleachportal.png",
|
||||
"banner": "bleachportal.png",
|
||||
"categories": ["anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Incluir en busqueda global",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
"not_active":["include_in_newests", "include_in_global_search"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
|
||||
+17
-14
@@ -11,6 +11,7 @@ from core import scrapertools, httptools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
from core import support
|
||||
|
||||
host = "http://www.bleachportal.it"
|
||||
|
||||
@@ -19,17 +20,19 @@ def mainlist(item):
|
||||
logger.info("[BleachPortal.py]==> mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="episodi",
|
||||
title="[COLOR azure] Bleach [/COLOR] - [COLOR deepskyblue]Lista Episodi[/COLOR]",
|
||||
title= support.typo('Bleach','bold'),
|
||||
url=host + "/streaming/bleach/stream_bleach.htm",
|
||||
thumbnail="http://i45.tinypic.com/286xp3m.jpg",
|
||||
fanart="http://i40.tinypic.com/5jsinb.jpg",
|
||||
thumbnail="https://www.thetvdb.com/banners/posters/74796-14.jpg",
|
||||
banner="https://www.thetvdb.com/banners/graphical/74796-g6.jpg",
|
||||
fanart="https://www.thetvdb.com/banners/fanart/original/74796-30.jpg",
|
||||
extra="bleach"),
|
||||
Item(channel=item.channel,
|
||||
action="episodi",
|
||||
title="[COLOR azure] D.Gray Man [/COLOR] - [COLOR deepskyblue]Lista Episodi[/COLOR]",
|
||||
title=support.typo('D.Gray Man','bold'),
|
||||
url=host + "/streaming/d.gray-man/stream_dgray-man.htm",
|
||||
thumbnail="http://i59.tinypic.com/9is3tf.jpg",
|
||||
fanart="http://wallpapercraft.net/wp-content/uploads/2016/11/Cool-D-Gray-Man-Background.jpg",
|
||||
thumbnail="https://www.thetvdb.com/banners/posters/79635-1.jpg",
|
||||
banner="https://www.thetvdb.com/banners/graphical/79635-g4.jpg",
|
||||
fanart="https://www.thetvdb.com/banners/fanart/original/79635-6.jpg",
|
||||
extra="dgrayman")]
|
||||
|
||||
return itemlist
|
||||
@@ -40,7 +43,7 @@ def episodi(item):
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">\D+([\d\-]+)\s?<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">\D+([\d\-]+)\s?<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
animetitle = "Bleach" if item.extra == "bleach" else "D.Gray Man"
|
||||
@@ -49,19 +52,19 @@ def episodi(item):
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title="[COLOR azure]%s Ep: [COLOR deepskyblue]%s[/COLOR][/COLOR]" % (animetitle, scrapednumber),
|
||||
title=support.typo("%s Episodio %s" % (animetitle, scrapednumber),'bold'),
|
||||
url=item.url.replace("stream_bleach.htm",scrapedurl) if "stream_bleach.htm" in item.url else item.url.replace("stream_dgray-man.htm", scrapedurl),
|
||||
plot=scrapedtitle,
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
fulltitle="[COLOR red]%s Ep: %s[/COLOR] | [COLOR deepskyblue]%s[/COLOR]" % (animetitle, scrapednumber, scrapedtitle)))
|
||||
fulltitle="%s Ep: %s | %s" % (animetitle, scrapednumber, scrapedtitle)))
|
||||
|
||||
if item.extra == "bleach":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="oav",
|
||||
title="[B][COLOR azure] OAV e Movies [/COLOR][/B]",
|
||||
title=support.typo("OAV e Movies",'bold color kod'),
|
||||
url=item.url.replace("stream_bleach.htm", "stream_bleach_movie_oav.htm"),
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
@@ -75,19 +78,19 @@ def oav(item):
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = '<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">-\s+(.*?)<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">-\s+(.*?)<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapednumber, scrapedtitle, scrapedurl in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title="[COLOR deepskyblue] " + scrapednumber + " [/COLOR]",
|
||||
title=support.typo(scrapednumber, 'bold'),
|
||||
url=item.url.replace("stream_bleach_movie_oav.htm", scrapedurl),
|
||||
plot=scrapedtitle,
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle="[COLOR red]" + scrapednumber + "[/COLOR] | [COLOR deepskyblue]" + scrapedtitle + "[/COLOR]"))
|
||||
fulltitle=scrapednumber + " | " + scrapedtitle))
|
||||
|
||||
return list(reversed(itemlist))
|
||||
|
||||
@@ -109,7 +112,7 @@ def findvideos(item):
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
title="[[COLOR orange]Diretto[/COLOR]] [B]%s[/B]" % item.title,
|
||||
title="Diretto %s" % item.title,
|
||||
url=item.url.replace(item.url.split("/")[-1], "/" + video),
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle))
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png",
|
||||
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/casacinema.png",
|
||||
"thumbnail": "casacinema.png",
|
||||
"banner": "casacinema.png",
|
||||
"categories": ["tvshow", "movie","vos"],
|
||||
"settings": [
|
||||
]
|
||||
|
||||
@@ -32,7 +32,7 @@ def findhost():
|
||||
headers = [['Referer', host]]
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
findhost()
|
||||
|
||||
|
||||
list_servers = ['supervideo', 'streamcherry','rapidvideo', 'streamango', 'openload']
|
||||
list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD']
|
||||
@@ -40,7 +40,7 @@ list_quality = ['default', 'HD', '3D', '4K', 'DVD', 'SD']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log(item)
|
||||
|
||||
findhost()
|
||||
film = ['',
|
||||
('Al Cinema', ['/category/in-sala/', 'peliculas', '']),
|
||||
('Novità', ['/category/nuove-uscite/', 'peliculas', '']),
|
||||
@@ -55,7 +55,8 @@ def mainlist(item):
|
||||
def peliculas(item):
|
||||
support.log(item)
|
||||
#support.dbg() # decommentare per attivare web_pdb
|
||||
|
||||
#findhost()
|
||||
|
||||
blacklist = ['']
|
||||
if item.args != 'search':
|
||||
patron = r'<div class="col-mt-5 postsh">[^<>]+<div class="poster-media-card">[^<>]+<a href="(?P<url>[^"]+)" title="(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?".*?<img(?:.+?)?src="(?P<thumb>[^"]+)"'
|
||||
@@ -66,6 +67,7 @@ def peliculas(item):
|
||||
|
||||
patronNext = '<a href="([^"]+)"\s+?><i class="glyphicon glyphicon-chevron-right"'
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@@ -86,6 +88,7 @@ def genres(item):
|
||||
|
||||
def search(item, text):
|
||||
support.log('search', item)
|
||||
findhost()
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.args = 'search'
|
||||
@@ -101,8 +104,10 @@ def search(item, text):
|
||||
|
||||
def newest(categoria):
|
||||
support.log('newest ->', categoria)
|
||||
findhost()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.url = host
|
||||
|
||||
@@ -200,7 +200,7 @@ def findvideos(item):
|
||||
def findvid_serie(item):
|
||||
def load_vid_series(html, item, itemlist, blktxt):
|
||||
logger.info('HTML' + html)
|
||||
patron = '<a href="([^"]+)"[^=]+="_blank"[^>]+>(.*?)</a>'
|
||||
patron = r'<a href="([^"]+)"[^=]+="_blank"[^>]+>(?!<!--)(.*?)</a>'
|
||||
# Estrae i contenuti
|
||||
matches = re.compile(patron, re.DOTALL).finditer(html)
|
||||
for match in matches:
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://www.cinemalibero.center/wp-content/themes/Cinemalibero%202.0/images/logo02.png",
|
||||
"banner": "https://www.cinemalibero.center/wp-content/themes/Cinemalibero%202.0/images/logo02.png",
|
||||
"thumbnail": "cinemalibero.png",
|
||||
"banner": "cinemalibero.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
|
||||
@@ -133,7 +133,7 @@ def episodios(item): # Questa def. deve sempre essere nominata episodios
|
||||
url=item.url,
|
||||
show=item.fulltitle,
|
||||
contentType='movie'))
|
||||
debug = True
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
@@ -157,7 +157,7 @@ def select(item):
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
contentSerieName = fulltitle,
|
||||
contentSerieName = item.fulltitle,
|
||||
url=item.url,
|
||||
extra='serie',
|
||||
contentType='episode'))
|
||||
|
||||
@@ -26,7 +26,7 @@ def findhost():
|
||||
host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
findhost()
|
||||
|
||||
|
||||
list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload']
|
||||
list_quality = ['default']
|
||||
@@ -34,13 +34,12 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
tvshow = [''
|
||||
]
|
||||
|
||||
anime = ['/category/anime-cartoni-animati/'
|
||||
]
|
||||
|
||||
mix = [
|
||||
(support.typo('Aggiornamenti Serie-Anime', 'bullet bold'), ['/aggiornamento-episodi/', 'peliculas', 'newest']),
|
||||
(support.typo('Archivio Serie-Anime', 'bullet bold'), ['/category/serie-tv-archive/', 'peliculas'])
|
||||
@@ -53,7 +52,7 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
|
||||
#findhost()
|
||||
action = 'episodios'
|
||||
if item.args == 'newest':
|
||||
#patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?).[^–][\s]?<a href="(?P<url>[^"]+)"\s+target="_blank">(?P<episode>\d+x\d+-\d+|\d+x\d+) (?P<title2>.*?)[ ]?(?:|\((?P<lang>SUB ITA)\))?</a>'
|
||||
@@ -62,13 +61,14 @@ def peliculas(item):
|
||||
else:
|
||||
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
||||
patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
||||
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log("episodios: %s" % item)
|
||||
#findhost()
|
||||
|
||||
action = 'findvideos'
|
||||
item.contentType = 'tvshow'
|
||||
@@ -76,7 +76,8 @@ def episodios(item):
|
||||
data1 = pagina(item.url)
|
||||
data1 = re.sub('\n|\t', ' ', data1)
|
||||
data = re.sub(r'>\s+<', '> <', data1)
|
||||
patronBlock = r'(?P<block>STAGIONE\s\d+ (.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
||||
#patronBlock = r'(?P<block>STAGIONE\s\d+ (.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
||||
patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
||||
#patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:–|-.+?-|â.+?â|â|.)?<a (?P<url>.*?)<br />'
|
||||
patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:â|-.+?-|âÂÂ.+?âÂÂ|âÂÂ|.)?(?:<a (?P<url>.*?))?<br />'
|
||||
|
||||
@@ -91,6 +92,7 @@ def episodios(item):
|
||||
|
||||
def pagina(url):
|
||||
support.log(url)
|
||||
#findhost()
|
||||
|
||||
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
|
||||
#support.log("DATA ----###----> ", data)
|
||||
@@ -110,6 +112,7 @@ def pagina(url):
|
||||
# =========== def ricerca =============
|
||||
def search(item, texto):
|
||||
support.log()
|
||||
findhost()
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
@@ -127,6 +130,7 @@ def search(item, texto):
|
||||
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
findhost()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
@@ -47,7 +47,7 @@ def mainlist(item):
|
||||
##
|
||||
## action = 'episodios'
|
||||
## block = r'(?P<block>.*?)<div\s+class="btn btn-lg btn-default btn-load-other-series">'
|
||||
##
|
||||
##
|
||||
## if item.args == 'ined':
|
||||
## deflang = 'SUB-ITA'
|
||||
## patronBlock = r'<span\s+class="label label-default label-title-typology">'+block
|
||||
@@ -68,7 +68,7 @@ def mainlist(item):
|
||||
## elif item.args == 'classic':
|
||||
## patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">'+block
|
||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||
## pagination = 25
|
||||
## pagination = 25
|
||||
## else:
|
||||
## patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">'+block
|
||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||
@@ -84,13 +84,13 @@ def peliculas(item):
|
||||
|
||||
action = 'episodios'
|
||||
blacklist = ['DMCA']
|
||||
|
||||
|
||||
if item.args == 'genres' or item.args == 'search':
|
||||
patronBlock = r'<h2 style="color: white !important" class="title-typology">(?P<block>.+?)<div class="container-fluid whitebg" style="">'
|
||||
patronBlock = r'<h2 style="color:\s?white !important;?" class="title-typology">(?P<block>.+?)<div class="container-fluid whitebg" style="">'
|
||||
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
||||
patronNext = r'rel="next" href="([^"]+)">'
|
||||
item.contentType = 'tvshow'
|
||||
## elif item.args == 'search':
|
||||
## elif item.args == 'search':
|
||||
## patronBlock = r'<h2 style="color:\s?white !important.?" class="title-typology">(?P<block>.*?)<div class="container-fluid whitebg" style="">'
|
||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p>'
|
||||
else:
|
||||
@@ -106,21 +106,23 @@ def peliculas(item):
|
||||
patronBlock = r'<div\s+class="container-fluid greybg title-serie-lastep title-last-ep fixed-title-wrapper containerBottomBarTitle">'+end_block
|
||||
patron = r'<a(?: rel="[^"]+")? href="(?P<url>[^"]+)"(?: class="[^"]+")?>[ ]<img class="[^"]+"[ ]title="[^"]+"[ ]alt="[^"]+"[ ](?:|meta-)?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?:\d+.\d+)[ ]\((?P<lang>[a-zA-Z\-]+)[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
|
||||
elif item.args == 'nolost':
|
||||
patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">'+end_block
|
||||
patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-danonperd">'+end_block
|
||||
## pagination = 25
|
||||
elif item.args == 'classic':
|
||||
patronBlock = r'<h2 class="title-typology styck-top" meta-class="title-serie-classiche">'+end_block
|
||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||
## pagination = 25
|
||||
## elif item.args == 'anime':
|
||||
##
|
||||
##
|
||||
else:
|
||||
patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" meta-slug="new">'+end_block
|
||||
## patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||
## pagination = 25
|
||||
#support.regexDbg(item, patron, headers)
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
@@ -132,7 +134,7 @@ def episodios(item):
|
||||
def itemHook(item):
|
||||
item.title = item.title.replace(item.fulltitle, '').replace('-','',1)
|
||||
return item
|
||||
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@@ -174,9 +176,6 @@ def newest(categoria):
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
## if itemlist[-1].action == "peliculas":
|
||||
## itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
|
||||
@@ -3,18 +3,9 @@
|
||||
"name": "IlGenioDelloStreaming",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita", "vos"],
|
||||
"thumbnail": "https://i.imgur.com/Nsa81r0.png",
|
||||
"banner": "https://i.imgur.com/Nsa81r0.png",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "ilgeniodellostreaming.png",
|
||||
"banner": "ilgeniodellostreaming.png",
|
||||
"categories": ["movie", "tvshow", "anime", "vos"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+124
-121
@@ -6,9 +6,8 @@
|
||||
|
||||
"""
|
||||
|
||||
Problemi noti che non superano il test del canale:
|
||||
NESSUNO (update 13-9-2019)
|
||||
|
||||
Alcuni video non si aprono sul sito...
|
||||
|
||||
Avvisi per il test:
|
||||
i link per le categorie non sono TUTTI visibili nella pagina del sito:
|
||||
vanno costruiti con i nomi dei generi che vedete nel CANALE.
|
||||
@@ -22,17 +21,20 @@
|
||||
genere-> televisione film
|
||||
https://ilgeniodellostreaming.se/genere/televisione-film
|
||||
|
||||
Non va abilitato per:
|
||||
Novità -> Anime
|
||||
La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019)
|
||||
Novità -> Serietv e Aggiornamenti nel canale:
|
||||
- le pagine sono di 25 titoli
|
||||
|
||||
|
||||
##### note per i dev #########
|
||||
- La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019)
|
||||
- in url: film o serietv
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
from platformcode import logger
|
||||
from core import scrapertoolsV2, httptools, tmdb, support
|
||||
from core.support import log, menu, aplay
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.support import log
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
@@ -49,136 +51,88 @@ def mainlist(item):
|
||||
support.log(item)
|
||||
|
||||
film = ['/film/',
|
||||
('Film Per Categoria',['', 'category', 'genres']),
|
||||
('Film Per Anno',['', 'category', 'year']),
|
||||
('Film Per Lettera',['/film-a-z/', 'category', 'letter']),
|
||||
('Generi',['', 'genres', 'genres']),
|
||||
('Per Lettera',['/film-a-z/', 'genres', 'letter']),
|
||||
('Anni',['', 'genres', 'year']),
|
||||
('Popolari',['/trending/?get=movies', 'peliculas', 'populared']),
|
||||
('Più Votati', ['/ratings/?get=movies', 'peliculas', 'populared'])
|
||||
]
|
||||
|
||||
tvshow = ['/serie/',
|
||||
('Nuovi Episodi', ['/aggiornamenti-serie/', 'newep', 'tvshow']),
|
||||
('TV Show', ['/tv-show/', 'peliculas', 'showtv', 'tvshow'])
|
||||
]
|
||||
|
||||
anime = ['/anime/']
|
||||
tvshow = ['/serie/',
|
||||
('Aggiornamenti', ['/aggiornamenti-serie/', 'peliculas', 'update']),
|
||||
('Popolari',['/trending/?get=tv', 'peliculas', 'populared']),
|
||||
('Più Votati', ['/ratings/?get=tv', 'peliculas', 'populared'])
|
||||
|
||||
]
|
||||
|
||||
anime = ['/anime/'
|
||||
]
|
||||
|
||||
Tvshow = [
|
||||
('Show TV', ['/tv-show/', 'peliculas', '', 'tvshow'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
log(item)
|
||||
|
||||
action='peliculas'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<div class="sidemenu"><h2>Genere</h2>(?P<block>.*?)/li></ul></div>'
|
||||
elif item.args == 'year':
|
||||
patronBlock = r'<div class="sidemenu"><h2>Anno di uscita</h2>(?P<block>.*?)/li></ul></div>'
|
||||
elif item.args == 'letter':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
patron = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
|
||||
return []
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log(item)
|
||||
## import web_pdb; web_pdb.set_trace()
|
||||
log()
|
||||
|
||||
if item.args == 'search':
|
||||
|
||||
if item.action == 'search':
|
||||
patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">'
|
||||
patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\
|
||||
'<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>[^>]+>(?P<type>[^<]+)'\
|
||||
'<\/span>.*?<a href.*?>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\
|
||||
'<\/a>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[0-9.]+)<\/span>)?'\
|
||||
'.+?(?:<span class="year">(?P<year>[0-9]+)<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>'
|
||||
type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
|
||||
## elif item.args == 'newest':
|
||||
## patronBlock = r'<div class="content"><header><h1>Aggiornamenti Serie</h1>'\
|
||||
## '</header>(?P<block>.*?)</li></ul></div></div></div>'
|
||||
## patron = r'src="(?P<thumb>[^"]+)".*?href="(?P<url>[^"]+)">[^>]+>(?P<episode>[^<]+)'\
|
||||
## '<.*?"c">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<.+?<span class='\
|
||||
## '"quality">(\5SUB-ITA|.+?)</span>'
|
||||
## type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
## type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
def itemHook(item):
|
||||
if 'film' not in item.url:
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
return item
|
||||
else:
|
||||
|
||||
elif item.args == 'letter':
|
||||
patron = r'<td class="mlnh-2"><a href="(?P<url>[^"]+)">(?P<title>.+?)'\
|
||||
'[ ]?(?:\[(?P<lang>Sub-ITA)\])?<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})\s+<'
|
||||
elif item.args == 'populared':
|
||||
patron = r'<div class="poster"><a href="(?P<url>[^"]+)"><img src='\
|
||||
'"(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> '\
|
||||
'(?P<rating>[0-9.]+)<[^>]+>[^>]+>'\
|
||||
'(?P<quality>[3]?[D]?[H]?[V]?[D]?[/]?[R]?[I]?[P]?)(?:SUB-ITA)?<'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]\[(?P<lang>Sub-ITA)\])?<'\
|
||||
'[^>]+>[^>]+>[^>]+>(?P<year>\d{4})?<'
|
||||
if item.contentType == 'movie':
|
||||
endBlock = '</article></div>'
|
||||
else:
|
||||
endBlock = '<footer class="main">'
|
||||
|
||||
elif item.args == 'showtv':
|
||||
action = 'episodios'
|
||||
patron = r'<div class="poster"><a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" '\
|
||||
'alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>(?P<title>.+?)<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})?<[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>.+?)<'
|
||||
patronBlock = r'<header><h1>.+?</h1>(?P<block>.*?)'+endBlock
|
||||
|
||||
elif item.contentType == 'movie' and item.args != 'genres':
|
||||
patronBlock = r'<header><h1>Film</h1>(?P<block>.*?)<div class="pagination">'
|
||||
patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" '\
|
||||
'alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div>'\
|
||||
'<span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?'\
|
||||
'<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\
|
||||
'<\/a>[^>]+>'\
|
||||
'[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div'
|
||||
if item.contentType == 'movie':
|
||||
if item.args == 'letter':
|
||||
patronBlock = r'<table class="table table-striped">(?P<block>.+?)</table>'
|
||||
patron = r'<img src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+><td class="mlnh-2"><a href="(?P<url>[^"]+)">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<[^>]+>[^>]+>[^>]+>(?P<year>\d{4})\s+<'
|
||||
elif item.args == 'populared':
|
||||
patron = r'<img src="(?P<thumb>[^"]+)" alt="[^"]+">[^>]+>[^>]+>[^>]+>[^>]+>\s+?(?P<rating>\d+.?\d+|\d+)<[^>]+>[^>]+>(?P<quality>[a-zA-Z\-]+)[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<[^>]+>[^>]+>[^>]+>(?P<year>\d+)<'
|
||||
else:
|
||||
|
||||
elif item.contentType == 'tvshow' or item.args == 'genres':
|
||||
action = 'episodios'
|
||||
patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img '\
|
||||
'src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> '\
|
||||
'(?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>'\
|
||||
'[^>]+>(?P<year>[^<]+)<.*?<div class="texto">(?P<plot>[^<]+)'
|
||||
|
||||
## else:
|
||||
## patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\
|
||||
## '<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>'\
|
||||
## '[^>]+>(?P<type>[^<]+)<\/span>.*?<a href.*?>(?P<title>[^<]+)'\
|
||||
## '<\/a>(?P<lang>[^>])+>[^>]+>(?:<span class="rating">IMDb\s*'\
|
||||
## '(?P<rating>[0-9.]+)<\/span>)?.*?(?:<span class="year">(?P<year>[0-9]+)'\
|
||||
## '<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>'
|
||||
#### type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
#### type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
#patron = r'<div class="poster">\s*<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div><span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div'
|
||||
patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*(?P<rating>[0-9.]+)<\/div>(?:<span class="quality">(?:SUB-ITA|)?(?P<quality>|[^<]+)?<\/span>)?[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?<\/a>[^>]+>[^>]+>(?P<year>[^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<div'
|
||||
else:
|
||||
# TVSHOW
|
||||
action = 'episodios'
|
||||
if item.args == 'update':
|
||||
action = 'findvideos'
|
||||
patron = r'<div class="poster"><img src="(?P<thumb>[^"]+)"[^>]+>[^>]+><a href="(?P<url>[^"]+)">[^>]+>(?P<episode>[\d\-x]+)[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>[^>]+>(?P<quality>[HD]+)?(?:.+?)?/span><p class="serie"'
|
||||
pagination = 25
|
||||
def itemHook(item):
|
||||
item.contentType = 'episode'
|
||||
return item
|
||||
else:
|
||||
patron = r'<div class="poster">\s?<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> (?P<rating>[0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?<[^>]+>[^>]+>[^>]+>(?P<year>[^<]+)(?:<.*?<div class="texto">(?P<plot>[^<]+))?'
|
||||
|
||||
patronNext = '<span class="current">[^<]+<[^>]+><a href="([^"]+)"'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def newep(item):
|
||||
|
||||
patron = r'<div class="poster"><img src="(?P<thumb>[^"]+)" alt="(?:.+?)[ ]?'\
|
||||
'(?:\[(?P<lang>Sub-ITA|Sub-ita)\])?">[^>]+><a href="(?P<url>[^"]+)">'\
|
||||
'[^>]+>(?P<episode>[^<]+)<[^>]+>[^>]+>[^>]+><span class="c">'\
|
||||
'(?P<title>.+?)[ ]?(?:\[Sub-ITA\]|)<'
|
||||
pagination = 10
|
||||
## debug = True
|
||||
#support.regexDbg(item, patron, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -195,35 +149,62 @@ def episodios(item):
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
log(item)
|
||||
|
||||
action='peliculas'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<div class="sidemenu"><h2>Genere</h2>(?P<block>.*?)/li></ul></div>'
|
||||
elif item.args == 'year':
|
||||
item.args = 'genres'
|
||||
patronBlock = r'<div class="sidemenu"><h2>Anno di uscita</h2>(?P<block>.*?)/li></ul></div>'
|
||||
elif item.args == 'letter':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
|
||||
patron = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
log(text)
|
||||
itemlist = []
|
||||
text = text.replace(' ', '+')
|
||||
item.url = host + "/?s=" + text
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
action = peliculas
|
||||
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film/'
|
||||
elif categoria == 'series':
|
||||
action = newep
|
||||
#item.args = 'newest'
|
||||
item.args = 'update'
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/aggiornamenti-serie/'
|
||||
## elif categoria == 'anime':
|
||||
## item.contentType = 'tvshow'
|
||||
## item.url = host + '/anime/'
|
||||
try:
|
||||
item.action = action
|
||||
itemlist = action(item)
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == action:
|
||||
itemlist.pop()
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
log("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -232,9 +213,31 @@ def newest(categoria):
|
||||
def findvideos(item):
|
||||
log()
|
||||
itemlist =[]
|
||||
|
||||
matches, data = support.match(item, '<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
|
||||
for url in matches:
|
||||
html = httptools.downloadpage(url, headers=headers).data
|
||||
data += str(scrapertoolsV2.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">'))
|
||||
|
||||
itemlist = support.server(item, data)
|
||||
|
||||
if item.args == 'update':
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">'
|
||||
series = scrapertoolsV2.find_single_match(data, patron)
|
||||
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title=goseries + titles,
|
||||
fulltitle=titles,
|
||||
show=series,
|
||||
contentType='tvshow',
|
||||
contentSerieName=series,
|
||||
url=host+"/serietv/"+series,
|
||||
action='episodios',
|
||||
contentTitle=titles,
|
||||
plot = "Vai alla Serie :" + titles + " con tutte le puntate",
|
||||
))
|
||||
return itemlist
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
"id": "italiafilmhd",
|
||||
"name": "ItaliaFilm HD",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https://italiafilm.network/wp-content/uploads/2018/06/ITALIAFILM-HD.png",
|
||||
"bannermenu": "https://italiafilm.network/wp-content/uploads/2018/06/ITALIAFILM-HD.png",
|
||||
"categories": ["movie"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero di link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "2", "5", "10", "15" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,364 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per italiafilmhd
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
import urlparse
|
||||
|
||||
from core import scrapertools, servertools, httptools, tmdb, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['verystream', 'openload', 'youtube']
|
||||
list_quality = ['default']
|
||||
|
||||
checklinks = config.get_setting('checklinks', 'italiafilmhd')
|
||||
checklinks_number = config.get_setting('checklinks_number', 'italiafilmhd')
|
||||
|
||||
__channel__ = 'italiafilmhd'
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("kod.italiafilmhd mainlist")
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Novita'[/COLOR]",
|
||||
action="fichas",
|
||||
url=host + "/cinema/",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Ultimi Film Inseriti[/COLOR]",
|
||||
action="fichas",
|
||||
url=host + "/film/",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Film per Genere[/COLOR]",
|
||||
action="genere",
|
||||
url=host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="Serie TV",
|
||||
text_color="azure",
|
||||
action="tv_series",
|
||||
url="%s/serie-tv-hd/" % host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR orange]Cerca...[/COLOR]",
|
||||
action="search",
|
||||
extra="movie",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("[italiafilmvideohd.py] newest" + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host + "/cinema/"
|
||||
item.action = "fichas"
|
||||
itemlist = fichas(item)
|
||||
|
||||
if itemlist[-1].action == "fichas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[italiafilmvideohd.py] " + item.url + " search " + texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
|
||||
try:
|
||||
return fichas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def genere(item):
|
||||
logger.info("[italiafilmvideohd.py] genere")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = '<div class="sub_title">Genere</div>(.+?)</div>'
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '<li>.*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += '<i>([^"]+)</i>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.replace('&', '-')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def fichas(item):
|
||||
logger.info("[italiafilmvideohd.py] fichas")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# fix - calidad
|
||||
|
||||
patron = '<li class="item">.*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)".*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scraped_2, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedurl = scraped_2
|
||||
|
||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
# title += " (" + scrapedcalidad + ")
|
||||
|
||||
# ------------------------------------------------
|
||||
scrapedthumbnail = httptools.get_url_headers(scrapedthumbnail)
|
||||
# ------------------------------------------------
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType="movie",
|
||||
title=title,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=title,
|
||||
show=scrapedtitle))
|
||||
|
||||
# Paginación
|
||||
next_page = scrapertools.find_single_match(data, '<a href="([^"]+)"\s*><span aria-hidden="true">»')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=next_page,
|
||||
text_color="orange",
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def tv_series(item):
|
||||
logger.info("[italiafilmvideohd.py] tv_series")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
blocco = scrapertools.find_single_match(data, r'<ul class="list_mt">(.*?)</ul>')
|
||||
patron = r'<a class="poster" href="([^"]+)" title="([^"]+)"[^>]*>\s*<img src="([^"]+)"[^>]+>'
|
||||
matches = re.findall(patron, blocco, re.DOTALL)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="seasons",
|
||||
contentType="tv",
|
||||
title=scrapedtitle,
|
||||
text_color="azure",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle))
|
||||
|
||||
# Pagine
|
||||
next_page = scrapertools.find_single_match(data, '<a href="([^"]+)"\s*><span aria-hidden="true">»')
|
||||
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
text_color="orange",
|
||||
url=next_page,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def seasons(item):
|
||||
logger.info("[italiafilmvideohd.py] seasons")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
url = scrapertools.find_single_match(data,
|
||||
r'<div class="playerhdpass" id="playerhdpass">\s*[^>]+>\s*<iframe[^s]+src="([^"]+)"[^>]*></iframe>')
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
blocco = scrapertools.find_single_match(data, r'<h3>STAGIONE</h3>\s*<ul>(.*?)</ul>')
|
||||
seasons = re.findall(r'<li[^>]*><a href="([^"]+)">([^<]+)</a></li>', blocco, re.DOTALL)
|
||||
|
||||
for scrapedurl, season in seasons:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodes",
|
||||
contentType=item.contentType,
|
||||
title="Stagione: %s" % season,
|
||||
text_color="azure",
|
||||
url="https://hdpass.net/%s" % scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodes(item):
|
||||
logger.info("[italiafilmvideohd.py] episodes")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
blocco = scrapertools.find_single_match(data, r'<section id="seasons">(.*?)</section>')
|
||||
episodes = re.findall(r'<li[^>]*><a href="([^"]+)">([^<]+)</a></li>', blocco, re.DOTALL)
|
||||
|
||||
for scrapedurl, episode in episodes:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvid_series",
|
||||
contentType=item.contentType,
|
||||
title="Episodio: %s" % episode,
|
||||
text_color="azure",
|
||||
url="https://hdpass.net/%s" % scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[italiafilmvideohd.py] findvideos")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'<div class="playerhdpass" id="playerhdpass"><iframe width=".+?" height=".+?" src="([^"]+)"'
|
||||
url = scrapertools.find_single_match(data, patron)
|
||||
|
||||
if url:
|
||||
data += httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title + videoitem.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
videoitem.language = IDIOMAS['Italiano']
|
||||
|
||||
# Requerido para Filtrar enlaces
|
||||
|
||||
if checklinks:
|
||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||
|
||||
# Requerido para FilterTools
|
||||
|
||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Requerido para AutoPlay
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
if item.contentType != 'episode':
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
|
||||
action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvid_series(item):
|
||||
logger.info("[italiafilmvideohd.py] findvideos")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data.replace('\n', '')
|
||||
patron = r'<iframe id="[^"]+" width="[^"]+" height="[^"]+" src="([^"]+)"[^>]+><\/iframe>'
|
||||
url = scrapertools.find_single_match(data, patron).replace("?alta", "")
|
||||
url = "https:" + url.replace("&download=1", "")
|
||||
|
||||
data = httptools.downloadpage(url, headers=headers).data
|
||||
|
||||
start = data.find('<div class="row mobileRes">')
|
||||
end = data.find('<div id="playerFront">', start)
|
||||
data = data[start:end]
|
||||
|
||||
patron_res = '<div class="row mobileRes">(.*?)</div>'
|
||||
patron_mir = '<div class="row mobileMirrs">(.*?)</div>'
|
||||
patron_media = r'<input type="hidden" name="urlEmbed" data-mirror="([^"]+)" id="urlEmbed" value="([^"]+)"\s*/>'
|
||||
|
||||
res = scrapertools.find_single_match(data, patron_res)
|
||||
|
||||
urls = []
|
||||
for res_url, res_video in scrapertools.find_multiple_matches(res, '<option.*?value="([^"]+?)">([^<]+?)</option>'):
|
||||
|
||||
data = httptools.downloadpage(urlparse.urljoin(url, res_url), headers=headers).data.replace('\n', '')
|
||||
mir = scrapertools.find_single_match(data, patron_mir)
|
||||
for mir_url in scrapertools.find_multiple_matches(mir, '<option.*?value="([^"]+?)">[^<]+?</value>'):
|
||||
data = httptools.downloadpage(urlparse.urljoin(url, mir_url), headers=headers).data.replace('\n', '')
|
||||
|
||||
for media_label, media_url in re.compile(patron_media).findall(data):
|
||||
urls.append(support.url_decode(media_url))
|
||||
|
||||
itemlist = servertools.find_video_items(data='\n'.join(urls))
|
||||
for videoitem in itemlist:
|
||||
server = re.sub(r'[-\[\]\s]+', '', videoitem.title)
|
||||
videoitem.text_color = "azure"
|
||||
videoitem.title = "".join(["[%s] " % ("[COLOR orange]%s[/COLOR]" % server.capitalize()), item.title])
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"language": ["ita","sub-ita"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
|
||||
"categories": ["tvshow"],
|
||||
"categories": ["tvshow", "vos"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+63
-22
@@ -4,15 +4,24 @@
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
|
||||
"""
|
||||
import re
|
||||
Problemi noti che non superano il test del canale:
|
||||
|
||||
from core import httptools, scrapertools, support
|
||||
|
||||
Avvisi:
|
||||
|
||||
|
||||
Ulteriori info:
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
from core import support, httptools, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'italiaserie'
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['speedvideo']
|
||||
list_quality = []
|
||||
@@ -23,7 +32,7 @@ def mainlist(item):
|
||||
support.log()
|
||||
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'latest']),
|
||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'update']),
|
||||
('Generi', ['', 'category', 'Serie-Tv per Genere'])
|
||||
]
|
||||
|
||||
@@ -38,14 +47,31 @@ def peliculas(item):
|
||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\
|
||||
'title="(?P<title>[^"]+)">\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
||||
|
||||
if item.args == "latest":
|
||||
if item.args == 'update':
|
||||
patron += r'.*?aj-eps">(?P<episode>.+?)[ ]?(?P<lang>Sub-Ita|Ita)</span>'
|
||||
action = 'findvideos'
|
||||
patronNext = r'<a class="next page-numbers" href="(.*?)">'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
|
||||
patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\
|
||||
'<div class="su-spoiler-content".*?)<div class="clearfix">'
|
||||
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>'
|
||||
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
support.log()
|
||||
@@ -56,24 +82,10 @@ def category(item):
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
pagination = 24
|
||||
|
||||
patronBlock = r'</i> Stagione (?P<block>(?P<season>\d+)</div> '\
|
||||
'<div class="su-spoiler-content".*?)<div class="clearfix">'
|
||||
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>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log("s=", texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
item.contentType = 'tvshow'
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
@@ -92,7 +104,7 @@ def newest(categoria):
|
||||
if categoria == "series":
|
||||
item.url = host + "/ultimi-episodi/"
|
||||
item.action = "peliculas"
|
||||
item.args = "latest"
|
||||
item.args = "update"
|
||||
item.contentType = "episode"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
@@ -111,4 +123,33 @@ def newest(categoria):
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
return support.server(item, data=item.url)
|
||||
|
||||
if item.args == 'update':
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
url_video = scrapertoolsV2.find_single_match(data, r'<a rel="[^"]+" target="[^"]+" act="[^"]+"\s+href="([^"]+)" class="[^"]+-link".+?\d+.+?</strong> </a>', -1)
|
||||
url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)" />')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
itemlist = support.server(item, data=url_video)
|
||||
|
||||
itemlist.append(
|
||||
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
|
||||
else:
|
||||
return support.server(item, data=item.url)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
||||
"bannermenu": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
||||
"thumbnail": "mondoserietv.png",
|
||||
"bannermenu": "mondoserietv.png",
|
||||
"categories": ["movie","anime","tvshow","documentary"],
|
||||
"not_active":["include_in_newest_anime","include_in_newest_documentary"],
|
||||
"settings": []
|
||||
|
||||
+30
-30
@@ -7,23 +7,19 @@
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.item import Item
|
||||
|
||||
# impostati dinamicamente da findhost()
|
||||
host = ''
|
||||
headers = ''
|
||||
|
||||
def findhost():
|
||||
global host, headers
|
||||
data= httptools.downloadpage('https://seriehd.nuovo.link/').data
|
||||
global host, headers
|
||||
host = scrapertoolsV2.find_single_match(data, r'<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
headers = [['Referer', host]]
|
||||
return host
|
||||
|
||||
findhost()
|
||||
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'thevideome']
|
||||
list_quality = ['1080p', '720p', '480p', '360']
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
@@ -33,33 +29,9 @@ def mainlist(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genre(item):
|
||||
patronMenu = '<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
||||
blacklist = ['Serie TV','Serie TV Americane','Serie TV Italiane','altadefinizione']
|
||||
patronBlock = '<ul class="sub-menu">(?P<block>.*)</ul>'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
#findhost()
|
||||
patron = r'<h2>(?P<title>.*?)</h2>\s*<img src="(?P<thumb>[^"]+)" alt="[^"]*" />\s*<A HREF="(?P<url>[^"]+)">.*?<span class="year">(?:(?P<year>[0-9]{4}))?.*?<span class="calidad">(?:(?P<quality>[A-Z]+))?.*?</span>'
|
||||
patronNext=r'<span class="current">\d+</span><a rel="nofollow" class="page larger" href="([^"]+)">\d+</a>'
|
||||
action='episodios'
|
||||
@@ -68,6 +40,7 @@ def peliculas(item):
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
#findhost()
|
||||
data =''
|
||||
url = support.match(item, patronBlock=r'<iframe width=".+?" height=".+?" src="([^"]+)" allowfullscreen frameborder="0">')[1]
|
||||
seasons = support.match(item, r'<a href="([^"]+)">(\d+)<', r'<h3>STAGIONE</h3><ul>(.*?)</ul>', headers, url)[0]
|
||||
@@ -82,8 +55,35 @@ def episodios(item):
|
||||
action = 'findvideos'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genre(item):
|
||||
#findhost()
|
||||
patronMenu = '<a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a>'
|
||||
blacklist = ['Serie TV','Serie TV Americane','Serie TV Italiane','altadefinizione']
|
||||
patronBlock = '<ul class="sub-menu">(?P<block>.*)</ul>'
|
||||
action = 'peliculas'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log(texto)
|
||||
findhost()
|
||||
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
itemlist = []
|
||||
item = support.Item()
|
||||
try:
|
||||
|
||||
@@ -4,33 +4,9 @@
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png",
|
||||
"bannermenu": "https:\/\/serietvonline.com\/wp-content\/uploads\/2016\/08\/logo2016-1.png",
|
||||
"categories": ["anime","tvshow","movie", "documentary"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
"thumbnail": "serietvonline.png",
|
||||
"bannermenu": "serietvonline.png",
|
||||
"categories": ["anime","tvshow","movie","documentary"],
|
||||
"not_active": ["include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+148
-103
@@ -1,29 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per serietvonline
|
||||
# Canale per serietvonline.py
|
||||
# ----------------------------------------------------------
|
||||
"""
|
||||
|
||||
Problemi noti che non superano il test del canale:
|
||||
- il solo film .45, nella lista titoli, ha come titolo nel canale '.'
|
||||
- la ricerca dei titoli potrebbe non essere uguale ( da sistemare le regex )
|
||||
indicate i titoli, con cui avete avuto problemi, e se sono film o serie.
|
||||
Novità. Indicare in quale/i sezione/i è presente il canale:
|
||||
- film, serie
|
||||
|
||||
Avvisi:
|
||||
- Nelle pagine di liste avrete un elenco di 24 titoli per pagina,
|
||||
invece della singola del sito
|
||||
- Il Canale è incluso nella sola ricerca globale.
|
||||
|
||||
Le pagine di liste sono lente a caricarsi in quanto scaricano anche le info...
|
||||
|
||||
- Al massimo 25 titoli per le sezioni: Film
|
||||
- Al massimo 35 titoli per le sezioni: Tutte le altre
|
||||
Per aggiungere in videoteca le Anime:
|
||||
Se hanno la forma 1x01:
|
||||
-si posso aggiungere direttamente dalla pagina della serie, sulla voce in fondo "aggiungi in videoteca".
|
||||
Altrimenti:
|
||||
- Prima fare la 'Rinumerazione' dal menu contestuale dal titolo della serie
|
||||
"""
|
||||
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
import re
|
||||
from core import support, httptools, scrapertoolsV2
|
||||
from platformcode import config
|
||||
from core.item import Item
|
||||
|
||||
__channel__ = "serietvonline"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
host = ""
|
||||
headers = ""
|
||||
|
||||
def findhost():
|
||||
global host, headers
|
||||
data = httptools.downloadpage('https://serietvonline.me/').data
|
||||
host = scrapertoolsV2.find_single_match(data, r'<a class="pure-button pure-button-primary" title=\'serie tv online\' href="([^"]+)">')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['akvideo', 'wstream', 'backin', 'vidtome', 'nowvideo']
|
||||
list_quality = ['default']
|
||||
@@ -32,13 +38,18 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
findhost()
|
||||
|
||||
film = ['/lista-film/',
|
||||
('Ultimi Aggiunti', ['/ultimi-film-aggiunti/', 'peliculas', 'latest'])
|
||||
film = ['/ultimi-film-aggiunti/',
|
||||
('Lista', ['/lista-film/', 'peliculas', 'lista'])
|
||||
]
|
||||
|
||||
tvshow = ['',
|
||||
('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'hd'])
|
||||
('Aggiornamenti', ['/ultimi-episodi-aggiunti/', 'peliculas', 'update']),
|
||||
('Tutte', ['/lista-serie-tv/', 'peliculas', 'qualcosa']),
|
||||
('Italiane', ['/lista-serie-tv-italiane/', 'peliculas', 'qualcosa']),
|
||||
('Anni 50-60-70-80', ['/lista-serie-tv-anni-60-70-80/', 'peliculas', 'qualcosa']),
|
||||
('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'qualcosa'])
|
||||
]
|
||||
|
||||
anime = ['/lista-cartoni-animati-e-anime/']
|
||||
@@ -52,108 +63,142 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
#findhost()
|
||||
|
||||
blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Ccartoni Animati e Anime']
|
||||
|
||||
if item.action == 'search':
|
||||
|
||||
patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">'\
|
||||
'(?P<block>.*?)<div id="paginador">'
|
||||
patron = r'<div class="movie"><div class="imagen"> <img src="(?P<thumb>[^"]+)" '\
|
||||
'alt="(?:(?P<title>.+?)[ ]?(?:\d+)?)?" /> <a href="(?P<url>[^"]+)">'\
|
||||
'.+?<h2>(?:.+?(?P<year>\d+)?)</h2>(?: <span class="year">'\
|
||||
'(\d+)(?:–|â|-\d+)?</span>)?</div>'
|
||||
|
||||
def itemHook(item):
|
||||
support.log("ITEMHOOK PRIMA: ", item)
|
||||
if 'film' in item.url:
|
||||
item.action = 'findvideos'
|
||||
item.contentType = 'movie'
|
||||
item.infoLabels['mediatype'] = 'movie'
|
||||
else:
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
item.infoLabels['mediatype'] = 'tvshow'
|
||||
support.log("ITEMHOOK DOPO: ", item)
|
||||
|
||||
return item
|
||||
|
||||
elif item.extra == 'tvshow' or item.contentType == 'tvshow':
|
||||
# SEZIONE Serie TV- Anime!
|
||||
action = 'episodios'
|
||||
|
||||
if 'anime' in item.url:
|
||||
patronBlock = r'<h1>Lista Cartoni Animati e Anime</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>'
|
||||
|
||||
else:
|
||||
if item.args == 'hd':
|
||||
patronBlock = r'<h1>Lista Serie Tv in AltaDefinizione</h1>(?P<block>.*?)'\
|
||||
'<div class="footer_c">'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>'
|
||||
|
||||
elif item.args == 'doc':
|
||||
patronBlock = r'<h1>Lista Documentari</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)">.+?</a>'
|
||||
|
||||
else:
|
||||
patronBlock = r'<div id="box_movies">(?P<block>.*?)<div id="paginador">'
|
||||
patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+"'\
|
||||
'.+?href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[ ]'\
|
||||
'(?P<rating>\d+.\d+|\d+)<[^>]+>[^>]+><h2>(?P<title>[^"]+)</h2>[ ]?'\
|
||||
'(?:<span class="year">(?P<year>\d+|\-\d+))?<'
|
||||
else:
|
||||
# SEZIONE FILM
|
||||
action = 'findvideos'
|
||||
pagination = 24
|
||||
|
||||
if not item.args:
|
||||
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?'\
|
||||
'(?: Streaming | MD iSTANCE )?<'
|
||||
patronBlock = r'Lista dei film disponibili in streaming e anche in download\.'\
|
||||
'</p>(?P<block>.*?)<div class="footer_c">'
|
||||
|
||||
elif item.args == 'latest':
|
||||
patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?: )?[ ]?'\
|
||||
'(?P<title>.*?)[ ]?(?:HD)?[ ]?(?P<year>\d+)?'\
|
||||
'(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>'
|
||||
|
||||
blacklist = ['DMCA', 'Contatti', 'Attenzione NON FARTI OSCURARE', 'Lista Cartoni Animati e Anime']
|
||||
patronBlock = r'<h1>.+?</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patronNext = r'<div class="siguiente"><a href="([^"]+)" >'
|
||||
|
||||
## debug = True
|
||||
if item.args == 'search':
|
||||
patronBlock = r'>Lista Serie Tv</a></li></ul></div><div id="box_movies">(?P<block>.*?)<div id="paginador">'
|
||||
patron = r'<div class="movie">[^>]+[^>]+>\s?<img src="(?P<thumb>[^"]+)" alt="(?P<title>.+?)\s?(?P<year>[\d\-]+)?"[^>]+>\s?<a href="(?P<url>[^"]+)">'
|
||||
elif item.contentType == 'episode':
|
||||
pagination = 35
|
||||
action = 'findvideos'
|
||||
patron = r'<td><a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<'
|
||||
|
||||
elif item.contentType == 'tvshow':
|
||||
# SEZIONE Serie TV- Anime - Documentari
|
||||
pagination = 35
|
||||
|
||||
if not item.args and 'anime' not in item.url:
|
||||
patron = r'<div class="movie">[^>]+>.+?src="(?P<thumb>[^"]+)" alt="[^"]+".+?href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[ ](?P<rating>\d+.\d+|\d+)<[^>]+>[^>]+><h2>(?P<title>[^"]+)</h2>[ ]?(?:<span class="year">(?P<year>\d+|\-\d+))?<'
|
||||
else:
|
||||
anime = True
|
||||
patron = r'(?:<td>)?<a href="(?P<url>[^"]+)"(?:[^>]+)?>\s?(?P<title>[^<]+)(?P<episode>[\d\-x]+)?(?P<title2>[^<]+)?<'
|
||||
else:
|
||||
# SEZIONE FILM
|
||||
pagination = 25
|
||||
|
||||
if item.args == 'lista':
|
||||
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?(?: Streaming | MD iSTANCE )?<'
|
||||
patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">'
|
||||
else:
|
||||
#patronBlock = r'<h1>Ultimi film aggiunti</h1>(?P<block>.*?)<div class="footer_c">'
|
||||
patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?: )?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>'
|
||||
|
||||
def itemHook(item):
|
||||
if 'film' in item.url:
|
||||
item.action = 'findvideos'
|
||||
item.contentType = 'movie'
|
||||
elif item.args == 'update':
|
||||
pass
|
||||
else:
|
||||
item.contentType = 'tvshow'
|
||||
item.action = 'episodios'
|
||||
return item
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
#findhost()
|
||||
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<table>(?P<block>.*?)<\/table>'
|
||||
patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?(?P<title2>.+?)?(?:avi)?)<(?P<url>.*?)</td><tr>'
|
||||
|
||||
patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?'\
|
||||
'(?P<title2>.+?)?)<(?P<url>.*?)</td><tr>'
|
||||
|
||||
## debug = True
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.log("CERCA :" ,text, item)
|
||||
findhost()
|
||||
item.url = "%s/?s=%s" % (host, text)
|
||||
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("%s" % line)
|
||||
return []
|
||||
|
||||
def newest(categoria):
|
||||
support.log(categoria)
|
||||
findhost()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/ultimi-film-aggiunti/'
|
||||
elif categoria == 'series':
|
||||
item.args = 'update'
|
||||
item.contentType = 'episode'
|
||||
item.url = host +'/ultimi-episodi-aggiunti/'
|
||||
try:
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
if item.contentType == 'movie':
|
||||
return support.server(item, headers=headers)
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
|
||||
if item.args != 'update':
|
||||
return support.server(item, item.url)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
def search(item, texto):
|
||||
support.log("CERCA :" ,texto, item)
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
#support.log("DATA - HTML:\n", data)
|
||||
url_video = scrapertoolsV2.find_single_match(data, r'<tr><td>(.+?)</td><tr>', -1)
|
||||
url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
itemlist = support.server(item, data=url_video)
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
itemlist.append(
|
||||
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
|
||||
|
||||
+4
-62
@@ -3,68 +3,10 @@
|
||||
"name": "SerieTVU",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "serietvu.png",
|
||||
"banner": "serietvu.png",
|
||||
"categories": ["tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "channel_host",
|
||||
"type": "text",
|
||||
"label": "Host del canale",
|
||||
"default": "https://www.serietvu.club",
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero de link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "1", "3", "5", "10" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
}
|
||||
]
|
||||
"categories": ["tvshow", "vos"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+85
-251
@@ -1,28 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per SerieTVU
|
||||
# Thanks to Icarus crew & Alfa addon & 4l3x87
|
||||
# Canale per serietvu.py
|
||||
# ----------------------------------------------------------
|
||||
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
La pagina novità contiene al max 25 titoli
|
||||
"""
|
||||
import re
|
||||
|
||||
from core import tmdb, scrapertools, support
|
||||
from core import support, httptools, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from platformcode import config, logger
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = 'serietvu'
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['speedvideo']
|
||||
list_quality = ['default']
|
||||
|
||||
@@ -30,235 +24,74 @@ list_quality = ['default']
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
|
||||
tvshow = ['/category/serie-tv',
|
||||
('Novità', ['/ultimi-episodi', 'latestep']),
|
||||
('Categorie', ['', 'categorie'])
|
||||
('Novità', ['/ultimi-episodi/', 'peliculas', 'update']),
|
||||
('Generi', ['', 'genres', 'genres'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def cleantitle(scrapedtitle):
|
||||
log()
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip())
|
||||
scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('– Il Trono di Spade', '').replace(
|
||||
'Flash 2014', 'Flash').replace('"', "'")
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)')
|
||||
if year:
|
||||
scrapedtitle = scrapedtitle.replace('(' + year + ')', '')
|
||||
|
||||
return scrapedtitle.strip()
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
patron = r'<div class="item">\s*<a href="([^"]+)" data-original="([^"]+)" class="lazy inner">'
|
||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<'
|
||||
matches, data = support.match(item, patron, headers=headers)
|
||||
patronBlock = r'<div class="wrap">\s+<h.>.*?</h.>(?P<block>.*?)<footer>'
|
||||
|
||||
for scrapedurl, scrapedimg, scrapedtitle in matches:
|
||||
infoLabels = {}
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)')
|
||||
if year:
|
||||
infoLabels['year'] = year
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
|
||||
if item.args != 'update':
|
||||
action = 'episodios'
|
||||
patron = r'<div class="item">\s*<a href="(?P<url>[^"]+)" data-original="(?P<thumb>[^"]+)" class="lazy inner">[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)<'
|
||||
else:
|
||||
action = 'findvideos'
|
||||
patron = r'<div class="item">\s+?<a href="(?P<url>[^"]+)"\s+?data-original="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>.+?)<[^>]+>\((?P<episode>[\dx\-]+)\s+?(?P<lang>Sub-Ita|[iITtAa]+)\)<'
|
||||
pagination = 25
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedimg,
|
||||
show=scrapedtitle,
|
||||
infoLabels=infoLabels,
|
||||
contentType='episode',
|
||||
folder=True))
|
||||
patronNext = r'<li><a href="([^"]+)"\s+?>Pagina successiva'
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
#support.regexDbg(item, patron, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
# Pagine
|
||||
support.nextPage(itemlist, item, data, '<li><a href="([^"]+)">Pagina successiva')
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
patron = r'<option value="(\d+)"[\sselected]*>.*?</option>'
|
||||
matches, data = support.match(item, patron, headers=headers)
|
||||
|
||||
for value in matches:
|
||||
patron = r'<div class="list [active]*" data-id="%s">(.*?)</div>\s*</div>' % value
|
||||
blocco = scrapertools.find_single_match(data, patron)
|
||||
log(blocco)
|
||||
patron = r'(<a data-id="\d+[^"]*" data-href="([^"]+)"(?:\sdata-original="([^"]+)")?\sclass="[^"]+">)[^>]+>[^>]+>([^<]+)<'
|
||||
matches = scrapertools.find_multiple_matches(blocco, patron)
|
||||
|
||||
for scrapedextra, scrapedurl, scrapedimg, scrapedtitle in matches:
|
||||
contentlanguage = ''
|
||||
if 'sub-ita' in scrapedtitle.lower():
|
||||
contentlanguage = 'Sub-ITA'
|
||||
scrapedtitle = scrapedtitle.replace(contentlanguage, '')
|
||||
|
||||
number = cleantitle(scrapedtitle.replace("Episodio", "")).strip()
|
||||
|
||||
title = value + "x" + number.zfill(2)
|
||||
title += " "+support.typo(contentlanguage, '_ [] color kod') if contentlanguage else ''
|
||||
|
||||
infoLabels = {}
|
||||
infoLabels['episode'] = number.zfill(2)
|
||||
infoLabels['season'] = value
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=title,
|
||||
fulltitle=scrapedtitle,
|
||||
contentType="episode",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedimg,
|
||||
extra=scrapedextra,
|
||||
infoLabels=infoLabels,
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
support.videolibrary(itemlist, item, 'bold color kod')
|
||||
|
||||
return itemlist
|
||||
patronBlock = r'</select><div style="clear:both"></div></h2>(?P<block>.*?)<div id="trailer" class="tab">'
|
||||
patron = r'(?:<div class="list (?:active)?" data-id="(?P<season>\d+)">[^>]+>)?\s+<a data-id="(?P<episode>\d+)(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<url>[^>]+)>[^>]+>[^>]+>(?P<title>.+?)(?:\sSub-ITA)?<'
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def findvideos(item):
|
||||
log()
|
||||
return support.server(item, data=item.url)
|
||||
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def findepisodevideo(item):
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
log()
|
||||
|
||||
patron_block = r'<div class="list [active]*" data-id="%s">(.*?)</div>\s*</div>' % item.extra[0][0]
|
||||
patron = r'<a data-id="%s[^"]*" data-href="([^"]+)"(?:\sdata-original="[^"]+")?\sclass="[^"]+">' % item.extra[0][1].lstrip("0")
|
||||
matches = support.match(item, patron, patron_block, headers)[0]
|
||||
data = ''
|
||||
if len(matches) > 0:
|
||||
data = matches[0]
|
||||
item.contentType = 'movie'
|
||||
return support.server(item, data=data)
|
||||
blacklist = ["Home Page", "Calendario Aggiornamenti"]
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<h2>Sfoglia</h2>\s*<ul>(?P<block>.*?)</ul>\s*</section>'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>'
|
||||
#debug = True
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
def search(item, text):
|
||||
log(text)
|
||||
item.url = host + "/?s=" + text
|
||||
try:
|
||||
item.contentType = 'tvshow'
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
log("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def latestep(item):
|
||||
log()
|
||||
itemlist = []
|
||||
titles = []
|
||||
|
||||
patron_block = r"Ultimi episodi aggiunti.*?<h2>"
|
||||
patron = r'<a href="([^"]*)"\sdata-src="([^"]*)"\sclass="owl-lazy.*?".*?class="title">(.*?)<small>\((\d*?)x(\d*?)\s(Sub-Ita|Ita)'
|
||||
matches = support.match(item, patron, patron_block, headers, host)[0]
|
||||
|
||||
for scrapedurl, scrapedimg, scrapedtitle, scrapedseason, scrapedepisode, scrapedlanguage in matches:
|
||||
infoLabels = {}
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)')
|
||||
if year:
|
||||
infoLabels['year'] = year
|
||||
infoLabels['episode'] = scrapedepisode
|
||||
infoLabels['season'] = scrapedseason
|
||||
episode = scrapedseason + "x" + scrapedepisode
|
||||
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
title = scrapedtitle + " - " + episode
|
||||
contentlanguage = ""
|
||||
if scrapedlanguage.strip().lower() != 'ita':
|
||||
title += " "+support.typo("Sub-ITA", '_ [] color kod')
|
||||
contentlanguage = 'Sub-ITA'
|
||||
|
||||
titles.append(title)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findepisodevideo",
|
||||
title=title,
|
||||
fulltitle=title,
|
||||
url=scrapedurl,
|
||||
extra=[[scrapedseason, scrapedepisode]],
|
||||
thumbnail=scrapedimg,
|
||||
contentSerieName=scrapedtitle,
|
||||
contentLanguage=contentlanguage,
|
||||
contentType='episode',
|
||||
infoLabels=infoLabels,
|
||||
folder=True))
|
||||
|
||||
patron = r'<div class="item">\s*<a href="([^"]+)" data-original="([^"]+)" class="lazy inner">'
|
||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<small>([^<]+)<'
|
||||
matches = support.match(item, patron, headers=headers)[0]
|
||||
|
||||
for scrapedurl, scrapedimg, scrapedtitle, scrapedinfo in matches:
|
||||
infoLabels = {}
|
||||
year = scrapertools.find_single_match(scrapedtitle, '\((\d{4})\)')
|
||||
if year:
|
||||
infoLabels['year'] = year
|
||||
scrapedtitle = cleantitle(scrapedtitle)
|
||||
|
||||
infoLabels['tvshowtitle'] = scrapedtitle
|
||||
|
||||
episodio = re.compile(r'(\d+)x(\d+)', re.DOTALL).findall(scrapedinfo)
|
||||
infoLabels['episode'] = episodio[0][1]
|
||||
infoLabels['season'] = episodio[0][0]
|
||||
|
||||
episode = infoLabels['season'] + "x" + infoLabels['episode']
|
||||
title = "%s - %s" % (scrapedtitle, episode)
|
||||
title = title.strip()
|
||||
contentlanguage = ""
|
||||
if 'sub-ita' in scrapedinfo.lower():
|
||||
title += " "+support.typo("Sub-ITA", '_ [] color kod')
|
||||
contentlanguage = 'Sub-ITA'
|
||||
|
||||
if title in titles: continue
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findepisodevideo",
|
||||
title=title,
|
||||
fulltitle=title,
|
||||
url=scrapedurl,
|
||||
extra=episodio,
|
||||
thumbnail=scrapedimg,
|
||||
contentSerieName=scrapedtitle,
|
||||
contentLanguage=contentlanguage,
|
||||
infoLabels=infoLabels,
|
||||
contentType='episode',
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def newest(categoria):
|
||||
log(categoria)
|
||||
itemlist = []
|
||||
@@ -266,51 +99,52 @@ def newest(categoria):
|
||||
try:
|
||||
if categoria == "series":
|
||||
item.url = host + "/ultimi-episodi"
|
||||
item.action = "latestep"
|
||||
itemlist = latestep(item)
|
||||
|
||||
if itemlist[-1].action == "latestep":
|
||||
itemlist.pop()
|
||||
item.action = "peliculas"
|
||||
item.contentType = 'tvshow'
|
||||
item.args = 'update'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
log("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
@support.scrape
|
||||
def categorie(item):
|
||||
def findvideos(item):
|
||||
log()
|
||||
if item.args != 'update':
|
||||
return support.server(item, data=item.url)
|
||||
else:
|
||||
itemlist = []
|
||||
item.infoLabels['mediatype'] = 'episode'
|
||||
|
||||
blacklist = ["Home Page", "Calendario Aggiornamenti"]
|
||||
action = 'peliculas'
|
||||
patronBlock = r'<h2>Sfoglia</h2>\s*<ul>(?P<block>.*?)</ul>\s*</section>'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)</a></li>'
|
||||
debug = True
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
## support.log("DATA - HTML:\n", data)
|
||||
url_video = scrapertoolsV2.find_single_match(data, r'<div class="item"> <a data-id="[^"]+" data-href="([^"]+)" data-original="[^"]+"[^>]+> <div> <div class="title">Episodio \d+', -1)
|
||||
url_serie = scrapertoolsV2.find_single_match(data, r'<link rel="canonical" href="([^"]+)"\s?/>')
|
||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
||||
series = support.typo(item.contentSerieName, ' bold color kod')
|
||||
|
||||
return locals()
|
||||
|
||||
# ================================================================================================================
|
||||
itemlist = support.server(item, data=url_video)
|
||||
|
||||
itemlist.append(
|
||||
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",
|
||||
))
|
||||
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
return itemlist
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://www.popcornstream.best/wp-content/uploads/2019/09/PopLogo40.png",
|
||||
"banner": "https://www.popcornstream.info/media/PopcornStream820x428.png",
|
||||
"thumbnail": "popcornstream.png",
|
||||
"banner": "popcornstream.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "streamtime",
|
||||
"name": "StreamTime",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"thumbnail": "",
|
||||
"banner": "streamtime.png",
|
||||
|
||||
+5
-72
@@ -4,76 +4,9 @@
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/tantifilm.png",
|
||||
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/tantifilm.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in ricerca globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero di link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
},
|
||||
{
|
||||
"id": "autorenumber",
|
||||
"type": "bool",
|
||||
"label": "@70712",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "autorenumber_mode",
|
||||
"type": "bool",
|
||||
"label": "@70688",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)"
|
||||
}
|
||||
]
|
||||
"thumbnail": "tantifilm.png",
|
||||
"banner": "tantifilm.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active":["include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"thumbnail": "toonitalia.png",
|
||||
"banner": "toonitalia.png",
|
||||
"categories": ["tvshow", "movie", "vos", "anime"],
|
||||
"not_active":["include_in_newest_peliculas"],
|
||||
"default_off":["include_in_newest"],
|
||||
"not_active":["include_in_newest_peliculas", "include_in_newest_series"],
|
||||
"default_off":["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
}
|
||||
|
||||
+12
-9
@@ -137,12 +137,15 @@ def episodios(item):
|
||||
episodes.append(episode['episodes'])
|
||||
for episode in episodes:
|
||||
for key in episode:
|
||||
if 'stagione' in key['title'].lower():
|
||||
match = support.match(key['title'].encode('ascii', 'replace'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
|
||||
if 'stagione' in key['title'].encode('utf8').lower():
|
||||
match = support.match(key['title'].encode('utf8'), r'[Ss]tagione\s*(\d+) - [Ee]pisodio\s*(\d+)')[0][0]
|
||||
title = match[0]+'x'+match[1] + ' - ' + item.fulltitle
|
||||
make_item = True
|
||||
elif int(key['season_id']) == int(season_id):
|
||||
title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('ascii', 'replace'),
|
||||
try:
|
||||
title = 'Episodio ' + key['number'] + ' - ' + key['title'].encode('utf8')
|
||||
except:
|
||||
title = 'Episodio ' + key['number'] + ' - ' + key['title']
|
||||
make_item = True
|
||||
else:
|
||||
make_item = False
|
||||
@@ -193,21 +196,21 @@ def make_itemlist(itemlist, item, data):
|
||||
search = item.search if item.search else ''
|
||||
infoLabels = {}
|
||||
for key in data['data']:
|
||||
if search.lower() in key['title'].lower():
|
||||
if search.lower() in key['title'].encode('utf8').lower():
|
||||
infoLabels['year'] = key['date_published']
|
||||
infoLabels['title'] = infoLabels['tvshowtitle'] = key['title']
|
||||
support.log(infoLabels)
|
||||
title = key['title'].encode('utf8')
|
||||
itemlist.append(
|
||||
Item(
|
||||
channel = item.channel,
|
||||
title = support.typo(key['title'], 'bold'),
|
||||
fulltitle= key['title'],
|
||||
show= key['title'],
|
||||
title = support.typo(title, 'bold'),
|
||||
fulltitle= title,
|
||||
show= title,
|
||||
url= host + str(key['show_id']) + '/seasons/',
|
||||
action= 'findvideos' if item.contentType == 'movie' else 'episodios',
|
||||
contentType = item.contentType,
|
||||
contentSerieName= key['title'] if item.contentType != 'movie' else '',
|
||||
contentTitle= key['title'] if item.contentType == 'movie' else '',
|
||||
contentTitle= title if item.contentType == 'movie' else '',
|
||||
infoLabels=infoLabels
|
||||
))
|
||||
return itemlist
|
||||
Reference in New Issue
Block a user