refactor: riscritti canali per pieno supporto al decoratore e/o per renderlo compatibile
In alcuni canali sono state solo trasformate le def che avevano nel codice support.scrape del vecchio codice
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
# Canale per altadefinizione01
|
||||
# ------------------------------------------------------------
|
||||
|
||||
"""
|
||||
|
||||
|
||||
"""
|
||||
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
@@ -17,16 +22,14 @@ def findhost():
|
||||
host = scrapertoolsV2.find_single_match(data, '<div class="elementor-button-wrapper"> <a href="([^"]+)"')
|
||||
headers = [['Referer', host]]
|
||||
|
||||
#headers = [['User-Agent', 'Mozilla/50.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0'],
|
||||
# ['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']),
|
||||
@@ -41,9 +44,14 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log('peliculas',item)
|
||||
|
||||
deflang = 'ITA'
|
||||
action="findvideos"
|
||||
|
||||
patron = r'<div class="cover boxcaption"> <h2>.<a href="(?P<url>[^"]+)">.*?<.*?src="(?P<thumb>[^"]+)"'\
|
||||
'.+?[^>]+>[^>]+<div class="trdublaj"> (?P<quality>[A-Z/]+)<[^>]+>(?:.[^>]+>(?P<lang>.*?)<[^>]+>).*?'\
|
||||
'<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> '\
|
||||
'[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<'
|
||||
|
||||
if item.args == "search":
|
||||
patronBlock = r'</script> <div class="boxgrid caption">(?P<block>.*)<div id="right_bar">'
|
||||
elif item.args == 'update':
|
||||
@@ -55,11 +63,6 @@ def peliculas(item):
|
||||
else:
|
||||
patronBlock = r'<div class="cover_kapsul ml-mask">(?P<block>.*)<div class="page_nav">'
|
||||
|
||||
patron = r'<div class="cover boxcaption"> <h2>.<a href="(?P<url>[^"]+)">.*?<.*?src="(?P<thumb>[^"]+)"'\
|
||||
'.+?[^>]+>[^>]+<div class="trdublaj"> (?P<quality>[A-Z/]+)<[^>]+>(?:.[^>]+>(?P<lang>.*?)<[^>]+>).*?'\
|
||||
'<p class="h4">(?P<title>.*?)</p>[^>]+> [^>]+> [^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> [^>]+> '\
|
||||
'[^>]+>[^>]+>(?P<year>\d{4})[^>]+>[^>]+> [^>]+>[^>]+>(?P<duration>\d+).+?>.*?<p>(?P<plot>[^<]+)<'
|
||||
|
||||
patronNext = '<span>\d</span> <a href="([^"]+)">'
|
||||
#debug = True
|
||||
return locals()
|
||||
@@ -67,7 +70,7 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def categorie(item):
|
||||
support.log('categorie',item)
|
||||
findhost()
|
||||
|
||||
if item.args != 'orderalf': action = "peliculas"
|
||||
else: action = 'orderalf'
|
||||
|
||||
@@ -81,7 +84,6 @@ def categorie(item):
|
||||
elif item.args == 'orderalf':
|
||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||
patron = '<a title=.*?href="(?P<url>[^"]+)"><span>(?P<title>.*?)</span>'
|
||||
#support.regexDbg(item, patronBlock, headers)
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
@@ -104,7 +106,7 @@ def findvideos(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)
|
||||
|
||||
@@ -18,7 +18,7 @@ list_quality = ['default']
|
||||
# =========== home menu ===================
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
## support.dbg()
|
||||
support.log('mainlist',item)
|
||||
|
||||
film = [
|
||||
('Al Cinema', ['/film-del-cinema', 'peliculas', '']),
|
||||
@@ -35,11 +35,17 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
## support.dbg()
|
||||
support.log('peliculas',item)
|
||||
patron = r'class="innerImage">.*?href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+> (?P<year>\d{4})[^>]+>[^>]+> (?P<duration>\d+)[^>]+>[^>]+> (?P<quality>[a-zA-Z\\]+)[^>]+>[^>]+> (?P<lang>.*?) [^>]+>'
|
||||
|
||||
patron = r'class="innerImage">.*?href="(?P<url>[^"]+)".*?src="(?P<thumb>[^"]+)"'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+> (?P<year>\d{4})[^>]+>[^>]+> (?P<duration>\d+)'\
|
||||
'[^>]+>[^>]+> (?P<quality>[a-zA-Z]+) [^>]+>[^>]+> (?P<lang>.*?) [^>]+>'
|
||||
patronNext = r'<span>\d</span> <a href="([^"]+)">'
|
||||
## debug = True
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
# =========== def pagina categorie ======================================
|
||||
@@ -50,7 +56,6 @@ def genres(item):
|
||||
action = 'peliculas'
|
||||
if item.args == 'genres':
|
||||
patronBlock = r'<ul class="listSubCat" id="Film">(?P<block>.*)<ul class="listSubCat" id="Anno">'
|
||||
#pass
|
||||
elif item.args == 'years':
|
||||
patronBlock = r'<ul class="listSubCat" id="Anno">(?P<block>.*)<ul class="listSubCat" id="Qualita">'
|
||||
elif item.args == 'quality':
|
||||
@@ -60,8 +65,7 @@ def genres(item):
|
||||
action = 'findvideos'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
|
||||
debug = True
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
# =========== def per cercare film/serietv =============
|
||||
@@ -104,4 +108,5 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos', item)
|
||||
return support.server(item, headers=headers)
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per CinemaLibero - First Version
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
from core import scrapertools, servertools, httptools, support
|
||||
@@ -30,6 +37,7 @@ headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
film = '/category/film/'
|
||||
filmSub = [
|
||||
('Generi', ['', 'genres']),
|
||||
@@ -42,9 +50,16 @@ def mainlist(item):
|
||||
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
return support.scrape2(item, patronBlock=r'<div id="bordobar" class="dropdown-menu(?P<block>.*)</li>', patron=r'<a class="dropdown-item" href="([^"]+)" title="([A-z]+)"', listGroups=['url', 'title'], action='video')
|
||||
support.log()
|
||||
action='video'
|
||||
patron=r'<a class="dropdown-item" href="(?P<url>[^"]+)" title="(?P<title>[A-z]+)"'
|
||||
## return support.scrape2(item, patronBlock=r'<div id="bordobar" class="dropdown-menu(?P<block>.*)</li>',
|
||||
## patron=r'<a class="dropdown-item" href="([^"]+)" title="([A-z]+)"',
|
||||
## listGroups=['url', 'title'], action='video')
|
||||
|
||||
return locals()
|
||||
|
||||
def peliculas(item):
|
||||
logger.info('[cinemalibero.py] video')
|
||||
|
||||
@@ -1,49 +1,11 @@
|
||||
{
|
||||
"id": "eurostreaming",
|
||||
"name": "Eurostreaming",
|
||||
"id": "eurostreaming",
|
||||
"name": "Eurostreaming",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"adult": false,
|
||||
"language": ["ita","vos"],
|
||||
"thumbnail": "eurostreaming.png",
|
||||
"banner": "eurostreaming.png",
|
||||
"categories": ["tvshow","anime","vosi"],
|
||||
"settings": [
|
||||
{
|
||||
"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": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"Non filtrare",
|
||||
"ITA",
|
||||
"vosi"
|
||||
]
|
||||
}
|
||||
]
|
||||
"categories": ["tvshow","anime","vos"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -5,27 +5,33 @@
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Problemi noti:
|
||||
Alcune sezioni di anime-cartoni non vanno, alcune hanno solo la lista degli episodi, ma non hanno link,
|
||||
altre cambiano la struttura
|
||||
- Alcune sezioni di anime-cartoni non vanno, alcune hanno solo la lista degli episodi, ma non hanno link,
|
||||
altre cambiano la struttura
|
||||
"""
|
||||
import re
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "eurostreaming"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
#impostati dinamicamente da findhost()
|
||||
host = ""
|
||||
headers = ""
|
||||
|
||||
def findhost():
|
||||
global host, headers
|
||||
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False).headers
|
||||
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']
|
||||
|
||||
IDIOMAS = {'Italiano': 'ITA', 'Sub-ITA':'vosi'}
|
||||
list_language = IDIOMAS.values()
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
|
||||
tvshow = [
|
||||
('Archivio ', ['/category/serie-tv-archive/', 'peliculas', '', 'tvshow']),
|
||||
('Aggiornamenti ', ['/aggiornamento-episodi/', 'peliculas', True, 'tvshow'])
|
||||
@@ -37,43 +43,55 @@ def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
|
||||
action = 'episodios'
|
||||
|
||||
if item.args == True:
|
||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?).[^–]<a href="(?P<url>[^"]+)"'\
|
||||
'\s+target="_blank">(?P<episode>\d+x\d+) (?P<title2>.*?)</a>'
|
||||
# permette di vedere episodio e titolo + titolo2 in novità
|
||||
def itemHook(item):
|
||||
item.show = item.episode + item.title
|
||||
return item
|
||||
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>'
|
||||
## # permette di vedere episodio e titolo + titolo2 in novità
|
||||
## # se attivo questo da problemi nell'aggiunta alla videoteca
|
||||
## def itemHook(item):
|
||||
## item.show = item.episode + item.title
|
||||
## return item
|
||||
|
||||
else:
|
||||
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?>'\
|
||||
'<a href="(?P<url>[^"]+)".*?>(?P<title>.*?(?:\((?P<year>\d{4})\)|(\4\d{4}))?)<\/a><\/h2>'
|
||||
'<a href="(?P<url>[^"]+)".*?>(?P<title>.*?(?:\((?P<year>\d{4})\)'\
|
||||
'|(\4\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)
|
||||
|
||||
action = 'findvideos'
|
||||
item.contentType = 'episode'
|
||||
item.contentType = 'tvshow'
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data.replace("'", '"')
|
||||
#========
|
||||
|
||||
if 'clicca qui per aprire' in data.lower():
|
||||
item.url = scrapertoolsV2.find_single_match(data, '"go_to":"([^"]+)"')
|
||||
item.url = item.url.replace("\\","")
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data.replace("'", '"')
|
||||
|
||||
elif 'clicca qui</span>' in data.lower():
|
||||
item.url = scrapertoolsV2.find_single_match(data, '<h2 style="text-align: center;"><a href="([^"]+)">')
|
||||
# Carica la pagina
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data.replace("'", '"')
|
||||
#=========
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
patronBlock = r'(?P<block>STAGIONE\s\d+ (?:\()?(?P<lang>ITA|SUB ITA)(?:\))?<\/div>.*?)</div></div>'
|
||||
patron = r'(?:\s|\Wn)?(?:|<strong>)?(?P<episode>\d+&#\d+;\d+)(?:|</strong>) (?P<title>.*?)(?:|–)?<a\s(?P<url>.*?)<\/a><br\s\/>'
|
||||
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
patronBlock = r'(?P<block>STAGIONE\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 />'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
# =========== def findvideos =============
|
||||
@@ -87,8 +105,10 @@ def search(item, texto):
|
||||
support.log()
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
item.contentType = 'tvshow'
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
@@ -98,12 +118,12 @@ def search(item, texto):
|
||||
|
||||
# =========== def novità in ricerca globale =============
|
||||
def newest(categoria):
|
||||
support.log()
|
||||
support.log()
|
||||
itemlist = []
|
||||
item = Item()
|
||||
item.contentType = 'tvshow'
|
||||
item.args = True
|
||||
try:
|
||||
try:
|
||||
item.url = "%s/aggiornamento-episodi/" % host
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
@@ -111,7 +131,7 @@ def newest(categoria):
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Filmsenzalimiti
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
from core import scrapertools, servertools, httptools, support
|
||||
@@ -109,18 +115,19 @@ def sottomenu(item):
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def video(item):
|
||||
logger.info('[filmsenzalimiti.py] video')
|
||||
itemlist = []
|
||||
|
||||
patron = '<div class="col-mt-5 postsh">.*?<a href="([^"]+)" title="([^"]+)">.*?<span class="rating-number">(.*?)<.*?<img src="([^"]+)"'
|
||||
patron = '<div class="col-mt-5 postsh">.*?<a href="(?P<url>[^"]+)" '\
|
||||
'title="(?P<title>[^"]+)">.*?<span class="rating-number">(?P<rating>.*?)<.*?<img src="(?P<thumb>[^"]+)"'
|
||||
patronNext = '<a href="([^"]+)"><i class="glyphicon glyphicon-chevron-right"'
|
||||
|
||||
support.scrape(item, itemlist, patron, ['url', 'title', 'rating', 'thumb'], patronNext=patronNext)
|
||||
|
||||
return itemlist
|
||||
## support.scrape(item, itemlist, patron, ['url', 'title', 'rating', 'thumb'], patronNext=patronNext)
|
||||
|
||||
## return itemlist
|
||||
return locals()
|
||||
def cerca(item):
|
||||
logger.info('[filmsenzalimiti.py] cerca')
|
||||
itemlist = []
|
||||
|
||||
@@ -3,68 +3,9 @@
|
||||
"name": "GuardaSerie.click",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"language": ["ita", "vos"],
|
||||
"thumbnail": "guardaserieclick.png",
|
||||
"bannermenu": "guardaserieclick.png",
|
||||
"categories": ["tvshow","anime"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "channel_host",
|
||||
"type": "text",
|
||||
"label": "Host del canale",
|
||||
"default": "https://www.guardaserie.media",
|
||||
"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", "anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -4,8 +4,16 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
"""
|
||||
Problemi noti che non superano il test del canale:
|
||||
NESSUNO (update 13-9-2019)
|
||||
|
||||
Avvisi per il test:
|
||||
La voce "Serie TV" mostra per ogni pagina 24 titoli
|
||||
|
||||
|
||||
Problemi noti:
|
||||
- nella pagina categorie appaiono i risultati di tmdb in alcune voci
|
||||
|
||||
"""
|
||||
|
||||
from core import scrapertoolsV2, httptools, support
|
||||
@@ -14,20 +22,21 @@ from platformcode import logger, config
|
||||
from core.support import log
|
||||
|
||||
__channel__ = 'guardaserieclick'
|
||||
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
list_servers = ['speedvideo', 'openload']
|
||||
list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
tvshow = ["/lista-serie-tv",
|
||||
('Ultimi Aggiornamenti', ["/lista-serie-tv", 'peliculas', 'update']),
|
||||
('Categorie', ['categorie', 'categorie']),
|
||||
('Serie inedite Sub-ITA', ["/lista-serie-tv", 'peliculas', 'inedite']),
|
||||
('Da non perdere', ["/lista-serie-tv", 'peliculas', ['tv', 'da non perdere']]),
|
||||
('Classiche', ["/lista-serie-tv", 'peliculas', ['tv', 'classiche']]),
|
||||
('Anime', ["/category/animazione/", 'tvserie', 'tvshow','anime'])
|
||||
tvshow = ['/lista-serie-tv',
|
||||
('Ultimi Aggiornamenti', ['/lista-serie-tv', 'peliculas', 'new']),
|
||||
('Categorie', ['categorie', 'categorie']),
|
||||
('Serie inedite Sub-ITA', ['/lista-serie-tv', 'peliculas', 'ined']),
|
||||
('Da non perdere', ['/lista-serie-tv', 'peliculas', ['tv', 'da non perdere']]),
|
||||
('Classiche', ["/lista-serie-tv", 'peliculas', ['tv', 'classiche']]),
|
||||
('Anime', ["/category/animazione/", 'tvserie', 'tvshow','anime'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
@@ -38,34 +47,37 @@ def peliculas(item):
|
||||
## import web_pdb; web_pdb.set_trace()
|
||||
log('serietv ->\n', item)
|
||||
|
||||
action = 'episodios'
|
||||
listGroups = ['url', 'thumb', 'title']
|
||||
patron = r'<a href="([^"]+)".*?> <img\s.*?src="([^"]+)" \/>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/p>'
|
||||
if 'news' in item.args:
|
||||
patron_block = r'<div class="container container-title-serie-new container-scheda" meta-slug="new">(.*?)</div></div><div'
|
||||
elif 'inedite' in item.args:
|
||||
patron_block = r'<div class="container container-title-serie-ined container-scheda" meta-slug="ined">(.*?)</div></div><div'
|
||||
elif 'da non perdere' in item.args:
|
||||
patron_block = r'<div class="container container-title-serie-danonperd container-scheda" meta-slug="danonperd">(.*?)</div></div><div'
|
||||
elif 'classiche' in item.args:
|
||||
patron_block = r'<div class="container container-title-serie-classiche container-scheda" meta-slug="classiche">(.*?)</div></div><div'
|
||||
elif 'update' in item.args:
|
||||
listGroups = ['url', 'thumb', 'episode', 'lang', 'title']
|
||||
patron = r'rel="nofollow" href="([^"]+)"[^>]+> <img.*?src="([^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(\d+.\d+) \((.+?)\).<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>'
|
||||
patron_block = r'meta-slug="lastep">(.*?)</div></div><div'
|
||||
# permette di vedere episodio + titolo + titolo2 in novità
|
||||
def itemHook(item):
|
||||
item.show = item.episode + item.title
|
||||
return item
|
||||
if item.args == 'ined':
|
||||
#data = httptools.downloadpage(item.url).data
|
||||
log("Sono qui orco")
|
||||
pagination = 24
|
||||
action = 'episodios'
|
||||
|
||||
patron_block = r'<span\s+class="label label-default label-title-typology">'\
|
||||
'(?P<lang>[^<]+)</span>'
|
||||
else:
|
||||
pagination = 24
|
||||
action = 'episodios'
|
||||
patronBlock = r'<div\s+class="container container-title-serie-new container-scheda" '\
|
||||
'meta-slug="new">(?P<block>.*?)<div\s+class='\
|
||||
'"btn btn-lg btn-default btn-load-other-series">'
|
||||
|
||||
patron = r'<a href="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)"\s/>'\
|
||||
'[^>]+>[^>]+>\s[^>]+>\s(?P<year>\d{4})?\s.+?class="strongText">(?P<title>.+?)<'
|
||||
|
||||
|
||||
debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def tvserie(item):
|
||||
|
||||
action = 'episodios'
|
||||
listGroups = ['url', 'thumb', 'title']
|
||||
patron = r'<a\shref="([^"]+)".*?>\s<img\s.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p></div>'
|
||||
patron_block = r'<div\sclass="col-xs-\d+ col-sm-\d+-\d+">(.*?)<div\sclass="container-fluid whitebg" style="">'
|
||||
## listGroups = ['url', 'thumb', 'title']
|
||||
patron = r'<a\shref="(?P<url>[^"]+)".*?>\s<img\s.*?src="(?P<thumb>[^"]+)" />'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</p></div>'
|
||||
patron_block = r'<div\sclass="col-xs-\d+ col-sm-\d+-\d+">(?P<block>.*?)'\
|
||||
'<div\sclass="container-fluid whitebg" style="">'
|
||||
patronNext = r'<link\s.*?rel="next"\shref="([^"]+)"'
|
||||
|
||||
return locals()
|
||||
@@ -76,10 +88,12 @@ def episodios(item):
|
||||
item.contentType = 'episode'
|
||||
|
||||
action = 'findvideos'
|
||||
listGroups = ['episode', 'lang', 'title2', 'plot', 'title', 'url']
|
||||
patron = r'class="number-episodes-on-img"> (\d+.\d+)(?:|[ ]\((.*?)\))<[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>(.*?)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'(.*?)<[^>]+></div></div>.<span\s.+?meta-serie="(.*?)" meta-stag=(.*?)</span>'
|
||||
## listGroups = ['episode', 'lang', 'title2', 'plot', 'title', 'url']
|
||||
patron = r'class="number-episodes-on-img"> (?P<episode>\d+.\d+)'\
|
||||
'(?:|[ ]\((?P<lang>.*?)\))<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'(?P<title2>.*?)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'(?P<plot>.*?)<[^>]+></div></div>.<span\s.+?meta-serie="(?P<title>.*?)"'\
|
||||
'meta-stag=(?P<url>.*?)</span>'
|
||||
|
||||
return locals()
|
||||
|
||||
@@ -91,11 +105,9 @@ def findvideos(item):
|
||||
@support.scrape
|
||||
def categorie(item):
|
||||
action = 'tvserie'
|
||||
listGroups = ['url', 'title']
|
||||
patron = r'<li>\s<a\shref="([^"]+)"[^>]+>([^<]+)</a></li>'
|
||||
|
||||
patron_block = r'<ul\sclass="dropdown-menu category">(.*?)</ul>'
|
||||
|
||||
#listGroups = ['url', 'title']
|
||||
patron = r'<li>\s<a\shref="(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+)</a></li>'
|
||||
patron_block = r'<ul\sclass="dropdown-menu category">(?P<block>.*?)</ul>'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -3,76 +3,18 @@
|
||||
"name": "IlGenioDelloStreaming",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"language": ["ita", "vos"],
|
||||
"thumbnail": "https://i.imgur.com/Nsa81r0.png",
|
||||
"banner": "https://i.imgur.com/Nsa81r0.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"categories": ["movie", "tvshow", "anime", "vos"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi 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_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"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
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero de 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": ["No filtrar","IT"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
#
|
||||
# Canale per ilgeniodellostreaming
|
||||
# ------------------------------------------------------------
|
||||
|
||||
"""
|
||||
|
||||
Problemi noti che non superano il test del canale:
|
||||
NESSUNO (update 13-9-2019)
|
||||
|
||||
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.
|
||||
Es:
|
||||
https://ilgeniodellostreaming.se/genere/+ genere nel canale
|
||||
genere-> kids
|
||||
https://ilgeniodellostreaming.se/genere/kids
|
||||
genere-> avventura
|
||||
https://ilgeniodellostreaming.se/genere/avventura
|
||||
Se il genere è formato da 2 parola lo spazio si trasforma in -
|
||||
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)
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
from platformcode import logger
|
||||
@@ -14,28 +39,161 @@ from platformcode import config
|
||||
__channel__ = 'ilgeniodellostreaming'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['verystream', 'openload', 'streamango']
|
||||
list_quality = ['default']
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
PERPAGE = 10
|
||||
|
||||
@support.menu
|
||||
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']),
|
||||
('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/']
|
||||
|
||||
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()
|
||||
|
||||
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>'
|
||||
|
||||
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})?<'
|
||||
|
||||
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>.+?)<'
|
||||
|
||||
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'
|
||||
|
||||
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']}
|
||||
|
||||
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
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
itemlist = []
|
||||
menu(itemlist, 'Film', 'peliculas', host + '/film/')
|
||||
menu(itemlist, 'Film Per Categoria', 'category', host, args='genres')
|
||||
menu(itemlist, 'Film Per Anno', 'category', host, args='year')
|
||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/serie/', 'tvshow')
|
||||
menu(itemlist, 'Nuovi Episodi Serie TV submenu', 'newep', host + '/aggiornamenti-serie/', 'tvshow')
|
||||
menu(itemlist, 'Anime', 'peliculas', host + '/anime/', 'tvshow')
|
||||
menu(itemlist, 'TV Show', 'peliculas', host + '/tv-show/', 'tvshow')
|
||||
menu(itemlist, 'Cerca...', 'search', contentType='search')
|
||||
aplay(item, itemlist, list_servers, list_quality)
|
||||
return itemlist
|
||||
|
||||
patronBlock = r'<h1>.*?[ ]?(?:\[(?P<lang>.+?\]))?</h1>.+?<div class="se-a" '\
|
||||
'style="display:block"><ul class="episodios">(?P<block>.*?)</ul>'\
|
||||
'</div></div></div></div></div>'
|
||||
patron = r'<a href="(?P<url>[^"]+)"><img src="(?P<thumb>[^"]+)">.*?'\
|
||||
'<div class="numerando">(?P<episode>[^<]+).*?<div class="episodiotitle">'\
|
||||
'[^>]+>(?P<title>[^<]+)<\/a>'
|
||||
# debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
@@ -43,23 +201,25 @@ def newest(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.contentType = 'tvshow'
|
||||
item.url = host + '/aggiornamenti-serie/'
|
||||
## elif categoria == 'anime':
|
||||
## item.contentType = 'tvshow'
|
||||
## item.url = host + '/anime/'
|
||||
try:
|
||||
if categoria == 'peliculas':
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '/film/'
|
||||
elif categoria == "series":
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/serie/'
|
||||
elif categoria == "anime":
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '/anime/'
|
||||
item.action = action
|
||||
itemlist = action(item)
|
||||
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
if itemlist[-1].action == action:
|
||||
itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -69,71 +229,6 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
|
||||
def category(item):
|
||||
return support.scrape(item, r'<li.*?><a href="(.*?)"[^>]+>(.*?)<\/a>' ,['url', 'title'], action='peliculas', patron_block= r'<ul class="' + item.args + r' scrolling">(.*?)<\/ul>')
|
||||
|
||||
|
||||
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 []
|
||||
|
||||
|
||||
def peliculas_src(item):
|
||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if item.contentType == 'movie':
|
||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+>\s*([0-9.]+)<\/div><span class="quality">([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<\/a>[^>]+>[^>]+>([^<]+)<\/span>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<div'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'quality', 'title', 'year', 'plot'], headers, patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||
elif item.contentType == 'tvshow':
|
||||
patron = r'<div class="poster">\s*<a href="([^"]+)"><img src="([^"]+)" alt="[^"]+"><\/a>[^>]+>[^>]+>[^>]+> ([0-9.]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>([^<]+)<.*?<div class="texto">([^<]+)'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'rating', 'title', 'year', 'plot'], headers, action='episodios', patronNext='<span class="current">[^<]+<[^>]+><a href="([^"]+)"')
|
||||
else:
|
||||
patron = r'<div class="thumbnail animation-2"><a href="([^"]+)"><img src="([^"]+)" alt="[^"]+" \/>[^>]+>([^<]+)<\/span>.*?<a href.*?>([^<]+)<\/a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*([0-9.]+)<\/span>)?.*?(?:<span class="year">([0-9]+)<\/span>)?[^>]+>[^>]+><p>(.*?)<\/p>'
|
||||
return support.scrape(item, patron, ['url', 'thumb', 'type', 'title', 'lang' 'rating', 'year', 'plot'], headers, type_content_dict={'movie':['Film'], 'tvshow':['TV']}, type_action_dict={'findvideos':['Film'], 'episodios':['TV']})
|
||||
|
||||
def newep(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
page = 1
|
||||
if item.page:
|
||||
page = item.page
|
||||
|
||||
matches = support.match(item, r'<div class="poster"><img src="([^"]+)" alt="([^"]+)">[^>]+><a href="([^"]+)">')[0]
|
||||
|
||||
for i, (thumb, title, url) in enumerate(matches):
|
||||
if (page - 1) * PERPAGE > i: continue
|
||||
if i >= page * PERPAGE: break
|
||||
title = scrapertoolsV2.decodeHtmlentities(title)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
title= support.typo(title,'bold'),
|
||||
url=url,
|
||||
thumbnail=thumb))
|
||||
support.pagination(itemlist, item, page, PERPAGE)
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
def episodios(item):
|
||||
return support.scrape(item, r'<a href="([^"]+)"><img src="([^"]+)">.*?<div class="numerando">([^<]+).*?<div class="episodiotitle">[^>]+>([^<]+)<\/a>',['url', 'thumb', 'episode', 'title'], patron_block='<div id="seasons">(.*?)<div class="sbox')
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
itemlist =[]
|
||||
|
||||
@@ -3,34 +3,9 @@
|
||||
"name": "Italia Serie",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"language": ["ita","vosi"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/italiaserie.png",
|
||||
"categories": ["tvshow"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -2,42 +2,90 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per italiaserie
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
|
||||
|
||||
from core import httptools, scrapertools, support
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
from specials import autoplay
|
||||
|
||||
__channel__ = 'italiaserie'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
list_servers = ['speedvideo']
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_quality = []
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
support.menu(itemlist, 'Ultime Uscite', 'peliculas', host + "/category/serie-tv/", "episode")
|
||||
support.menu(itemlist, 'Ultimi Episodi', 'peliculas', host + "/ultimi-episodi/", "episode", 'latest')
|
||||
support.menu(itemlist, 'Categorie', 'menu', host, "episode", args="Serie-Tv per Genere")
|
||||
tvshow = ['/category/serie-tv/',
|
||||
('Aggiornamenti', ['/ultimi-episodi/', 'peliculas', 'latest']),
|
||||
('Generi', ['', 'category', 'Serie-Tv per Genere'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
autoplay.init(item.channel, list_servers, [])
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
|
||||
return itemlist
|
||||
action = 'episodios'
|
||||
patron = r'<div class="post-thumb">\s*<a href="(?P<url>[^"]+)" '\
|
||||
'title="(?P<title>[^"]+)">\s*<img src="(?P<thumb>[^"]+)"[^>]+>'
|
||||
|
||||
if item.args == "latest":
|
||||
patron += r'.*?aj-eps">(?P<episode>.+?)[ ]?(?P<lang>Sub-Ita|Ita)</span>'
|
||||
patronNext = r'<a class="next page-numbers" href="(.*?)">'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
support.log()
|
||||
|
||||
action = 'peliculas'
|
||||
patron = r'<li class="cat-item.*?href="(?P<url>[^"]+)".*?>(?P<title>.*?)</a>'
|
||||
|
||||
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
|
||||
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 []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("[italiaserie.py]==> newest" + categoria)
|
||||
support.log("newest", categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
@@ -51,7 +99,7 @@ def newest(categoria):
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
@@ -61,111 +109,6 @@ def newest(categoria):
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
patron = r'<div class="post-thumb">\s*<a href="([^"]+)" title="([^"]+)">\s*<img src="([^"]+)"[^>]+>'
|
||||
list_groups = ["url", "title", "thumb"]
|
||||
|
||||
if item.args == "latest":
|
||||
patron += r'.*?aj-eps">(.*?)</span>'
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
matches = re.compile(patron, re.S).findall(data)
|
||||
itemlist = []
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail, scrapedep in matches:
|
||||
s, ep = scrapertools.find_single_match(scrapedep, r'(\d+)x(\d+)\s')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
contentType=item.contentType,
|
||||
title="[B]" + scrapedtitle + "[/B] " + scrapedep,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
extra=item.extra,
|
||||
args={"season": s, "episode": ep}
|
||||
))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
else:
|
||||
patron_next = r'<a class="next page-numbers" href="(.*?)">'
|
||||
itemlist = support.scrape(item, patron, list_groups, patronNext=patron_next, action="episodios")
|
||||
|
||||
if itemlist[-1].action != "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
support.log("s=", 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 []
|
||||
|
||||
|
||||
def menu(item):
|
||||
support.log()
|
||||
patron = r'<li class="cat-item.*?href="([^"]+)".*?>(.*?)</a>'
|
||||
return support.scrape(item, patron, ["url", "title"], action="peliculas")
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.log()
|
||||
|
||||
patron = r'<div class="su-spoiler.*?</i>(.*?)</div>\s+<div class="su-spoiler-content"(.*?)="clearfix">'
|
||||
data = httptools.downloadpage(item.url).data
|
||||
matches = re.compile(patron, re.S).findall(data)
|
||||
|
||||
if item.args:
|
||||
s = (int(item.args["season"]))
|
||||
try:
|
||||
matches = [matches[s]]
|
||||
except:
|
||||
matches = [matches[(s - 1)]]
|
||||
|
||||
itemlist = []
|
||||
|
||||
for season, block in matches:
|
||||
patron = r'<div class="su-link-ep">\s+<a.*?href="([^"]+)".*?strong>(.*?)</'
|
||||
if item.args:
|
||||
ep = int(item.args["episode"])
|
||||
patron = r'<div class="su-link-ep">\s+<a.*?href="([^"]+)".*?strong>\s(Episodio ' + str(ep) + r') .*?</'
|
||||
episodes = re.compile(patron, re.MULTILINE).findall(block)
|
||||
for scrapedurl, scrapedtitle in episodes:
|
||||
fixedtitle = scrapertools.get_season_and_episode(season + " " + scrapedtitle)
|
||||
eptitle = re.sub(r"Episodio\s+\d+", "", scrapedtitle).strip()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title="[B]" + fixedtitle + " " + eptitle + "[/B]",
|
||||
fulltitle=fixedtitle + " " + eptitle,
|
||||
show=fixedtitle + " " + eptitle,
|
||||
url=scrapedurl,
|
||||
extra=item.extra,
|
||||
))
|
||||
|
||||
if not item.args:
|
||||
support.videolibrary(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
|
||||
itemlist = support.server(item, data=item.url)
|
||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
return support.server(item, data=item.url)
|
||||
|
||||
@@ -2,6 +2,31 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per MondoLunatico 2.0
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
WARNING:
|
||||
questo sito è una kakatura di kazz...incredibile!!!
|
||||
Per renderlo compatibile con support ci vuole MOLTA PAZIENZA!!!
|
||||
|
||||
Problemi noti che non superano il test del canale:
|
||||
Nelle pagine dei "FILM", film e serie nel sito sono mischiate,
|
||||
I titoli quindi non saranno nello stesso numero nelle pagine del canale.
|
||||
Alcuni Titoli sono pagine informative e NON devono apparire nel CANALE!!!
|
||||
Controllare:
|
||||
-che nelle varie sezioni dei FILM appaiano solo FILM, stessa cosa per le serie.
|
||||
-che effettivamente vengano tagliati solo gli avvisi.
|
||||
|
||||
Nella TOP FILM non ci sono le voci lingua, anno ( quindi niente TMDB o vari ) e qualità
|
||||
Nella pagina delle serie potreste trovare solo il titolo senza stagione ed episodio
|
||||
Nel menu contestuale potreste non trovare le voci:
|
||||
-"Aggiungi in Videoteca"
|
||||
-"Scarica" di qualunque tipo: stagione, serie, etc...
|
||||
|
||||
AVVISO:
|
||||
i link 1fichier hanno bisogno dei DNS modificati
|
||||
il server woof potrebbe rispondere con "connettore assente"
|
||||
I titoli nella sezione SUB-ITA che non riportano Sub-ITA sono in lingua originale senza sottotitoli
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
import urlparse
|
||||
@@ -13,7 +38,7 @@ from channelselector import thumb
|
||||
from specials import autoplay, filtertools
|
||||
from core import scrapertools, httptools, tmdb, servertools, support, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import logger, config, platformtools
|
||||
from platformcode import config, platformtools #,logger
|
||||
|
||||
__channel__ = "mondolunatico2"
|
||||
host = config.get_channel_url(__channel__)
|
||||
@@ -22,178 +47,98 @@ headers = [['Referer', host]]
|
||||
list_servers = ['verystream', 'wstream', 'openload', 'streamango']
|
||||
list_quality = ['HD', 'default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
|
||||
# Main options
|
||||
itemlist = []
|
||||
support.menu(itemlist, 'Novità bold', 'carousel', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Sub ITA bold', 'carousel_subita', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Ultime Richieste Inserite bold', 'carousel_request', host, contentType='movie', args='movies')
|
||||
support.menu(itemlist, 'Film Nelle Sale bold', 'carousel_cinema', host, contentType='movie', args='movies')
|
||||
('Film Ultimi Inseriti ', [, 'carousel_last', 'movies'])
|
||||
('Film Top ImDb ', ['/top-imdb/', 'top_imdb', 'movies'])
|
||||
support.menu(itemlist, 'Serie TV', 'carousel_episodes', host, contentTyp='episode', args='tvshows')
|
||||
('Serie TV Top ImDb ', ['/top-imdb/', 'top_serie', 'tvshows'])
|
||||
top = [('Film', ['/genre/film-aggiornati/', 'peliculas', 'movies']),
|
||||
('Al Cinema', ['/genre/al-cinema/', 'peliculas', 'cinema']),
|
||||
('Ultimi Aggiunti', ['/movies/', 'peliculas', 'latest']),
|
||||
('Ultime Richieste', ['/genre/richieste/', 'peliculas', 'request']),
|
||||
('Top ImDb', ['/top-imdb/', 'peliculas', 'top']),
|
||||
('Sub-ITA', ['/genre/subita/', 'peliculas', 'sub']),
|
||||
('Serie TV', ['/tvshows/', 'peliculas', '', 'tvshow']),
|
||||
('Top ImDb', ['/top-imdb/', 'peliculas', 'top', 'tvshow']),
|
||||
('Search...',['', 'search', 'search'])
|
||||
]
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
return locals()
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
|
||||
def carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie"):
|
||||
logger.info("[mondolunatico2.py] carousel")
|
||||
itemlist = []
|
||||
action = 'findvideos'
|
||||
blacklist = ['Avviso Agli Utenti',]
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
if item.args != 'search':
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
patron = r'class="item movies"><div class="poster"><img src="(?P<thumb>[^"]+)"'\
|
||||
'[^>]+>(?:<div class="rating">)?[^>]+>.+?(?P<rating>\d+.\d+|\d+)'\
|
||||
'[^>]+>[^>]+>[^>]+>(:?(?P<lang>SubITA)?|(?P<quality>[^<]+)?)?'\
|
||||
'<.+?href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>(?P<title>.+?)</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<year>\d+)</span>'\
|
||||
'[^>]+>(?P<duration>\d+)?.+?<[^>]+>(?:[^>]+>[^>]+>[^>]+>[^>]+>)(?P<plot>.+?)<'
|
||||
if item.args == 'movies':
|
||||
patronBlock = r'<h1>\*Film Aggiornati</h1>(?P<block>.*?)<div class="pagination">'
|
||||
elif item.args == 'cinema':
|
||||
patronBlock = r'<h1>\*Al Cinema</h1>(?P<block>.*?)<div class="pagination">'
|
||||
elif item.args == 'latest':
|
||||
patronBlock = r'<h1>Film</h1>(?P<block>.*?)<div class="pagination">'
|
||||
elif item.args == 'request':
|
||||
patronBlock = r'<h1>\*Richieste</h1>(?P<block>.*?)<div class="pagination">'
|
||||
elif item.args == 'sub':
|
||||
patronBlock = r'<h1>\*SubITA</h1>(?P<block>.*?)<div class="pagination">'
|
||||
elif item.args == 'top':
|
||||
patronBlock = r'<h3>Film</h3>(?P<block>.*?)<div class="top-imdb-list tright">'
|
||||
patron = r'<div class="image"><div class="[^"]+"><a href="(?P<url>[^"]+)"'\
|
||||
'[^"]+"(?P<thumb>[^"]+)"[^"]+alt="(?P<title>[^"]+)">[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<'
|
||||
pagination = 25
|
||||
else:
|
||||
action = 'episodios'
|
||||
if item.args == 'top':
|
||||
patronBlock = r'<h3>TVShows</h3>(?P<block>.*?)<h2 class="widget-title">'
|
||||
patron = r'<div class="image"><div class="[^"]+"><a href="(?P<url>[^"]+)"'\
|
||||
'[^"]+"(?P<thumb>[^"]+)"[^"]+alt="(?P<title>[^"]+)">[^>]+>[^>]+>'\
|
||||
'[^>]+>[^>]+>[^>]+>[^>]+>(?P<rating>[^<]+)<'
|
||||
else:
|
||||
patronBlock = r'<h1>Serie T[v|V]</h1>(?P<block>.*?)<div class="pagination">'
|
||||
patron = r'class="item tvshows">[^>]+>.+?src="(?P<thumb>[^"]+)".+?>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)">[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+)</h4>[^>]+>[^>]+> (?:<span class="imdb">IMDb: (?P<rating>\d+.\d+|\d+|N\/A)(?:</span>)?[^>]+>(?P<year>\d+))?<[^>]+>[^>]+>[^>]+>(?:[^>]+>[^>]+>(?P<plot>[^<]+)<)'
|
||||
else:
|
||||
patronBlock = r'<h1>Results found\:.+?</h1>(?P<block>.*?)<div class="sidebar scrolling">'
|
||||
patron = r'<div class="result-item">[^>]+>[^>]+>[^>]+>.+?href="(?P<url>[^"]+)">.+?src="(?P<thumb>[^"]+)" alt="(?P<title>[^"]+)"[^>]+>[^>]+>(?P<type>[^>]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>IMDb (?P<rating>\d+.\d+|\d+)[^>]+>[^>]+>(?P<year>\d+)<[^>]+>[^>]+>[^>]+>[^>]+>(:?[^>]+>[^>]+>)?(?P<plot>[^<]+)<'
|
||||
|
||||
block = scrapertools.find_single_match(data,regex)
|
||||
type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
||||
type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||
|
||||
patron = r'<article id.*?src="([^"]+).*?alt="([^"]+).*?href="([^"]+).*?,.([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
patronNext = r'<span class="current">.*?href="([^"]+)" class="inactive">'
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl, year in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=__channel__,
|
||||
action="findvideos",
|
||||
contentType=contentType,
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]",
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=item.args,
|
||||
infoLabels={'year': year},
|
||||
thumbnail=scrapedthumbnail))
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_subita(item):
|
||||
return carousel(item, regex=r'<h2>Film SubITA</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_request(item):
|
||||
return carousel(item, regex=r'<h2>Ultime Richieste Inserite</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_cinema(item):
|
||||
return carousel(item, regex=r'<h2>Nelle Sale</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_last(item):
|
||||
return carousel(item, regex=r'<h2>Ultimi Film Inseriti</h2>(.*?)<header>', contentType="movie")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def carousel_episodes(item):
|
||||
return carousel(item, regex=r'<h2>Serie TV</h2>(.*?)<header>', contentType="episode")
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def top_imdb(item, contentType='movie', regex=r'<h1.*?TOP IMDb.*?<h3>(.*?)<h3>'):
|
||||
logger.info("[mondolunatico2.py] top_imdb")
|
||||
itemlist = []
|
||||
|
||||
minpage = 20
|
||||
p = 1
|
||||
if '{}' in item.url:
|
||||
item.url, p = item.url.split('{}')
|
||||
p = int(p)
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
block = scrapertools.find_single_match(data, regex)
|
||||
|
||||
patron = r"<div class='image'><div class='[^']+'><a href='([^']+)'[^']+'([^']+)'[^']+'([^']+)"
|
||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||
|
||||
for i, (scrapedurl, scrapedthumbnail, scrapedtitle) in enumerate(matches):
|
||||
if (p - 1) * minpage > i: continue
|
||||
if i >= p * minpage: break
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
scrapedthumbnail = scrapedthumbnail.replace ("-90x135","").replace("/w92/", "/w600_and_h900_bestv2/")
|
||||
itemlist.append(
|
||||
Item(channel=__channel__,
|
||||
action="findvideos" if "movie" in contentType else "episodios",
|
||||
contentType=item.contentType,
|
||||
contentTitle=scrapedtitle,
|
||||
title=scrapedtitle,
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
args=item.args))
|
||||
|
||||
if len(matches) >= p * minpage:
|
||||
thumbnail = thumb(itemlist=[])
|
||||
scrapedurl = item.url + '{}' + str(p + 1)
|
||||
itemlist.append(
|
||||
Item(channel=__channel__,
|
||||
contentType=item.contentType,
|
||||
action="top_imdb",
|
||||
title="[COLOR blue][B]Successivo >[/B][/COLOR]",
|
||||
thumbnail=thumbnail,
|
||||
url=scrapedurl))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
def top_serie(item):
|
||||
return top_imdb(item, contentType='episode', regex=r'<h3>TVShows</h3>(.*?)<div class="sidebar scrolling">')
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[mondolunatico2.py] " + item.url + " search " + texto)
|
||||
support.log('s-> '+texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("[mondolunatico2.py] peliculas")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = r'<div class="result-item">.*?<a href="([^"]+).*?src="([^"]+).*?alt="([^"]+).*?span class="([^"]+).*?<span class="year">([^<]+).*?<p>([^<]+)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle, args, year, scrapedplot in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedtitle = re.sub(r'[0-9]{4}', "", scrapedtitle)
|
||||
type = "[COLOR aqua][Serie][/COLOR]" if "tvshows" in item.args else "[COLOR aqua][Film][/COLOR]"
|
||||
itemlist.append(
|
||||
Item(channel=__channel__,
|
||||
action="episodios" if "tvshows" in item.args else "findvideos",
|
||||
contentType="episode" if "tvshows" in item.args else "movie",
|
||||
title=scrapedtitle + " " + "[COLOR orange][" + year + "][/COLOR]" + " " + type,
|
||||
fulltitle=scrapedtitle,
|
||||
thumbnail=scrapedthumbnail,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
args=args,
|
||||
infoLabels={'year':year},
|
||||
plot=scrapedplot))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[mondolunatico2.py] findvideos")
|
||||
support.log()
|
||||
|
||||
if item.args == "tvshows":
|
||||
if item.contentType == "tvshow":
|
||||
ret=support.dooplay_get_links(item, host)
|
||||
|
||||
if ret == []:
|
||||
@@ -202,16 +147,16 @@ def findvideos(item):
|
||||
item.url = ret[0]["url"]
|
||||
return videoplayer(item)
|
||||
|
||||
if item.args == "movies" or "movie":
|
||||
#if item.args == "movies" or "movie":
|
||||
if item.contentType == 'movie':
|
||||
return videoplayer(item)
|
||||
|
||||
else:
|
||||
return halfplayer(item)
|
||||
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def episodios(item):
|
||||
logger.info("[mondolunatico2.py] episodios")
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
@@ -265,7 +210,7 @@ def episodios(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player(item):
|
||||
logger.info ("[mondolunatico2.py] player")
|
||||
support.log()
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
@@ -326,6 +271,7 @@ def player(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def player_list(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
@@ -364,7 +310,7 @@ def player_list(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def dooplayer(item):
|
||||
logger.info ("[mondolunatico2.py] dooplayer")
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
url = item.url
|
||||
@@ -410,6 +356,7 @@ def dooplayer(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def keeplink(item):
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
# Scarico la pagina
|
||||
@@ -445,7 +392,7 @@ def keeplink(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def videoplayer(item):
|
||||
logger.info("[mondolunatico2.py] videoplayer")
|
||||
support.log()
|
||||
itemlist = []
|
||||
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
@@ -475,7 +422,7 @@ def videoplayer(item):
|
||||
# ---------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
def halfplayer(item):
|
||||
logger.info("[mondolunatico2.py] halfplayer")
|
||||
support.log()
|
||||
|
||||
url=item.url
|
||||
|
||||
|
||||
@@ -6,39 +6,31 @@
|
||||
"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"],
|
||||
"categories": ["anime","tvshow","movie", "documentary"],
|
||||
"settings": [
|
||||
{
|
||||
"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
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_anime",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Anime",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -2,199 +2,158 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per serietvonline
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
"""
|
||||
|
||||
from channelselector import thumb
|
||||
from core import httptools, scrapertoolsV2, servertools, tmdb, support
|
||||
from core.item import Item
|
||||
from lib import unshortenit
|
||||
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.
|
||||
|
||||
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...
|
||||
|
||||
"""
|
||||
|
||||
from core import support
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
|
||||
__channel__ = "serietvonline"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['akvideo', 'wstream', 'backin', 'vidto', 'nowvideo']
|
||||
list_servers = ['akvideo', 'wstream', 'backin', 'vidtome', 'nowvideo']
|
||||
list_quality = ['default']
|
||||
|
||||
PERPAGE = 30
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
logger.info(item.channel + 'mainlist')
|
||||
support.log()
|
||||
|
||||
itemlist = web_menu()
|
||||
support.menu(itemlist, "Cerca Film... color kod", 'search', '', 'movie')
|
||||
support.menu(itemlist, "Cerca Serie... color kod", 'search', '', 'episode')
|
||||
film = ['/lista-film/',
|
||||
('Ultimi Aggiunti', ['/ultimi-film-aggiunti/', 'peliculas', 'latest'])
|
||||
]
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
tvshow = ['',
|
||||
('HD', ['/lista-serie-tv-in-altadefinizione/', 'peliculas', 'hd'])
|
||||
]
|
||||
|
||||
anime = ['/lista-cartoni-animati-e-anime/']
|
||||
|
||||
def web_menu():
|
||||
itemlist=[]
|
||||
documentari = [('Documentari', ['/lista-documentari/' , 'peliculas' , 'doc', 'tvshow'])]
|
||||
|
||||
data = httptools.downloadpage(host, headers=headers).data
|
||||
matches = scrapertoolsV2.find_multiple_matches(data, r'<li class="page_item.*?><a href="([^"]+)">(.*?)<\/a>')
|
||||
blacklist = ['DMCA','Contatti','Attenzione NON FARTI OSCURARE']
|
||||
search = ''
|
||||
|
||||
for url, title in matches:
|
||||
if not title in blacklist:
|
||||
title = title.replace('Lista ','') + ' bold'
|
||||
if 'film' in title.lower():
|
||||
contentType = 'movie'
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
|
||||
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:
|
||||
contentType = 'episode'
|
||||
support.menu(itemlist, title, 'peliculas', url,contentType=contentType)
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
item.infoLabels['mediatype'] = 'tvshow'
|
||||
support.log("ITEMHOOK DOPO: ", item)
|
||||
|
||||
return itemlist
|
||||
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>'
|
||||
|
||||
patronNext = r'<div class="siguiente"><a href="([^"]+)" >'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
support.log()
|
||||
|
||||
action = 'findvideos'
|
||||
patronBlock = r'<table>(?P<block>.*?)<\/table>'
|
||||
|
||||
patron = r'<tr><td>(?:[^<]+)[ ](?:Parte)?(?P<episode>\d+x\d+|\d+)(?:|[ ]?'\
|
||||
'(?P<title2>.+?)?)<(?P<url>.*?)</td><tr>'
|
||||
|
||||
## debug = True
|
||||
return locals()
|
||||
|
||||
def findvideos(item):
|
||||
support.log()
|
||||
if item.contentType == 'movie':
|
||||
return support.server(item, headers=headers)
|
||||
else:
|
||||
return support.server(item, item.url)
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info(item.channel + 'search' + texto)
|
||||
|
||||
item.url = host + "/?s= " + texto
|
||||
|
||||
return search_peliculas(item)
|
||||
|
||||
|
||||
def search_peliculas(item):
|
||||
logger.info(item.channel + 'search_peliculas')
|
||||
|
||||
logger.info('TYPE= ' + item.contentType)
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'episodios'
|
||||
|
||||
return support.scrape(item, r'<a href="([^"]+)"><span[^>]+><[^>]+><\/a>[^h]+h2>(.*?)<',
|
||||
["url", "title"], patronNext="<a rel='nofollow' class=previouspostslink href='([^']+)'",
|
||||
headers=headers, action=action)
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info(item.channel + 'peliculas')
|
||||
itemlist = []
|
||||
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'episodios'
|
||||
|
||||
page = 1
|
||||
if '{}' in item.url:
|
||||
item.url, page = item.url.split('{}')
|
||||
page = int(page)
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
block = scrapertoolsV2.find_single_match(data, r'id="lcp_instance_0">(.*?)<\/ul>')
|
||||
matches = re.compile(r'<a\s*href="([^"]+)" title="([^<]+)">[^<]+</a>', re.DOTALL).findall(block)
|
||||
|
||||
for i, (url, title) in enumerate(matches):
|
||||
if (page - 1) * PERPAGE > i: continue
|
||||
if i >= page * PERPAGE: break
|
||||
title = scrapertoolsV2.decodeHtmlentities(title)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action=action,
|
||||
title=title,
|
||||
contentTitle=title,
|
||||
fulltitle=title,
|
||||
url=url,
|
||||
contentType=item.contentType,
|
||||
show=title))
|
||||
|
||||
if len(matches) >= page * PERPAGE:
|
||||
url = item.url + '{}' + str(page + 1)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title="[COLOR blue]" + config.get_localized_string(30992) + " >[/COLOR]",
|
||||
url=url,
|
||||
thumbnail=thumb(),
|
||||
contentType=item.contentType))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info(item.channel + 'episodios')
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
block= scrapertoolsV2.find_single_match(data, r'<table>(.*?)<\/table>')
|
||||
|
||||
matches = re.compile(r'<tr><td>(.*?)</td><tr>', re.DOTALL).findall(block)
|
||||
|
||||
for episode in matches:
|
||||
episode = "<td class=\"title\">" + episode
|
||||
logger.info('EPISODE= ' + episode)
|
||||
title = scrapertoolsV2.find_single_match(episode, '<td class="title">(.*?)</td>')
|
||||
title = title.replace(item.title, "")
|
||||
if scrapertoolsV2.find_single_match(title, '([0-9]+x[0-9]+)'):
|
||||
title = scrapertoolsV2.find_single_match(title, '([0-9]+x[0-9]+)') + ' - ' + re.sub('([0-9]+x[0-9]+)',' -',title)
|
||||
elif scrapertoolsV2.find_single_match(title, ' ([0-9][0-9])') and not scrapertoolsV2.find_single_match(title, ' ([0-9][0-9][0-9])'):
|
||||
title = '1x' + scrapertoolsV2.find_single_match(title, ' ([0-9]+)') + ' - ' + re.sub(' ([0-9]+)',' -',title)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
fulltitle=title,
|
||||
contentType="episode",
|
||||
show=title,
|
||||
title=title,
|
||||
url=episode))
|
||||
|
||||
support.videolibrary(itemlist,item,'bold color kod')
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info(item.channel + 'findvideos')
|
||||
itemlist=[]
|
||||
logger.info('TYPE= ' + item.contentType)
|
||||
if item.contentType == 'movie':
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
logger.info('DATA= ' + data)
|
||||
item.url= scrapertoolsV2.find_single_match(data, r'<table>(.*?)<\/table>')
|
||||
|
||||
urls = scrapertoolsV2.find_multiple_matches(item.url, r"<a href='([^']+)'.*?>.*?>.*?([a-zA-Z]+).*?<\/a>")
|
||||
logger.info('EXTRA= ' + item.extra)
|
||||
for url, server in urls:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='play',
|
||||
title=item.title + ' [COLOR blue][' + server + '][/COLOR]',
|
||||
contentType="movie",
|
||||
server=server,
|
||||
url=url))
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
|
||||
data, c = unshortenit.unshorten(item.url)
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.channel = item.channel
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
|
||||
support.log("CERCA :" ,texto, item)
|
||||
item.url = "%s/?s=%s" % (host, 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 []
|
||||
|
||||
@@ -3,12 +3,19 @@
|
||||
# Canale per SerieTVU
|
||||
# Thanks to Icarus crew & Alfa addon & 4l3x87
|
||||
# ----------------------------------------------------------
|
||||
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
import re
|
||||
|
||||
from core import tmdb, scrapertools, support
|
||||
from core.item import Item
|
||||
from core.support import log
|
||||
from platformcode import logger, config
|
||||
from platformcode import config, logger
|
||||
|
||||
__channel__ = 'serietvu'
|
||||
host = config.get_channel_url(__channel__)
|
||||
@@ -22,6 +29,7 @@ list_quality = ['default']
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
tvshow = ['/category/serie-tv',
|
||||
('Novità', ['/ultimi-episodi', 'latestep']),
|
||||
('Categorie', ['', 'categorie'])
|
||||
@@ -32,6 +40,7 @@ def mainlist(item):
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
def cleantitle(scrapedtitle):
|
||||
log()
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip())
|
||||
scrapedtitle = scrapedtitle.replace('[HD]', '').replace('’', '\'').replace('– Il Trono di Spade', '').replace(
|
||||
'Flash 2014', 'Flash').replace('"', "'")
|
||||
@@ -292,10 +301,16 @@ def search(item, texto):
|
||||
# ================================================================================================================
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------------------
|
||||
@support.scrape
|
||||
def categorie(item):
|
||||
log()
|
||||
patron_block= r'<h2>Sfoglia</h2>\s*<ul>(.*?)</ul>\s*</section>'
|
||||
patron = r'<li><a href="([^"]+)">([^<]+)</a></li>'
|
||||
return support.scrape(item, patron, ['url','title'], patron_block=patron_block, action='peliculas', blacklist=["Home Page", "Calendario Aggiornamenti"])
|
||||
|
||||
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()
|
||||
|
||||
# ================================================================================================================
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Streaming Altadefinizione
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
@@ -69,4 +75,4 @@ def findvideos(item):
|
||||
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
return itemlist
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Tantifilm
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
|
||||
import re
|
||||
|
||||
@@ -24,25 +31,45 @@ host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
film = ['/film/',
|
||||
('Al Cinema', ['/watch-genre/al-cinema/', 'peliculas', 'movie']),
|
||||
('HD',['/watch-genre/altadefinizione/', 'peliculas', 'movie']),
|
||||
('Categorie', ['', 'category', 'movie'])
|
||||
]
|
||||
|
||||
menu(itemlist, 'Film', 'peliculas', host + '/film/', 'movie', args='movie')
|
||||
menu(itemlist, 'Film Al Cinema submenu', 'peliculas', host + '/watch-genre/al-cinema/', 'movie')
|
||||
menu(itemlist, 'Film HD submenu', 'peliculas', host + '/watch-genre/altadefinizione/', 'movie')
|
||||
menu(itemlist, 'Film Per Categoria submenu', 'category', host, 'movie')
|
||||
menu(itemlist, 'Cerca film... submenu color kod', 'search', contentType='movie', args='findvideos')
|
||||
menu(itemlist, 'Serie TV', 'peliculas', host + '/watch-genre/serie-tv/', contentType='episode')
|
||||
menu(itemlist, 'Serie TV HD submenu', 'peliculas', host + '/watch-genre/serie-altadefinizione/', contentType='episode')
|
||||
menu(itemlist, 'Miniserie submenu', 'peliculas', host + '/watch-genre/miniserie/', contentType='episode', args='serie')
|
||||
menu(itemlist, 'Programmi TV submenu', 'peliculas', host + '/watch-genre/programmi-tv/', contentType='episode')
|
||||
menu(itemlist, 'Anime submenu', 'peliculas', host + '/watch-genre/anime/', contentType='episode', args='anime')
|
||||
menu(itemlist, 'Cerca Serie TV... submenu color kod', 'search', contentType='episode', args='episodios')
|
||||
aplay(item, itemlist, list_servers, list_quality)
|
||||
tvshow = ['/watch-genre/serie-tv/',
|
||||
('HD', ['/watch-genre/serie-altadefinizione/', 'peliculas']),
|
||||
('Miniserie', ['/watch-genre/miniserie/', 'peliculas', 'serie']),
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/', 'peliculas'])
|
||||
]
|
||||
|
||||
return itemlist
|
||||
pinco = [('Anime', ['/watch-genre/anime/', 'peliculas', 'anime'])]
|
||||
|
||||
|
||||
return locals()
|
||||
|
||||
##def mainlist(item):
|
||||
## log()
|
||||
## itemlist = []
|
||||
##
|
||||
## menu(itemlist, 'Film', 'peliculas', host + '/film/', 'movie', args='movie')
|
||||
## menu(itemlist, 'Film Al Cinema submenu', 'peliculas', host + '/watch-genre/al-cinema/', 'movie')
|
||||
## menu(itemlist, 'Film HD submenu', 'peliculas', host + '/watch-genre/altadefinizione/', 'movie')
|
||||
## menu(itemlist, 'Film Per Categoria submenu', 'category', host, 'movie')
|
||||
## menu(itemlist, 'Cerca film... submenu color kod', 'search', contentType='movie', args='findvideos')
|
||||
## menu(itemlist, 'Serie TV', 'peliculas', host + '/watch-genre/serie-tv/', contentType='episode')
|
||||
## menu(itemlist, 'Serie TV HD submenu', 'peliculas', host + '/watch-genre/serie-altadefinizione/', contentType='episode')
|
||||
## menu(itemlist, 'Miniserie submenu', 'peliculas', host + '/watch-genre/miniserie/', contentType='episode', args='serie')
|
||||
## menu(itemlist, 'Programmi TV submenu', 'peliculas', host + '/watch-genre/programmi-tv/', contentType='episode')
|
||||
## menu(itemlist, 'Anime submenu', 'peliculas', host + '/watch-genre/anime/', contentType='episode', args='anime')
|
||||
## menu(itemlist, 'Cerca Serie TV... submenu color kod', 'search', contentType='episode', args='episodios')
|
||||
## aplay(item, itemlist, list_servers, list_quality)
|
||||
##
|
||||
## return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
@@ -120,24 +147,43 @@ def search_peliculas(item):
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
blacklist = ['Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema', 'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers', 'Serie TV Aggiornate', 'Aggiornamenti', 'Featured']
|
||||
itemlist = support.scrape(item, '<li><a href="([^"]+)"><span></span>([^<]+)</a></li>', ['url', 'title'], headers, blacklist, patron_block='<ul class="table-list">(.*?)</ul>', action='peliculas')
|
||||
return support.thumb(itemlist)
|
||||
log()
|
||||
action = 'peliculas'
|
||||
blacklist = ['Serie TV Altadefinizione', 'HD AltaDefinizione', 'Al Cinema',
|
||||
'Serie TV', 'Miniserie', 'Programmi Tv', 'Live', 'Trailers',
|
||||
'Serie TV Aggiornate', 'Aggiornamenti', 'Featured', 'Ultimi Film Aggiornati']
|
||||
|
||||
patron = r'<li><a href="(?P<url>[^"]+)"><span></span>(?P<title>[^<]+)</a></li>'
|
||||
patronBlock = r'<ul class="table-list">(?P<block>.*?)</ul>'
|
||||
|
||||
return locals()
|
||||
## itemlist = support.scrape(item, '<li><a href="([^"]+)"><span></span>([^<]+)</a></li>', ['url', 'title'], headers, blacklist, patron_block='<ul class="table-list">(.*?)</ul>', action='peliculas')
|
||||
|
||||
## return support.thumb(itemlist)
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
|
||||
action = 'findvideos' if item.extra == 'movie' else 'episodios'
|
||||
if item.args == 'movie':
|
||||
patron= r'<div class="mediaWrap mediaWrapAlt">[^<]+<a href="([^"]+)" title="Permalink to\s([^"]+) \(([^<]+)\).*?"[^>]+>[^<]+<img[^s]+src="([^"]+)"[^>]+>[^<]+<\/a>.*?<p>\s*([a-zA-Z-0-9]+)\s*<\/p>'
|
||||
itemlist = support.scrape(item, patron, ['url', 'title', 'year', 'thumb', 'quality'], headers, action=action, patron_block='<div id="main_col">(.*?)main_col', patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
|
||||
if item.args == 'movie' or item.extra == 'movie':
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">[^<]+<a href="(?P<url>[^"]+)" title="Permalink to\s(?P<title>[^"]+) \((?P<year>[^<]+)\).*?"[^>]+>[^<]+<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>[^<]+<\/a>.*?<p>\s*(?P<quality>[a-zA-Z-0-9]+)\s*<\/p>'
|
||||
patronBlock = '<div id="main_col">(?P<block>.*?)main_col'
|
||||
## itemlist = support.scrape(item, patron, ['url', 'title', 'year', 'thumb', 'quality'], headers, action=action, patron_block='<div id="main_col">(.*?)main_col', patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
patronNext = '<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
|
||||
else:
|
||||
patron = r'<div class="media3">[^>]+><a href="([^"]+)"><img[^s]+src="([^"]+)"[^>]+><\/a><[^>]+><a[^<]+><p>([^<]+) \(([^\)]+)[^<]+<\/p>.*?<p>\s*([a-zA-Z-0-9]+)\s*<\/p>'
|
||||
itemlist = support.scrape(item, patron, ['url', 'thumb', 'title', 'year', 'quality'], headers, action=action, patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
patron = r'<div class="media3">[^>]+><a href="(?P<url>[^"]+)"><img[^s]+src="(?P<thumb>[^"]+)"[^>]+><\/a><[^>]+><a[^<]+><p>(?P<title>[^<]+) \((?P<year>[^\)]+)[^<]+<\/p>.*?<p>\s*(?P<quality>[a-zA-Z-0-9]+)\s*<\/p>'
|
||||
patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
action = action
|
||||
# itemlist = support.scrape(item, patron, ['url', 'thumb', 'title', 'year', 'quality'], headers, action=action, patronNext='<a class="nextpostslink" rel="next" href="([^"]+)">')
|
||||
if item.args == 'anime': autorenumber.renumber(itemlist)
|
||||
return itemlist
|
||||
|
||||
## return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
def episodios(item):
|
||||
@@ -149,7 +195,9 @@ def episodios(item):
|
||||
|
||||
# Check if is series
|
||||
check = scrapertoolsV2.find_single_match(data.replace('\t','').replace('\n',''), r'<div class="category-film"><h3>([^<]+)<\/h3>')
|
||||
|
||||
if 'serie tv' not in check.lower(): return findvideos(item)
|
||||
|
||||
elif 'anime' in check.lower(): return findvideos(item)
|
||||
|
||||
patron = r'<iframe src="([^"]+)" scrolling="no" frameborder="0" width="626" height="550" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">'
|
||||
|
||||
@@ -124,9 +124,11 @@ def set_category_context(item):
|
||||
|
||||
def get_channels_list():
|
||||
logger.info()
|
||||
|
||||
list_canales = {'peliculas': [], '4k': [], 'terror': [], 'infantiles': [], 'series': [], 'anime': [],
|
||||
'castellano': [], 'latino':[], 'italiano':[], 'torrent':[], 'documentales': []}
|
||||
## import web_pdb; web_pdb.set_trace()
|
||||
## list_canales = {'peliculas': [], '4k': [], 'terror': [], 'infantiles': [], 'series': [], 'anime': [],
|
||||
## 'castellano': [], 'latino':[], 'italiano':[], 'torrent':[], 'documentales': []}
|
||||
list_canales = {'peliculas': [], 'series': [],'anime': [], 'italiano':[], 'documentales': []}
|
||||
|
||||
any_active = False
|
||||
# Rellenar listas de canales disponibles
|
||||
channels_path = os.path.join(config.get_runtime_path(), "channels", '*.json')
|
||||
|
||||
Reference in New Issue
Block a user