KoD 0.5.1
-override DNS di default -nuovi canali: streamtime e netfreex -fixato cloudflare -aggiunta opzione apri nel browser
This commit is contained in:
@@ -124,3 +124,12 @@ def findvideos(item):
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"id": "bleachportal",
|
||||
"name": "BleachPortal",
|
||||
"language": ["sub-ita"],
|
||||
"active": true,
|
||||
"deprecated": true,
|
||||
"adult": false,
|
||||
"fanart": "https://www.thetvdb.com/banners/fanart/original/74796-29.jpg",
|
||||
"thumbnail": "bleachportal.png",
|
||||
"banner": "bleachportal.png",
|
||||
"categories": ["anime"],
|
||||
"not_active":["include_in_newests", "include_in_global_search"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Ringraziamo Icarus crew
|
||||
# ------------------------------------------------------------
|
||||
# XBMC Plugin
|
||||
# Canale per http://bleachportal.it
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import re
|
||||
|
||||
from core import scrapertools, httptools
|
||||
from core.item import Item
|
||||
from platformcode import logger
|
||||
from platformcode import config
|
||||
from core import support
|
||||
|
||||
host = "http://www.bleachportal.it"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("[BleachPortal.py]==> mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="episodi",
|
||||
title= support.typo('Bleach','bold'),
|
||||
url=host + "/streaming/bleach/stream_bleach.htm",
|
||||
thumbnail="https://www.thetvdb.com/banners/posters/74796-14.jpg",
|
||||
banner="https://www.thetvdb.com/banners/graphical/74796-g6.jpg",
|
||||
fanart="https://www.thetvdb.com/banners/fanart/original/74796-30.jpg",
|
||||
extra="bleach"),
|
||||
Item(channel=item.channel,
|
||||
action="episodi",
|
||||
title=support.typo('D.Gray Man','bold'),
|
||||
url=host + "/streaming/d.gray-man/stream_dgray-man.htm",
|
||||
thumbnail="https://www.thetvdb.com/banners/posters/79635-1.jpg",
|
||||
banner="https://www.thetvdb.com/banners/graphical/79635-g4.jpg",
|
||||
fanart="https://www.thetvdb.com/banners/fanart/original/79635-6.jpg",
|
||||
extra="dgrayman")]
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodi(item):
|
||||
logger.info("[BleachPortal.py]==> episodi")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">\D+([\d\-]+)\s?<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
animetitle = "Bleach" if item.extra == "bleach" else "D.Gray Man"
|
||||
for scrapednumber, scrapedtitle, scrapedurl in matches:
|
||||
scrapedtitle = scrapedtitle.decode('latin1').encode('utf8')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=support.typo("%s Episodio %s" % (animetitle, scrapednumber),'bold'),
|
||||
url=item.url.replace("stream_bleach.htm",scrapedurl) if "stream_bleach.htm" in item.url else item.url.replace("stream_dgray-man.htm", scrapedurl),
|
||||
plot=scrapedtitle,
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
fulltitle="%s Ep: %s | %s" % (animetitle, scrapednumber, scrapedtitle)))
|
||||
|
||||
if item.extra == "bleach":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="oav",
|
||||
title=support.typo("OAV e Movies",'bold color kod'),
|
||||
url=item.url.replace("stream_bleach.htm", "stream_bleach_movie_oav.htm"),
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart))
|
||||
|
||||
return list(reversed(itemlist))
|
||||
|
||||
|
||||
def oav(item):
|
||||
logger.info("[BleachPortal.py]==> oav")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
patron = r'<td>?[<span\s|<width="\d+%"\s]+?class="[^"]+">-\s+(.*?)<[^<]+<[^<]+<[^<]+<[^<]+<.*?\s+?.*?<span style="[^"]+">([^<]+).*?\s?.*?<a href="\.*(/?[^"]+)">'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapednumber, scrapedtitle, scrapedurl in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=support.typo(scrapednumber, 'bold'),
|
||||
url=item.url.replace("stream_bleach_movie_oav.htm", scrapedurl),
|
||||
plot=scrapedtitle,
|
||||
extra=item.extra,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapednumber + " | " + scrapedtitle))
|
||||
|
||||
return list(reversed(itemlist))
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[BleachPortal.py]==> findvideos")
|
||||
itemlist = []
|
||||
|
||||
if "bleach//" in item.url:
|
||||
item.url = re.sub(r'\w+//', "", item.url)
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
if "bleach" in item.extra:
|
||||
video = scrapertools.find_single_match(data, 'file: "(.*?)",')
|
||||
else:
|
||||
video = scrapertools.find_single_match(data, 'file=(.*?)&').rsplit('/', 1)[-1]
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
title="Diretto %s" % item.title,
|
||||
url=item.url.replace(item.url.split("/")[-1], "/" + video),
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=item.fulltitle))
|
||||
return itemlist
|
||||
@@ -199,11 +199,9 @@ def findvideos(item):
|
||||
if item.contentType != 'movie':
|
||||
return support.server(item, item.url)
|
||||
else:
|
||||
block = r'<div class="col-md-10">(.+?)<div class="swappable" id="links">'
|
||||
patron = r'SRC="([^"]+)"'
|
||||
links = re.findall(patron, block, re.IGNORECASE)
|
||||
if "#" in links:
|
||||
links = link.replace('#', 'speedvideo.net')
|
||||
links = str(support.match(item, r'SRC="([^"]+)"', patronBlock=r'<div class="col-md-10">(.+?)<div class="swappable" id="links">')[0])
|
||||
if links:
|
||||
links = links.replace('#', 'speedvideo.net')
|
||||
return support.server(item, links)
|
||||
else:
|
||||
return support.server(item)
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
"adult": false,
|
||||
"thumbnail": "cb01.png",
|
||||
"banner": "cb01.png",
|
||||
"categories": ["tvshow", "movie", "vos"],
|
||||
"categories": ["tvshow", "movie", "vos", "documentary"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -50,6 +50,9 @@ def mainlist(item):
|
||||
('Per anno', ['/serietv/', 'menu', 'Serie-Tv per Anno']),
|
||||
('Ultime Aggiornate', ['/serietv/', 'peliculas', 'newest'])
|
||||
]
|
||||
docu = [('Documentari bullet bold', ['/category/documentario/', 'peliculas']),
|
||||
('HD submenu', ['category/hd-alta-definizione/documentario-hd/', 'peliculas'])
|
||||
]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"adult": false,
|
||||
"thumbnail": "cinemalibero.png",
|
||||
"banner": "cinemalibero.png",
|
||||
"categories": ["movie","tvshow","anime"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"categories": ["movie","tvshow"],
|
||||
"not_active": ["include_in_newest_anime"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+72
-115
@@ -3,29 +3,15 @@
|
||||
# Canale per 'cinemaLibero'
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Questi sono commenti per i beta-tester.
|
||||
|
||||
Su questo canale in:
|
||||
- Cerca ( nel canale ) e Ricerca Globale
|
||||
- SerieTV e novità del canale
|
||||
- Novità -> SerieTV
|
||||
non saranno presenti le voci:
|
||||
- 'Aggiungi alla Videoteca',
|
||||
- 'Scarica Serie'
|
||||
- NON SONO PRESENTI IN NOVITà GLOBALE E del CANALE RIGUARDANTI LO SPORT!!!!
|
||||
dunque, la loro assenza, nel Test, NON dovrà essere segnalata come ERRORE.
|
||||
25 titoli per le novità
|
||||
|
||||
NON CONTROLLARE LA SEZIONE SPORT, HA PROBLEMI!!!
|
||||
NON CONTROLLARE LE SEZIONE SPORT - ANIME, HANNO PROBLEMI!!!
|
||||
è stata eliminata dall'elenco ma i titoli possono apparire nella ricerca o tra le novità
|
||||
Non è errore se dà problemi!!! NON CONSIDERATELA!
|
||||
|
||||
Novità. Indicare in quale/i sezione/i è presente il canale:
|
||||
- FILM
|
||||
|
||||
Avvisi:
|
||||
- Eventuali avvisi per i tester
|
||||
|
||||
Ulteriori info:
|
||||
- FILM - SERIE
|
||||
|
||||
"""
|
||||
|
||||
@@ -35,52 +21,62 @@ from core import httptools, support, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
list_servers = ['akstream', 'wstream', 'backin', 'verystream', 'openload', 'streamango']
|
||||
list_servers = ['akstream', 'wstream', 'backin']
|
||||
list_quality = ['default']
|
||||
|
||||
__channel__ = "cinemalibero"
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
support.log()
|
||||
|
||||
film = ['/category/film/',
|
||||
('Novità', ['', 'peliculas', 'update']),
|
||||
('Generi', ['', 'genres'])
|
||||
]
|
||||
|
||||
tvshow = ['/category/serie-tv/'
|
||||
]
|
||||
|
||||
Anime = [(support.typo('Anime', 'bullet bold'),['/category/anime-giapponesi/', 'peliculas', 'anime', 'tvshow'])
|
||||
]
|
||||
|
||||
## Sport = [(support.typo('Sport', 'bullet bold'), ['/category/sport/', 'peliculas', '', 'tvshow'])
|
||||
## Anime = [(support.typo('Anime', 'bullet bold'),['/category/anime-giapponesi/', 'peliculas', 'anime', 'tvshow'])
|
||||
## ]
|
||||
## news = [('Novità Serie-Anime', ['/aggiornamenti-serie-tv/', 'peliculas', 'update', 'tvshow'])]
|
||||
|
||||
## Sport = [(support.typo('Sport', 'bullet bold'), ['/category/sport/', 'peliculas', 'sport', 'tvshow'])
|
||||
## ]
|
||||
news = [('Novità Serie-Anime', ['/aggiornamenti-serie-tv/', 'peliculas', 'update', 'tvshow'])]
|
||||
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
#def video(item):
|
||||
def peliculas(item):
|
||||
support.log()
|
||||
#debug = True
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
GENERI = scrapertoolsV2.find_multiple_matches(data, r'<a class="dropdown-item" href="[^"]+" title="([A-z]+)"')
|
||||
|
||||
patronBlock = r'<div class="container">.*?class="col-md-12[^"]*?">(?P<block>.*?)<div class=(?:"container"|"bg-dark ")>'
|
||||
if item.contentType == 'movie':
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>\s?(?P<rating>[\d\.]+)?[^>]+>[^>]+>(?P<title>.+?)\(?(?P<year>\d+)?\)?<[^>]+>[^>]+>(?P<quality>[^<]+)?<'
|
||||
elif item.args == 'anime':
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>\s?(?P<rating>[\d\.]+)?[^>]+>[^>]+>(?P<title>.+?)\(?(?P<year>\d+)?\)?<[^>]+>[^>]+>(?:.+?[^fFiInNeE]+?\(?(?P<lang>[sSuUbBiItTaA]+)\)?.+?)<'
|
||||
elif item.args == 'update':
|
||||
action = 'select'
|
||||
patron = r'<div class="card-body p-0">\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ]<div class="genere">(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="(?P<title>.+?)(?:[ ]\[(?P<lang>[sSuUbB\-iItTaA]+)\])?(?:[ ]\((?P<year>\d{4})\))?"\salt="[^"]+"\sclass="[^"]+"(?: style="background-image: url\((?P<thumb>.+?)\)">)?<div class="voto">[^>]+>[^>]+>.(?P<rating>[\d\.a-zA-Z\/]+)?[^>]+>[^>]+>[^>]+>(?:<div class="genere">(?P<quality>[^<]+)</div>)?'
|
||||
if item.args == 'update':
|
||||
patronBlock = r'<section id="slider">(?P<block>.*?)</section>'
|
||||
patron = r'<a href="(?P<url>(?:https:\/\/.+?\/(?P<title>[^\/]+[a-zA-Z0-9\-]+)(?P<year>\d{4})))/".+?url\((?P<thumb>[^\)]+)\)">'
|
||||
elif item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
patron = r'<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
if item.args == 'anime':
|
||||
anime = True
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>\s?(?P<rating>[\d\.]+)?[^>]+>[^>]+>(?P<title>.+?)\(?(?P<year>\d+)?\)?<[^>]+>[^>]+>(?:.+?[^fFiInNeE]+?\(?(?P<lang>[sSuUbBiItTaA]+)\)?.+?)<'
|
||||
elif item.args == 'update':
|
||||
patron = r'<a href="(?P<url>[^"]+)".+?url\((?P<thumb>.+?)\)">\s<div class="titolo">(?P<title>.+?)(?: – Serie TV)?(?:\([sSuUbBiItTaA\-]+\))?[ ]?(?P<year>\d{4})?</div>[ ]<div class="genere">(?:[\w]+?\.?\s?[\s|S]?[\dx\-S]+?\s\(?(?P<lang>[iItTaA]+|[sSuUbBiItTaA\-]+)\)?\s?(?P<quality>[HD]+)?|.+?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?</div>)'
|
||||
pagination = 25
|
||||
else:
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>[^<]+)<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
#search
|
||||
patron = r'<div class="col-lg-3">[^>]+>[^>]+>\s<a href="(?P<url>[^"]+)".+?url\((?P<thumb>[^\)]+)\)">[^>]+>[^>]+>[^>]+>(?:[^>]+>)?\s?(?P<rating>[\d\.]+)?[^>]+>(?P<title>.+?)(?:[ ]\((?P<year>\d{4})\))?<[^>]+>[^>]+>(.?[\d\-x]+\s\(?(?P<lang>[sSuUbBiItTaA\-]+)?\)?\s?(?P<quality>[\w]+)?[|]?\s?(?:[fFiInNeE]+)?\s?\(?(?P<lang2>[sSuUbBiItTaA\-]+)?\)?)?'
|
||||
|
||||
def itemHook(item):
|
||||
if item.lang2:
|
||||
@@ -89,56 +85,60 @@ def peliculas(item):
|
||||
item.contentLanguage = item.lang2
|
||||
item.title += support.typo(item.lang2, '_ [] color kod')
|
||||
|
||||
if item.contentType == 'movie':
|
||||
item.action = 'findvideos'
|
||||
elif item.args == 'anime' or item.args == 'update' or item.args == 'search':
|
||||
item.action = 'select'
|
||||
elif item.contentType == 'tvshow':
|
||||
item.extra = 'serie'
|
||||
dataBlock = httptools.downloadpage(item.url, headers=headers).data
|
||||
genere = scrapertoolsV2.find_single_match(dataBlock, r'rel="category tag">([a-zA-Z0-9]+).+?<')
|
||||
|
||||
if genere.lower() in str(GENERI).lower():
|
||||
item.contentType = 'movie'
|
||||
action = 'findvideos'
|
||||
if item.args == 'update':
|
||||
item.title = item.title.replace('-',' ')
|
||||
elif genere.lower() == 'serie':
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
elif genere.lower() == 'anime':
|
||||
blockAnime = scrapertoolsV2.find_single_match(dataBlock, r'<div id="container" class="container">(.+?)<div style="margin-left')
|
||||
if 'stagione' in blockAnime.lower() or 'episodio' in blockAnime.lower() or 'saga' in blockAnime.lower():
|
||||
anime = True
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.action = 'findvideos'
|
||||
item.url = scrapertoolsV2.find_single_match(blockAnime, r'<span class="txt_dow">(?:.+?)?Streaming:(?:.+?)?</span>(.*?)<div style="margin-left:')
|
||||
else:
|
||||
item.action = 'select'
|
||||
# Tutto il resto!!
|
||||
pass
|
||||
|
||||
return item
|
||||
|
||||
patronNext = r'<a class="next page-numbers".*?href="([^"]+)">'
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item): # Questa def. deve sempre essere nominata episodios
|
||||
support.log()
|
||||
def episodios(item):
|
||||
|
||||
if item.extra == 'serie' or item.contentType == 'tvshow':
|
||||
if item.args == 'anime':
|
||||
support.log("Anime :", item)
|
||||
blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555', 'Cloudvideo']
|
||||
patron = r'(Stagione (?P<season>\d+))?.+?<a target=(?P<url>[^>]+>(?P<title>.+?(?P<episode>\d+)))(?:[:]?.+?)(?:</a></p>|</a><br />)'
|
||||
patronBlock = r'Stagione (?P<season>\d+)</span><br />(?P<block>.*?)(?:<div style="margin-left:|<span class="txt_dow">)'
|
||||
item.contentType = 'tvshow'
|
||||
item.contentSerieName = item.fulltitle
|
||||
else:# item.extra == 'serie':
|
||||
support.log("Serie :", item)
|
||||
patron = r'(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?[ ]?(?:(?P<title>[^<]+)(?P<url>.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)'
|
||||
patronBlock = r'<p><strong>(?P<block>(?:.+?[Ss]tagione.+?(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?(?:|.+?|</strong>)(/?:</span>)?</p>.*?</p>)'
|
||||
item.contentType = 'tvshow'
|
||||
item.contentSerieName = item.fulltitle
|
||||
elif item.args == 'anime':
|
||||
support.log("Anime :", item)
|
||||
blacklist = ['Clipwatching', 'Verystream', 'Easybytez', 'Flix555']
|
||||
#patron = r'(?:href="[ ]?(?P<url>[^"]+)"[^>]+>(?P<title>[^<]+))<|(?P<episode>\d+(?:×|×)?\d+\-\d+|\d+(?:×|×)\d+)[;]?(?:(\4[^<]+)(\2.*?)|(\2[ ])(?:<(\3.*?)))(?:</a><br />|</a></p>)'
|
||||
#patron = r'<a target=.+?href="(?P<url>[^"]+)"[^>]+>(?P<title>(Epis|).+?(?P<episode>\d+)?)(?:\((?P<lang>Sub ITA)\))?</a>(?:<br />)?'
|
||||
patron = r'<a target=(?P<url>.+?(?:rel="noopener noreferrer">(?P<title>[^<]+)))</a>.+?(?:</a></p>|</a><br />)'
|
||||
patronBlock = r'Streaming.+?:(?P<block>.*?)</div>'
|
||||
#patronBlock = r'(?:<p>)?(?P<block>.*?)(?:</a><br /> |</p><div)'
|
||||
item.contentType = 'tvshow'
|
||||
item.contentSerieName = item.fulltitle
|
||||
else:
|
||||
support.log('extra = else --- select = ### è un film ###')
|
||||
return findvideos(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
show=item.fulltitle,
|
||||
contentType='movie'))
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def genres(item):
|
||||
support.log()
|
||||
|
||||
action='peliculas'
|
||||
patron_block=r'<div id="bordobar" class="dropdown-menu(?P<block>.*?)</li>'
|
||||
@@ -147,46 +147,6 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def select(item):
|
||||
support.log()
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
block = scrapertoolsV2.find_single_match(data, r'Streaming\s?[\w]+?:(.*?)<\/div>')
|
||||
if re.findall('rel="category tag">serie', data, re.IGNORECASE):
|
||||
support.log('select = ### è una serie ###')
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
contentSerieName = item.fulltitle,
|
||||
url=item.url,
|
||||
extra='serie',
|
||||
contentType='episode'))
|
||||
elif re.findall('rel="category tag">anime', data, re.IGNORECASE):
|
||||
if re.findall('episodio', block, re.IGNORECASE) or re.findall('episodi streaming', block, re.IGNORECASE) or \
|
||||
re.findall('numero stagioni', data, re.IGNORECASE):
|
||||
support.log('select = ### è un anime ###')
|
||||
return episodios(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
contentSerieName = item.fulltitle,
|
||||
url=item.url,
|
||||
args='anime',
|
||||
contentType='episode'))
|
||||
else:
|
||||
support.log('select anime ELSE = ### è un film ###')
|
||||
return findvideos(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
contentType='movie'))
|
||||
else:
|
||||
support.log('select ELSE = ### è un film ###')
|
||||
return findvideos(Item(channel=item.channel,
|
||||
title=item.title,
|
||||
fulltitle=item.fulltitle,
|
||||
url=item.url,
|
||||
contentType='movie'))
|
||||
|
||||
def search(item, texto):
|
||||
support.log(item.url,texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
@@ -209,29 +169,26 @@ def newest(categoria):
|
||||
if categoria == 'peliculas':
|
||||
item.url = host+'/category/film/'
|
||||
item.contentType = 'movie'
|
||||
## item.action = 'peliculas'
|
||||
## itemlist = peliculas(item)
|
||||
## elif categoria == 'series':
|
||||
## item.contentType = 'tvshow'
|
||||
## item.args = 'update'
|
||||
## item.url = host+'/aggiornamenti-serie-tv/'
|
||||
elif categoria == 'series' or categoria == 'anime':
|
||||
item.args = 'update'
|
||||
item.url = host+'/aggiornamenti-serie-tv/'
|
||||
item.action = 'peliculas'
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == 'peliculas':
|
||||
itemlist.pop()
|
||||
## if itemlist[-1].action == 'peliculas':
|
||||
## itemlist.pop()
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.log('newest log: ', {0}.format(line))
|
||||
support.log('newest log: ', (line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
support.log('findvideos ->', item)
|
||||
if item.contentType == 'movie':
|
||||
if item.contentType == 'movie' and item.args != 'anime':
|
||||
return support.server(item)
|
||||
else:
|
||||
return support.server(item, data= item.url)
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
{
|
||||
"id": "filmsenzalimiti",
|
||||
"name": "Filmsenzalimiti",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "filmsenzalimiti.png",
|
||||
"banner": "filmsenzalimiti.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"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_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", "2", "5", "10" ]
|
||||
},
|
||||
{
|
||||
"id": "filter_languages",
|
||||
"type": "list",
|
||||
"label": "Mostra link in lingua...",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": ["Non filtrare","IT"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,222 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# 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
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
from platformcode import logger
|
||||
from specials import autoplay
|
||||
|
||||
__channel__ = 'filmsenzalimiti'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'vidoza', 'okru']
|
||||
list_quality = ['1080p', '720p', '480p', '360']
|
||||
|
||||
checklinks = config.get_setting('checklinks', 'filmsenzalimiti')
|
||||
checklinks_number = config.get_setting('checklinks_number', 'filmsenzalimiti')
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info('[filmsenzalimiti.py] mainlist')
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action='video',
|
||||
title='Film',
|
||||
contentType='movie',
|
||||
url=host,
|
||||
thumbnail= ''),
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title='Novità',
|
||||
contentType='movie',
|
||||
url=host + '/category/nuove-uscite',
|
||||
thumbnail=''),
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title='In Sala',
|
||||
contentType='movie',
|
||||
url=host + '/category/in-sala',
|
||||
thumbnail=''),
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title='Sottotitolati',
|
||||
contentType='movie',
|
||||
url=host + '/category/sub-ita',
|
||||
thumbnail=''),
|
||||
Item(channel=item.channel,
|
||||
action='sottomenu',
|
||||
title='[B]Categoria[/B]',
|
||||
contentType='movie',
|
||||
url=host,
|
||||
thumbnail=''),
|
||||
Item(channel=item.channel,
|
||||
action='search',
|
||||
extra='tvshow',
|
||||
title='[B]Cerca...[/B]',
|
||||
contentType='movie',
|
||||
thumbnail='')]
|
||||
|
||||
autoplay.show_option(item.channel, itemlist)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info('[filmsenzalimiti.py] search')
|
||||
|
||||
item.url = host + '/?s=' + texto
|
||||
|
||||
try:
|
||||
return cerca(item)
|
||||
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error('%s' % line)
|
||||
return []
|
||||
|
||||
|
||||
def sottomenu(item):
|
||||
logger.info('[filmsenzalimiti.py] sottomenu')
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = '<li class="cat-item.*?<a href="([^"]+)">(.*?)<'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl))
|
||||
|
||||
# Elimina Film dal Sottomenù
|
||||
itemlist.pop(0)
|
||||
|
||||
return itemlist
|
||||
|
||||
@support.scrape
|
||||
def video(item):
|
||||
logger.info('[filmsenzalimiti.py] video')
|
||||
itemlist = []
|
||||
|
||||
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
|
||||
return locals()
|
||||
def cerca(item):
|
||||
logger.info('[filmsenzalimiti.py] cerca')
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url).data.replace('\t','').replace('\n','')
|
||||
logger.info('[filmsenzalimiti.py] video' +data)
|
||||
|
||||
patron = '<div class="list-score">(.*?)<.*?<a href="([^"]+)" title="([^"]+)"><img src="([^"]+)"'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedrating, scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedthumbnail = httptools.get_url_headers(scrapedthumbnail)
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
||||
scrapedrating = scrapertools.decodeHtmlentities(scrapedrating)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='findvideos',
|
||||
title=scrapedtitle + ' (' + scrapedrating + ')',
|
||||
fulltitle=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
show=scrapedtitle,
|
||||
contentType=item.contentType,
|
||||
thumbnail=scrapedthumbnail), tipo='movie')
|
||||
|
||||
patron = '<a href="([^"]+)"><i class="glyphicon glyphicon-chevron-right"'
|
||||
next_page = scrapertools.find_single_match(data, patron)
|
||||
if next_page != '':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action='video',
|
||||
title='[COLOR lightgreen]' + config.get_localized_string(30992) + '[/COLOR]',
|
||||
contentType=item.contentType,
|
||||
url=next_page))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info('[filmsenzalimiti.py] findvideos')
|
||||
|
||||
itemlist = support.hdpass_get_servers(item)
|
||||
|
||||
# Link Aggiungi alla Libreria
|
||||
if item.contentType == 'movie':
|
||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findservers':
|
||||
itemlist.append(
|
||||
Item(channel=item.channel, title='[COLOR lightblue][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
|
||||
action="add_pelicula_to_library", extra="findservers", contentTitle=item.contentTitle))
|
||||
|
||||
#Necessario per filtrare i Link
|
||||
if checklinks:
|
||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||
|
||||
# Necessario per FilterTools
|
||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
|
||||
# Necessario per AutoPlay
|
||||
autoplay.start(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def play(item):
|
||||
itemlist = servertools.find_video_items(data=item.url)
|
||||
|
||||
return itemlist
|
||||
|
||||
def newest(categoria):
|
||||
logger.info('[filmsenzalimiti.py] newest' + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
|
||||
## cambiare i valori 'peliculas, infantiles, series, anime, documentales por los que correspondan aqui en
|
||||
# nel py e nel json ###
|
||||
if categoria == 'peliculas':
|
||||
item.url = host
|
||||
itemlist = video(item)
|
||||
|
||||
if 'Successivo>>' in itemlist[-1].title:
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error('{0}'.format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
"id": "guardarefilm",
|
||||
"name": "Guardarefilm",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/guardarefilm.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/guardarefilm.png",
|
||||
"categories": ["tvshow","movie"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi ricerca globale",
|
||||
"default": false,
|
||||
"enabled": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_series",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Serie TV",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,313 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per guardarefilm
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
import urlparse
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = 'guardarefilm'
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("kod.guardarefilm mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
title="[COLOR azure]Novita'[/COLOR]",
|
||||
action="peliculas",
|
||||
url="%s/streaming-al-cinema/" % host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]HD[/COLOR]",
|
||||
action="peliculas",
|
||||
url="%s/film-streaming-hd/" % host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Popolari[/COLOR]",
|
||||
action="pelis_top100",
|
||||
url="%s/top100.html" % host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Categorie[/COLOR]",
|
||||
action="categorias",
|
||||
url=host+'/streaming-film/',
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Animazione[/COLOR]",
|
||||
action="peliculas",
|
||||
url="%s/streaming-cartoni-animati/" % host,
|
||||
thumbnail="http://orig09.deviantart.net/df5a/f/2014/169/2/a/fist_of_the_north_star_folder_icon_by_minacsky_saya-d7mq8c8.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR yellow]Cerca...[/COLOR]",
|
||||
action="search",
|
||||
extra="movie",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Serie TV[/COLOR]",
|
||||
action="peliculas_tv",
|
||||
extra="tvshow",
|
||||
url="%s/serie-tv-streaming/" % host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR yellow]Cerca Serie TV...[/COLOR]",
|
||||
action="search",
|
||||
extra="tvshow",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("kod.guardarefilm newest" + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host + "/streaming-al-cinema/"
|
||||
item.action = "peliculas"
|
||||
itemlist = peliculas(item)
|
||||
|
||||
if itemlist[-1].action == "peliculas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def categorias(item):
|
||||
logger.info("kod.guardarefilm categorias")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Narrow search by selecting only the combo
|
||||
bloque = scrapertools.find_single_match(data, '<ul class="reset dropmenu">(.*?)</ul>')
|
||||
|
||||
# The categories are the options for the combo
|
||||
patron = '<li><a href="([^"]+)">(.*?)</a></li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(bloque)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedurl = urlparse.urljoin(item.url, scrapedurl)
|
||||
scrapedthumbnail = ""
|
||||
scrapedplot = ""
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[guardarefilm.py] " + item.url + " search " + texto)
|
||||
section = ""
|
||||
if item.extra == "tvshow":
|
||||
section = "0"
|
||||
elif item.extra == "movie":
|
||||
section = "1"
|
||||
item.url = '%s?do=search_advanced&q=%s§ion=%s&director=&actor=&year_from=&year_to=' % (host, texto, section)
|
||||
try:
|
||||
if item.extra == "movie":
|
||||
return peliculas(item)
|
||||
if item.extra == "tvshow":
|
||||
return peliculas_tv(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
logger.info("kod.guardarefilm peliculas")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Estrae i contenuti
|
||||
patron = '<div class="poster"><a href="([^"]+)".*?><img src="([^"]+)".*?><span.*?</div>\s*'
|
||||
patron += '<div.*?><a.*?>(.*?)</a></div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios" if item.extra == "tvshow" else "findvideos",
|
||||
contentType="movie",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=urlparse.urljoin(host, scrapedthumbnail),
|
||||
plot=scrapedplot,
|
||||
folder=True))
|
||||
|
||||
# Paginazione
|
||||
patronvideos = '<div class="pages".*?<span>.*?<a href="([^"]+)">'
|
||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
scrapedurl = urlparse.urljoin(item.url, matches[0])
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def peliculas_tv(item):
|
||||
logger.info("kod.guardarefilm peliculas")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Estrae i contenuti
|
||||
patron = '<div class="poster"><a href="([^"]+)".*?><img src="([^"]+)".*?><span.*?</div>\s*'
|
||||
patron += '<div.*?><a.*?>(.*?)</a></div>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
scrapedplot = ""
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios" if item.extra == "tvshow" else "findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=urlparse.urljoin(host, scrapedthumbnail),
|
||||
plot=scrapedplot,
|
||||
folder=True))
|
||||
|
||||
# Paginazione
|
||||
patronvideos = '<div class="pages".*?<span>.*?<a href="([^"]+)">'
|
||||
matches = re.compile(patronvideos, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
scrapedurl = urlparse.urljoin(item.url, matches[0])
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="peliculas_tv",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
def pelis_top100(item):
|
||||
logger.info("kod.guardarefilm peliculas")
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
# Estrae i contenuti
|
||||
patron = r'<span class="top100_title"><a href="([^"]+)">(.*?\(\d+\))</a>'
|
||||
matches = re.compile(patron).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
html = httptools.downloadpage(scrapedurl, headers=headers).data
|
||||
start = html.find("<div class=\"textwrap\" itemprop=\"description\">")
|
||||
end = html.find("</div>", start)
|
||||
scrapedplot = html[start:end]
|
||||
scrapedplot = re.sub(r'<[^>]*>', '', scrapedplot)
|
||||
scrapedplot = scrapertools.decodeHtmlentities(scrapedplot)
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
scrapedthumbnail = scrapertools.find_single_match(html, r'class="poster-wrapp"><a href="([^"]+)"')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios" if item.extra == "tvshow" else "findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=urlparse.urljoin(host, scrapedthumbnail),
|
||||
plot=scrapedplot,
|
||||
folder=True,
|
||||
fanart=host + scrapedthumbnail))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info("kod.guardarefilm episodios")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
patron = r'<li id="serie-[^"]+" data-title="Stai guardando: ([^"]+)">'
|
||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(.*?)</span>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedtitle, scrapedurl in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType="episode",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
extra=item.extra,
|
||||
fulltitle=item.fulltitle,
|
||||
show=item.show))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("kod.guardarefilm findvideos")
|
||||
|
||||
# Carica la pagina
|
||||
data = item.url if item.contentType == "episode" else httptools.downloadpage(item.url).data
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title + videoitem.title
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
|
||||
return itemlist
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"id": "guardaseriecc",
|
||||
"name": "Guardaserie.cc",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/costaplus\/images\/master\/posters\/guardaseriecc.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/costaplus\/images\/master\/posters\/guardaseriecc.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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per guardaseriecc
|
||||
#
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
from core import httptools, scrapertools, servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from lib import unshortenit
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = 'guardaseriecc'
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("Alfa.leserietv mainlist")
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="lista_serie",
|
||||
title="[COLOR azure]Tutte le serie[/COLOR]",
|
||||
url="%s/serietv/" % host,
|
||||
thumbnail=thumbnail_lista,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Categorie[/COLOR]",
|
||||
action="categoria",
|
||||
url=host,
|
||||
thumbnail=thumbnail_categoria,
|
||||
fanart=FilmFanart),
|
||||
Item(channel=item.channel,
|
||||
action="search",
|
||||
title="[COLOR orange]Cerca...[/COLOR]",
|
||||
thumbnail=thumbnail_cerca,
|
||||
fanart=FilmFanart)]
|
||||
return itemlist
|
||||
|
||||
|
||||
def categoria(item):
|
||||
logger.info("[Alfa].[guardareseriecc] [categoria]")
|
||||
itemlist = []
|
||||
|
||||
patron = '<li class="cat-item cat-item.*?"><a href="(.*?)".*?>(.*?)</a>'
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="lista_serie",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle, viewmode="movie"))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def lista_serie(item):
|
||||
logger.info("[Alfa].[guardareseriecc] [lista_serie]")
|
||||
itemlist = []
|
||||
patron = '<div.*?class="poster">[^<]+<img.*?src="(.*?)".*?alt="(.*?)"[^<]+<[^<]+<[^<]+<[^<]+<[^<]+<[^<]+<[^<]+<a.*?href="(.*?)">'
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl in matches:
|
||||
scrapedtitle = scrapedtitle.split("(")[0]
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle, viewmode="movie"))
|
||||
|
||||
# Paginazione
|
||||
# ===========================================================
|
||||
patron = 'class="current">.*?</span><a href=\'(.*?)\''
|
||||
matches = scrapertools.find_single_match(data, patron)
|
||||
logger.debug("pag " + matches)
|
||||
|
||||
# ===========================================================
|
||||
if len(matches) > 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="lista_serie",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=matches,
|
||||
thumbnail=thumbnail_successivo,
|
||||
folder=True))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def episodios(item):
|
||||
logger.info("[Alfa].[guardareseriecc] [stagione]")
|
||||
itemlist = []
|
||||
|
||||
patron = '<iframe.*class="metaframe rptss".*?src="(.*?)".*?frameborder=".*?".*?scrolling=".*?".*?allowfullscreen>.*?</iframe>'
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
elenco = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '</i>.*?Stagioni</a>.*?</ul>[^<]+<select.*?name="sea_select"'
|
||||
data = httptools.downloadpage(elenco, headers=headers).data
|
||||
select = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '<a.*?href="(.*?)".*?><i.*?<\/i>(.*?)</a></li>'
|
||||
stagione = scrapertools.find_multiple_matches(select, patron)
|
||||
scrapertools.printMatches(stagione)
|
||||
|
||||
for stagioneurl, stagionetitle in stagione:
|
||||
patron = '</i>.*?Episodio</a>(.*?)<select name="ep_select"'
|
||||
data = httptools.downloadpage(stagioneurl, headers=headers).data
|
||||
elenco = scrapertools.find_single_match(data, patron, 0)
|
||||
patron = '<a href="(.*?)" ><i class="fa.*?"></i>(.*?)</a></li>'
|
||||
episodi = scrapertools.find_multiple_matches(elenco, patron)
|
||||
|
||||
for scrapedurl, scrapedtitle in episodi:
|
||||
scrapedtitle = stagionetitle + "x" + scrapedtitle.replace(" ", "").zfill(2)
|
||||
itemlist.append(Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=item.thumbnail,
|
||||
fanart=item.fanart,
|
||||
plot=item.plot,
|
||||
fulltitle=scrapedtitle,
|
||||
contentType="episode",
|
||||
show=scrapedtitle, viewmode="movie"))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="episodios",
|
||||
contentType="episode",
|
||||
show=item.show))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[Alfa].[guardareseriecc] [findvideos]")
|
||||
itemlist = []
|
||||
listurl = set()
|
||||
|
||||
patron = r'<select.*?style="width:100px;" class="dynamic_select">(.*?)</select>'
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
elenco = scrapertools.find_single_match(data, patron, 0)
|
||||
|
||||
patron = '<a class="" href="(.*?)">(.*?)</a>'
|
||||
elenco_link = scrapertools.find_multiple_matches(elenco, patron)
|
||||
|
||||
for scrapedurl, scrapedtitle in elenco_link:
|
||||
data = httptools.downloadpage(scrapedurl, headers=headers).data
|
||||
if 'protectlink' in data:
|
||||
urls = scrapertools.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
for url in urls:
|
||||
url = url.decode('base64')
|
||||
# tiro via l'ultimo carattere perchè non c'entra
|
||||
url = unshortenit.unwrap_30x_only(url[:-1])
|
||||
listurl.add(url)
|
||||
|
||||
if listurl:
|
||||
itemlist = servertools.find_video_items(data=str(listurl))
|
||||
for videoitem in itemlist:
|
||||
videoitem.title = item.title + '[COLOR orange][B]' + videoitem.title + '[/B][/COLOR]'
|
||||
videoitem.fulltitle = item.fulltitle
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
videoitem.show = item.show
|
||||
videoitem.plot = item.plot
|
||||
videoitem.channel = item.channel
|
||||
videoitem.contentType = item.contentType
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[Alfa].[guardareseriecc][search] " + texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
|
||||
try:
|
||||
return ricerca(item)
|
||||
|
||||
# Continua la ricerca in caso di errore .
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def ricerca(item):
|
||||
logger.info("[Alfa].[guardareseriecc][ricerca] ")
|
||||
itemlist = []
|
||||
|
||||
patron = '<div class="result-item">[^>]+>[^>]+>[^>]+>[^<]+<a href="(.*?)">[^<]+<img src="(.*?)" alt="(.*?)" '
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
|
||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.split("(")[0]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="episodios",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle, viewmode="movie"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
FilmFanart = "https://superrepo.org/static/images/fanart/original/script.artwork.downloader.jpg"
|
||||
ThumbnailHome = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/81/Dynamic-blue-up.svg/580px-Dynamic-blue-up.svg.png"
|
||||
thumbnail_novita = "http://www.ilmioprofessionista.it/wp-content/uploads/2015/04/TVSeries3.png"
|
||||
thumbnail_lista = "http://www.ilmioprofessionista.it/wp-content/uploads/2015/04/TVSeries3.png"
|
||||
thumbnail_categoria = "https://farm8.staticflickr.com/7562/15516589868_13689936d0_o.png"
|
||||
thumbnail_top = "http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"
|
||||
thumbnail_cerca = "http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"
|
||||
thumbnail_successivo = "http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"
|
||||
|
||||
'''
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[Alfa].[guardareseriecc][search] " + texto)
|
||||
itemlist = []
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
patron = '<div class="result-item">[^>]+>[^>]+>[^>]+>[^<]+<a href="(.*?)">[^<]+<img src="(.*?)" alt="(.*?)" '
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
matches = scrapertools.find_multiple_matches(data,patron)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl,scrapedthumbnail,scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.split("(")[0]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="stagione",
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle, viewmode="movie")))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
'''
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"id": "guardogratis",
|
||||
"name": "GuardoGratis",
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "guardogratis.png",
|
||||
"bannermenu": "guardogratis.png",
|
||||
"categories": ["movie","tvshow"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,221 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per guardogratis
|
||||
#
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
import urlparse
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import servertools
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "guardogratis"
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("[guardogratis.py] mainlist")
|
||||
|
||||
# Main options
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="list_titles",
|
||||
title="[COLOR azure]Film[/COLOR]",
|
||||
url="%s/movies/" % host,
|
||||
extra="movie",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
action="list_titles",
|
||||
title="[COLOR azure]Top Film[/COLOR]",
|
||||
url="%s/top-imdb/" % host,
|
||||
extra="movie",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
action="categorie",
|
||||
title="[COLOR azure]Categorie[/COLOR]",
|
||||
url="%s" % host,
|
||||
extra="categorie",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
action="list_titles",
|
||||
title="[COLOR azure]Serie Tv[/COLOR]",
|
||||
url="%s/series/" % host,
|
||||
extra="tvshow",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
action="search",
|
||||
title="[COLOR yellow]Cerca Film[/COLOR]",
|
||||
extra="movie",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"),
|
||||
Item(channel=item.channel,
|
||||
action="search",
|
||||
title="[COLOR yellow]Cerca SerieTV[/COLOR]",
|
||||
extra="tvshow",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
||||
|
||||
return itemlist
|
||||
|
||||
def list_titles(item):
|
||||
logger.info("[guardogratis.py] list_titles")
|
||||
itemlist = []
|
||||
|
||||
tipo='movie'
|
||||
if 'tvshow' in item.extra: tipo='tv'
|
||||
|
||||
if item.url == "":
|
||||
item.url = host
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patronvideos = '<div data-movie-id=.*?href="([^"]+)".*?data-original="([^"]+)".*?<h2>([^<]+)<\/h2>.*?[I,T]MDb:\s*([^<]+)<\/div>'
|
||||
|
||||
matches = re.compile(patronvideos, re.DOTALL).finditer(data)
|
||||
|
||||
for match in matches:
|
||||
scrapedurl = urlparse.urljoin(item.url, match.group(1))
|
||||
scrapedthumbnail = urlparse.urljoin(item.url, match.group(2))
|
||||
scrapedthumbnail = scrapedthumbnail.replace(" ", "%20")
|
||||
rate=' IMDb: [[COLOR orange]%s[/COLOR]]' % match.group(4) if match.group(4)!='N/A'else ''
|
||||
scrapedtitle = scrapertools.unescape(match.group(3))
|
||||
#scrapedtitle = scrapertools.unescape(match.group(3))+rate
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos" if not 'tvshow' in item.extra else 'serietv',
|
||||
contentType="movie" if not 'tvshow' in item.extra else 'serie',
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
extra=item.extra,
|
||||
viewmode="movie_with_plot"))
|
||||
|
||||
nextpage_regex=''
|
||||
if item.extra in "movies,tvshow":
|
||||
nextpage_regex='<div id="pagination" style="margin: 0;">.*?active.*?href=\'([^\']+)\'.*?</div>'
|
||||
elif item.extra=="categorie":
|
||||
nextpage_regex='<li class=\'active\'>.*?href=\'([^\']+)\'.*?</a></li>'
|
||||
|
||||
if nextpage_regex:
|
||||
next_page = scrapertools.find_single_match(data, nextpage_regex)
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="list_titles",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url="%s" % next_page,
|
||||
extra=item.extra,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[guardogratis.py] search")
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
if item.extra == "movie":
|
||||
return list_titles(item)
|
||||
if item.extra == "tvshow":
|
||||
return list_titles(item)
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
def categorie(item):
|
||||
logger.info("[guardogratis.py] categorie")
|
||||
itemlist = []
|
||||
|
||||
if item.url == "":
|
||||
item.url = host
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patronvideos = '<li id="menu-item-.*?category.*?href="([^"]+)">([^"]+)</a>'
|
||||
|
||||
matches = re.compile(patronvideos, re.DOTALL).finditer(data)
|
||||
|
||||
for match in matches:
|
||||
scrapedurl = urlparse.urljoin(item.url, match.group(1))
|
||||
scrapedtitle = match.group(2)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="list_titles",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
extra=item.extra,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def serietv(item):
|
||||
logger.info("[guardogratis.py] serietv")
|
||||
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
patron = '<a href="([^"]+)">Episode[^<]+</a>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl in matches:
|
||||
scrapedplot = ""
|
||||
scrapedthumbnail = ""
|
||||
scrapedtitle = scrapedurl
|
||||
scrapedtitle = scrapedtitle.replace(host, "")
|
||||
scrapedtitle = scrapedtitle.replace("episode/", "")
|
||||
scrapedtitle = scrapedtitle.replace("/", "")
|
||||
scrapedtitle = scrapedtitle.replace("-", " ")
|
||||
scrapedtitle = scrapedtitle.title()
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle,
|
||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
plot=scrapedplot,
|
||||
folder=True))
|
||||
|
||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
||||
url=item.url,
|
||||
action="add_serie_to_library",
|
||||
extra="serietv",
|
||||
show=item.show))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[guardogratis.py] findvideos")
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
itemlist = servertools.find_video_items(data=data)
|
||||
for i in itemlist:
|
||||
tab=re.compile('<div\s*id="(tab[^"]+)"[^>]+>[^>]+>[^>]+src="http[s]*:%s[^"]+"'%i.url.replace('http:','').replace('https:',''), re.DOTALL).findall(data)
|
||||
qual=''
|
||||
if tab:
|
||||
qual=re.compile('<a\s*href="#%s">([^<]+)<'%tab[0], re.DOTALL).findall(data)[0].replace("'","")
|
||||
qual="[COLOR orange]%s[/COLOR] - "%qual
|
||||
i.title='%s[COLOR green][B]%s[/B][/COLOR] - %s'%(qual,i.title[2:],item.title)
|
||||
i.channel=__channel__
|
||||
i.fulltitle=item.title
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"id": "itastreaming",
|
||||
"name": "ItaStreaming",
|
||||
"active": false,
|
||||
"adult": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/itastreaming.png",
|
||||
"bannermenu": "https:\/\/raw.githubusercontent.com\/Zanzibar82\/images\/master\/posters\/itastreaming.png",
|
||||
"categories": ["movie"],
|
||||
"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_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,295 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per itastreaming
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
from core import scrapertools, httptools, tmdb, support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = 'itastreaming'
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info("[itastreaming.py] mainlist")
|
||||
|
||||
itemlist = [
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Home[/COLOR]",
|
||||
action="fichas",
|
||||
url=host,
|
||||
thumbnail=""),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Nuove uscite[/COLOR]",
|
||||
action="fichas",
|
||||
url=host + "/nuove-uscite/",
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Film per Genere[/COLOR]",
|
||||
action="genere",
|
||||
url=host,
|
||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Film per Qualita'[/COLOR]",
|
||||
action="quality",
|
||||
url=host,
|
||||
thumbnail="http://files.softicons.com/download/computer-icons/disks-icons-by-wil-nichols/png/256x256/Blu-Ray.png"),
|
||||
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR azure]Film A-Z[/COLOR]",
|
||||
action="atoz",
|
||||
url=host + "/tag/a/",
|
||||
thumbnail="http://i.imgur.com/IjCmx5r.png"),
|
||||
|
||||
Item(channel=item.channel,
|
||||
title="[COLOR orange]Cerca...[/COLOR]",
|
||||
action="search",
|
||||
extra="movie",
|
||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
logger.info("[itastreaming.py] newest" + categoria)
|
||||
itemlist = []
|
||||
item = Item()
|
||||
try:
|
||||
if categoria == "film":
|
||||
item.url = host + "/nuove-uscite/"
|
||||
item.action = "fichas"
|
||||
itemlist = fichas(item)
|
||||
|
||||
if itemlist[-1].action == "fichas":
|
||||
itemlist.pop()
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("{0}".format(line))
|
||||
return []
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("[itastreaming.py] " + item.url + " search " + texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
|
||||
try:
|
||||
return searchfilm(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def searchfilm(item):
|
||||
logger.info("[itastreaming.py] fichas")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# fix - calidad
|
||||
data = re.sub(
|
||||
r'<div class="wrapperImage"[^<]+<a',
|
||||
'<div class="wrapperImage"><fix>SD</fix><a',
|
||||
data
|
||||
)
|
||||
# fix - IMDB
|
||||
data = re.sub(
|
||||
r'<h5> </div>',
|
||||
'<fix>IMDB: 0.0</fix>',
|
||||
data
|
||||
)
|
||||
|
||||
patron = '<li class="s-item">.*?'
|
||||
patron += 'src="([^"]+)".*?'
|
||||
patron += 'alt="([^"]+)".*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedthumbnail, scrapedtitle, scrapedurl in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
|
||||
# ------------------------------------------------
|
||||
scrapedthumbnail = httptools.get_url_headers(scrapedthumbnail)
|
||||
# ------------------------------------------------
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=scrapedtitle,
|
||||
contentType="movie",
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle))
|
||||
|
||||
# Paginación
|
||||
next_page = scrapertools.find_single_match(data, "href='([^']+)'>Seguente ›")
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="searchfilm",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=next_page,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def genere(item):
|
||||
logger.info("[itastreaming.py] genere")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patron = '<ul class="sub-menu">(.+?)</ul>'
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '<li[^>]+><a href="([^"]+)">(.*?)</a></li>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.replace('&', '-')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def atoz(item):
|
||||
logger.info("[itastreaming.py] genere")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patron = '<div class="generos">(.+?)</ul>'
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '<li>.*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += '>([^"]+)</a>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.replace('&', '-')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def quality(item):
|
||||
logger.info("[itastreaming.py] genere")
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
patron = '<a>Qualità</a>(.+?)</ul>'
|
||||
data = scrapertools.find_single_match(data, patron)
|
||||
|
||||
patron = '<li id=".*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += '>([^"]+)</a>'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
|
||||
for scrapedurl, scrapedtitle in matches:
|
||||
scrapedtitle = scrapedtitle.replace('&', '-')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
folder=True))
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def fichas(item):
|
||||
logger.info("[itastreaming.py] fichas")
|
||||
|
||||
itemlist = []
|
||||
|
||||
# Carica la pagina
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
# fix - calidad
|
||||
data = re.sub(
|
||||
r'<div class="wrapperImage"[^<]+<a',
|
||||
'<div class="wrapperImage"><fix>SD</fix><a',
|
||||
data
|
||||
)
|
||||
# fix - IMDB
|
||||
data = re.sub(
|
||||
r'<h5> </div>',
|
||||
'<fix>IMDB: 0.0</fix>',
|
||||
data
|
||||
)
|
||||
|
||||
patron = '<div class="item">.*?'
|
||||
patron += 'href="([^"]+)".*?'
|
||||
patron += 'title="([^"]+)".*?'
|
||||
patron += '<img src="([^"]+)".*?'
|
||||
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for scrapedurl, scrapedtitle, scrapedthumbnail in matches:
|
||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||
|
||||
# ------------------------------------------------
|
||||
scrapedthumbnail = httptools.get_url_headers(scrapedthumbnail)
|
||||
# ------------------------------------------------
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=scrapedtitle,
|
||||
url=scrapedurl,
|
||||
thumbnail=scrapedthumbnail,
|
||||
fulltitle=scrapedtitle,
|
||||
show=scrapedtitle))
|
||||
|
||||
# Paginación
|
||||
next_page = scrapertools.find_single_match(data, "href='([^']+)'>Seguente ›")
|
||||
if next_page != "":
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="fichas",
|
||||
title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||
url=next_page,
|
||||
thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png"))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.info("[italiafilmvideohd.py] findvideos")
|
||||
|
||||
itemlist = support.hdpass_get_servers(item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@ def search(item, text):
|
||||
action = 'findvideos'
|
||||
else:
|
||||
action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
try:
|
||||
search = text
|
||||
data = support.match(item, headers=headers)[1]
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "netfreex",
|
||||
"name": "Netfreex",
|
||||
"language": ["ita"],
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "netfreex.png",
|
||||
"banner": "netfreex.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"not_active": ["include_in_newest_peliculas", "include_in_newest_anime", "include_in_newest_italiano", "include_in_newest_series"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per netfreex
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
from core.item import Item
|
||||
from platformcode import logger, config
|
||||
|
||||
__channel__ = "netfreex"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = ""
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['wstream']
|
||||
list_quality = ['1080p', 'HD', 'SD', 'CAM']
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film',
|
||||
('Generi', ['', 'menu', 'genres']),
|
||||
('Anno', ['', 'menu', 'releases']),
|
||||
]
|
||||
tvshow = ['/serietv']
|
||||
anime = ['/genere/anime']
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
logger.info("[vedohd.py] " + item.url + " search " + text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
|
||||
return support.dooplay_search(item)
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
if 'anime' in item.url:
|
||||
return support.dooplay_peliculas(item, True)
|
||||
else:
|
||||
return support.dooplay_peliculas(item, False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Guarda il trailer':
|
||||
logger.info(link['title'])
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
url=link['url'],
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=link['title'],
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
return support.dooplay_menu(item, item.args)
|
||||
@@ -227,7 +227,7 @@ def findvideos(item):
|
||||
if urls:
|
||||
for url in urls:
|
||||
url, c = unshortenit.unshorten(url)
|
||||
data += url + '\n'
|
||||
data += url.encode('utf8') + '\n'
|
||||
|
||||
itemlist += servertools.find_video_items(data=data)
|
||||
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
"not_active":[],
|
||||
"default_off":["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
}
|
||||
@@ -2,52 +2,10 @@
|
||||
"id": "streamtime",
|
||||
"name": "StreamTime",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"active": true,
|
||||
"adult": false,
|
||||
"thumbnail": "",
|
||||
"thumbnail": "streamtime.png",
|
||||
"banner": "streamtime.png",
|
||||
"categories": ["tvshow", "movie"],
|
||||
"settings": [
|
||||
{
|
||||
"id": "include_in_global_search",
|
||||
"type": "bool",
|
||||
"label": "Includi in Ricerca Globale",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_peliculas",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Film",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "include_in_newest_italiano",
|
||||
"type": "bool",
|
||||
"label": "Includi in Novità - Italiano",
|
||||
"default": true,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks",
|
||||
"type": "bool",
|
||||
"label": "Verifica se i link esistono",
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"id": "checklinks_number",
|
||||
"type": "list",
|
||||
"label": "Numero di link da verificare",
|
||||
"default": 1,
|
||||
"enabled": true,
|
||||
"visible": "eq(-1,true)",
|
||||
"lvalues": [ "5", "10", "15", "20" ]
|
||||
}
|
||||
]
|
||||
"settings": []
|
||||
}
|
||||
|
||||
+94
-59
@@ -3,6 +3,12 @@ from core import support, httptools, scrapertoolsV2
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
|
||||
"""
|
||||
Nota per i tester: questo non è un canale 'tradizionale', essendo un canale telegram, i cui contenuti (film/serie) sono mischiati tra loro (ed a volte ci sono messaggi sponsor),
|
||||
la lista delle pagine non sarà affatto 'uniforme' (a seconda di come viene presentata la preview)
|
||||
"""
|
||||
|
||||
__channel__ = "streamtime"
|
||||
host = config.get_channel_url(__channel__)
|
||||
headers = [['Referer', 'org.telegram.messenger']]
|
||||
@@ -20,47 +26,45 @@ def mainlist(item):
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
patron = """tgme_widget_message_photo_wrap blured.*?image:url\("(?P<thumbnail>[^"]+).*?(?:🎥|🎬)(?P<title>.*?)(?:🎥|🎬).*?(?:Audio(?:</b>)?: (?P<lang>.*?<br>))?.*?Anno(?:</b>)?: (?P<year>[0-9]{4}).*?(?:<b>Stream</b>|Risoluzione|<b>Tipo</b>): (?P<quality>[^<]+).*?tgme_widget_message_inline_button url_button" href="(?P<url>[^"]+)"""
|
||||
patron = """tgme_widget_message_photo_wrap.*?image:url\("(?P<thumbnail>[^"]+).*?//telegram\.org/img/emoji/40/(?:F09F8EAC|F09F8EA5)\.png"\)">.*?</i>\s?(?:<b>)?(?P<title>[^<]+).*?(?:Audio(?:</b>)?: (?P<lang>.*?<br>))?.*?Anno(?:</b>)?: (?P<year>[0-9]{4}).*?(?:<b>Stream</b>|Risoluzione|<b>Tipo</b>|Tipo|Stream): (?P<quality>[^<]+).*?tgme_widget_message_inline_button url_button" href="(?P<url>[^"]+)"""
|
||||
def itemlistHook(itemlist):
|
||||
retItemlist = []
|
||||
# filtro per tipo
|
||||
for i in itemlist:
|
||||
if item.contentType == 'movie':
|
||||
if '/Film/' in i.url or 'Stream-' in i.url:
|
||||
retItemlist.append(i)
|
||||
else:
|
||||
if '/SerieTv/' in i.url:
|
||||
retItemlist.append(i)
|
||||
if '/Film/' in i.url or 'Stream-' in i.url:
|
||||
i.contentType = 'movie'
|
||||
if '/SerieTv/' in i.url:
|
||||
i.contentType = 'tvshow'
|
||||
i.action = 'episodios'
|
||||
if item.contentType == i.contentType or item.contentType == 'list': # list = ricerca globale quando c'è un solo tipo di risultato
|
||||
retItemlist.append(i)
|
||||
# rimuovo duplicati
|
||||
if item.contentType != 'movie':
|
||||
if item.contentType != 'movie' and not item.cercaSerie:
|
||||
nonDupl = []
|
||||
# support.dbg()
|
||||
for i in retItemlist:
|
||||
for nd in nonDupl:
|
||||
if i.title == nd.title:
|
||||
if i.fulltitle == nd.fulltitle:
|
||||
break
|
||||
else:
|
||||
daAgg = i
|
||||
spl1 = i.url.split('-')
|
||||
stagione1 = spl1[-2]
|
||||
nEp1 = int(spl1[-1])
|
||||
|
||||
for i2 in retItemlist[1:]:
|
||||
if i.title == i2.title:
|
||||
spl2 = i2.url.split('-')
|
||||
stagione2 = spl2[-2]
|
||||
nEp2 = int(spl2[-1])
|
||||
if stagione1 == stagione2 and nEp2 > nEp1:
|
||||
daAgg = i2
|
||||
nonDupl.append(daAgg)
|
||||
nonDupl.append(i)
|
||||
retItemlist = nonDupl
|
||||
return retItemlist[::-1]
|
||||
# debug = True
|
||||
patronNext = 'tgme_widget_message_photo_wrap blured" href="([^"]+)'
|
||||
def fullItemlistHook(itemlist):
|
||||
msgId = int(itemlist[-1].url.split('/')[-1])
|
||||
itemlist[-1].url = host + '?before=' + str(msgId) + '&after=' + str(msgId-20)
|
||||
return itemlist
|
||||
# nella ricerca faccio finta che non ci siano "pagine successive", sarebbe un casino gestirle (ed è piuttosto improbabile)
|
||||
if item.action != 'search' and item.action:
|
||||
patronNext = 'tgme_widget_message_photo_wrap blured" href="([^"]+)'
|
||||
|
||||
# trovo l'id dell'ultimo messaggio e nella pagina successiva ci metto il link per prendere i 20 msg precedenti
|
||||
def fullItemlistHook(itemlist):
|
||||
msgId = int(itemlist[-1].url.split('/')[-1])
|
||||
itemlist[-1].url = host + '?before=' + str(msgId) + '&after=' + str(msgId-20)
|
||||
return itemlist
|
||||
|
||||
# necessario per togliere html vario dal titolo (operazione fatta solo su fulltitle)
|
||||
# def itemHook(item):
|
||||
# item.contentTitle = item.fulltitle
|
||||
# item.show = item.fulltitle
|
||||
# return item
|
||||
|
||||
if item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
@@ -79,29 +83,64 @@ def search(item, texto):
|
||||
return []
|
||||
|
||||
|
||||
def newest(categoria):
|
||||
item = Item()
|
||||
if categoria == "series":
|
||||
item.contentType = 'tvshow'
|
||||
item.url = host + '?q=%23SerieTv'
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
item.url = host + '?q=%23Film'
|
||||
return peliculas(item)
|
||||
|
||||
|
||||
# cerco il titolo, così mi escono fuori tutti i messaggi contenenti puntate singole o serie
|
||||
def episodios(item):
|
||||
domain, id, season, episode = scrapertoolsV2.find_single_match(item.url, r'(https?://[a-z0-9.-]+).*?/([^-/]+)-S([0-9]+)-([0-9]+)$')
|
||||
url = item.url
|
||||
item.cercaSerie = True
|
||||
itemlist = search(item, item.fulltitle.replace("'", ""))
|
||||
stagioni = {}
|
||||
|
||||
for i in itemlist[:-1]:
|
||||
spl1 = i.url.split('-')
|
||||
if len(spl1) > 3:
|
||||
st = spl1[1] + '-' + spl1[2]
|
||||
else:
|
||||
st = spl1[-2]
|
||||
nEp = int(spl1[-1])
|
||||
if st not in stagioni.keys():
|
||||
stagioni[st] = nEp
|
||||
elif nEp > stagioni[st]:
|
||||
stagioni[st] = nEp
|
||||
|
||||
itemlist = []
|
||||
for n in range(1, int(episode)):
|
||||
url = domain + '/play_s.php?s=' + id + '-S' + season + '&e=' + str(n)
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=str(int(season)) + 'x' + str(n) + support.typo(item.quality, '-- [] color kod'),
|
||||
url=url,
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=item.quality,
|
||||
contentType=item.contentType,
|
||||
folder=False,
|
||||
args={'id': id, 'season': season, 'episode': episode}))
|
||||
domain, id = scrapertoolsV2.find_single_match(url, r'(https?://[a-z0-9.-]+)/[^/]+/([^-/]+)')
|
||||
for st in sorted(stagioni.keys()):
|
||||
season = st[1:]
|
||||
episode = stagioni[st]
|
||||
for n in range(1, int(episode)):
|
||||
url = domain + '/play_s.php?s=' + id + '-S' + season + '&e=' + str(n)
|
||||
if '-' in season: # vedi https://stpgs.ml/SerieTv/Atypical-S01-8-8.html
|
||||
season = season.split('-')[0]
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
title=str(int(season)) + 'x' + str(n) + support.typo(item.quality, '-- [] color kod'),
|
||||
url=url,
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=item.quality,
|
||||
contentType='episode',
|
||||
folder=True,
|
||||
args={'id': id, 'season': season, 'episode': episode}))
|
||||
|
||||
support.videolibrary(itemlist, item)
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
# support.dbg()
|
||||
domain = scrapertoolsV2.find_single_match(item.url, 'https?://[a-z0-9.-]+')
|
||||
if item.contentType == 'movie':
|
||||
id = item.url.split('/')[-1]
|
||||
@@ -109,33 +148,29 @@ def findvideos(item):
|
||||
else:
|
||||
url = item.url
|
||||
id = item.args['id']
|
||||
season = item.args['season']
|
||||
episode = item.args['episode']
|
||||
res = support.match(item, 'src="([^"]+)">.*?</video>', url=url, headers=[['Referer', domain]])
|
||||
season = str(item.args['season'])
|
||||
episode = str(item.args['episode'])
|
||||
res = support.match(item, 'src="([^"]+)"[^>]*></video>', url=url, headers=[['Referer', domain]])
|
||||
itemlist = []
|
||||
support.dbg()
|
||||
|
||||
if res[0]:
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="play",
|
||||
title='stpgs.ml' + support.typo(item.quality, '-- [] color kod'),
|
||||
title='contentful',
|
||||
url=res[0][0],
|
||||
server='directo',
|
||||
fulltitle=item.fulltitle,
|
||||
thumbnail=item.thumbnail,
|
||||
show=item.show,
|
||||
quality=item.quality,
|
||||
contentType=item.contentType,
|
||||
folder=False))
|
||||
download = itemlist[0].clone()
|
||||
if item.contentType == 'movie':
|
||||
download.url = downPrefix + id
|
||||
else:
|
||||
download.url = downPrefix + id + 'S' + season + '-' + episode
|
||||
itemlist.append(download)
|
||||
contentType=item.contentType))
|
||||
# download = itemlist[0].clone()
|
||||
# if item.contentType == 'movie':
|
||||
# download.url = downPrefix + id
|
||||
# else:
|
||||
# download.url = downPrefix + id + '-S' + season + '-' + episode
|
||||
# itemlist.append(download)
|
||||
else:
|
||||
# google drive...
|
||||
pass
|
||||
support.videolibrary(itemlist, item)
|
||||
return support.controls(itemlist, item, True, True)
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
+281
-225
@@ -2,72 +2,227 @@
|
||||
# ------------------------------------------------------------
|
||||
# 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
|
||||
|
||||
import urlparse
|
||||
|
||||
from core import scrapertoolsV2, httptools, tmdb, support
|
||||
from core import scrapertoolsV2, httptools, tmdb, support,servertools
|
||||
from core.item import Item
|
||||
from core.support import menu, log, aplay
|
||||
from core.support import menu, log
|
||||
from platformcode import logger
|
||||
from specials import autorenumber
|
||||
from platformcode import config
|
||||
from platformcode import config, unify
|
||||
from lib.unshortenit import unshorten_only
|
||||
from lib import unshortenit
|
||||
|
||||
host = ''
|
||||
headers = ''
|
||||
def findhost():
|
||||
global host, headers
|
||||
permUrl = httptools.downloadpage('https://www.tantifilm.info/', follow_redirects=False).data
|
||||
host = scrapertoolsV2.find_single_match(permUrl, r'<h2 style="text-align: center;"><a href="([^"]+)">Il nuovo indirizzo di Tantifilm è:</a></h2>')
|
||||
if host.endswith('/'):
|
||||
host = host[:-1]
|
||||
headers = [['Referer', host]]
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['verystream', 'openload', 'streamango', 'vidlox', 'youtube']
|
||||
list_quality = ['default']
|
||||
|
||||
__channel__ = "tantifilm"
|
||||
host = config.get_channel_url(__channel__)
|
||||
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
log()
|
||||
|
||||
film = ['/film/',
|
||||
('Al Cinema', ['/watch-genre/al-cinema/', 'peliculas', 'movie']),
|
||||
('HD',['/watch-genre/altadefinizione/', 'peliculas', 'movie']),
|
||||
('Categorie', ['', 'category', 'movie'])
|
||||
findhost()
|
||||
|
||||
#top = [(support.typo('Novità Film/Serie/Anime/Altro', 'bold'),['/film/'])]
|
||||
top = [('Novità Film/Serie/Anime/Altro', ['/film/', 'peliculas', 'all'])]
|
||||
|
||||
film = ['/watch-genre/film-aggiornati/',
|
||||
('Al Cinema', ['/watch-genre/al-cinema/']),
|
||||
('HD', ['/watch-genre/altadefinizione/']),
|
||||
('Sub-ITA', ['/watch-genre/sub-ita/'])
|
||||
|
||||
]
|
||||
|
||||
tvshow = ['/watch-genre/serie-tv/',
|
||||
('HD', ['/watch-genre/serie-altadefinizione/', 'peliculas']),
|
||||
('Miniserie', ['/watch-genre/miniserie/', 'peliculas', 'serie']),
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/', 'peliculas'])
|
||||
]
|
||||
tvshow = ['/serie-tv/',
|
||||
('HD', ['/watch-genre/serie-altadefinizione/']),
|
||||
('Miniserie', ['/watch-genre/miniserie-1/']),
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/']),
|
||||
#('LIVE', ['/watch-genre/live/'])
|
||||
]
|
||||
|
||||
pinco = [('Anime', ['/watch-genre/anime/', 'peliculas', 'anime'])]
|
||||
|
||||
anime = ['/watch-genre/anime/'
|
||||
]
|
||||
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
##def mainlist(item):
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
if item.args == 'search':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="Permalink to\s(?P<title>[^"]+) \((?P<year>[^<]+)\).*?".*?<img[^s]+src="(?P<thumb>[^"]+)".*?<div class="calitate">\s*<p>(?P<quality>[^<]+)<\/p>'
|
||||
# support.regexDbg(item, patron, headers)
|
||||
else:
|
||||
patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s?<a href="(?P<url>[^"]+)"(?:[^>]+>|)>?\s?<img[^s]+src="([^"]+)"[^>]+>\s?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]<lang>[sSuUbB\-iItTaA]+)?(?:[ ]?\((?P<year>[\-\d+]+)\)).[^<]+[^>]+><\/a>.+?<p>\s*(?P<quality>[a-zA-Z-0-9\.]+)\s*<\/p>[^>]+>'
|
||||
patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->'
|
||||
|
||||
if item.args != 'all' and item.args != 'search':
|
||||
action = 'findvideos' if item.extra == 'movie' else 'episodios'
|
||||
item.contentType = 'movie' if item.extra == 'movie' else 'tvshow'
|
||||
else:
|
||||
def itemHook(item):
|
||||
item.action = 'episodios'
|
||||
item.contentType = 'tvshow'
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = re.sub('\n|\t', ' ', data)
|
||||
data = re.sub(r'>\s+<', '> <', data)
|
||||
check = scrapertoolsV2.find_single_match(data, r'<div class="category-film">\s+<h3>\s+(.*?)\s+</h3>\s+</div>')
|
||||
if 'sub' in check.lower():
|
||||
item.contentLanguage = 'Sub-ITA'
|
||||
item.title += support.typo('Sub-ITA', '_ [] color kod')
|
||||
support.log("CHECK : ", check)
|
||||
if 'anime' in check.lower():
|
||||
support.log('select = ### è una anime ###')
|
||||
item.action = 'episodios'
|
||||
anime = True
|
||||
args='anime'
|
||||
elif 'serie' in check.lower():
|
||||
pass
|
||||
else:
|
||||
support.log('select ELSE = ### è un film ###')
|
||||
item.action = 'findvideos'
|
||||
item.contentType='movie'
|
||||
return item
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
log()
|
||||
findhost()
|
||||
|
||||
data_check = httptools.downloadpage(item.url, headers=headers).data
|
||||
data_check = re.sub('\n|\t', ' ', data_check)
|
||||
data_check = re.sub(r'>\s+<', '> <', data_check)
|
||||
patron_check = r'<iframe src="([^"]+)" scrolling="no" frameborder="0" width="626" height="550" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">'
|
||||
item.url = scrapertoolsV2.find_single_match(data_check, patron_check)
|
||||
|
||||
patronBlock = r'Episodio<\/a>.*?<ul class="nav navbar-nav">(?P<block>.*?)<\/ul>'
|
||||
patron = r'<a href="(?P<url>[^"]+)"\s*>\s*<i[^>]+><\/i>\s*(?P<episode>\d+)<\/a>'
|
||||
|
||||
def itemHook(item):
|
||||
item.contentType = 'tvshow'
|
||||
url_season = item.url.rpartition('/')
|
||||
support.log("ITEM URL: ", url_season[0])
|
||||
seasons = support.match(item, r'<a href="([^"]+)"\s*>\s*<i[^>]+><\/i>\s*(\d+)<\/a>', r'Stagioni<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>', headers=headers, url=url_season[0])[0]
|
||||
for season_url, season in seasons:
|
||||
support.log("ITEM URL2: ", url_season[0],' - ', item.url)
|
||||
if season_url[0] in item.url:
|
||||
item.title = support.typo(season+'x'+unify.remove_format(item.title), 'bold')
|
||||
## item.infoLabels['title'] = item.fulltitle if item.infoLabels['title'] == '' else item.infoLabels['title']
|
||||
## item.infoLabels['tvshowtitle'] = item.fulltitle if item.infoLabels['tvshowtitle'] == '' else item.infoLabels['tvshowtitle']
|
||||
break
|
||||
|
||||
return item
|
||||
|
||||
#debug = True
|
||||
return locals()
|
||||
|
||||
def player_or_not(item):
|
||||
|
||||
return item
|
||||
|
||||
def category(item):
|
||||
log()
|
||||
findhost()
|
||||
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)
|
||||
|
||||
def anime(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
seasons = support.match(item, r'<div class="sp-body[^"]+">(.*?)<\/div>')[0]
|
||||
for season in seasons:
|
||||
episodes = scrapertoolsV2.find_multiple_matches(season, r'<a.*?href="([^"]+)"[^>]+>([^<]+)<\/a>(.*?)<(:?br|\/p)')
|
||||
for url, title, urls, none in episodes:
|
||||
urls = scrapertoolsV2.find_multiple_matches(urls, '<a.*?href="([^"]+)"[^>]+>')
|
||||
|
||||
for url2 in urls:
|
||||
url += url2 + '\n'
|
||||
|
||||
#log('EP URL',url)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title=support.typo(title + ' - ' + item.fulltitle,'bold'),
|
||||
url=url,
|
||||
fulltitle=title + ' - ' + item.show,
|
||||
show=item.show,
|
||||
thumbnail=item.thumbnail,
|
||||
args=item.args))
|
||||
|
||||
autorenumber.renumber(itemlist, item,'bold')
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
|
||||
return itemlist
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
findhost()
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
try:
|
||||
item.args = 'search'
|
||||
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 search_peliculas(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)
|
||||
## action = 'findvideos' if item.extra == 'movie' else 'episodios'
|
||||
##
|
||||
## data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data.replace('\t','').replace('\n','')
|
||||
## log(data)
|
||||
## patron = r'<a href="([^"]+)" title="Permalink to\s([^"]+) \(([^<]+)\).*?".*?<img[^s]+src="([^"]+)".*?<div class="calitate">\s*<p>([^<]+)<\/p>'
|
||||
## matches = re.compile(patron, re.MULTILINE).findall(data)
|
||||
##
|
||||
## for url, title, year, thumb, quality in matches:
|
||||
## infoLabels = {}
|
||||
## infoLabels['year'] = year
|
||||
## title = scrapertoolsV2.decodeHtmlentities(title)
|
||||
## quality = scrapertoolsV2.decodeHtmlentities(quality)
|
||||
## longtitle = title + support.typo(quality,'_ [] color kod')
|
||||
## itemlist.append(
|
||||
## Item(channel=item.channel,
|
||||
## action=action,
|
||||
## contentType=item.contentType,
|
||||
## fulltitle=title,
|
||||
## show=title,
|
||||
## title=longtitle,
|
||||
## url=url,
|
||||
## thumbnail=thumb,
|
||||
## infoLabels=infoLabels,
|
||||
## args=item.args))
|
||||
##
|
||||
## tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
##
|
||||
## return itemlist
|
||||
|
||||
@@ -97,192 +252,93 @@ def newest(categoria):
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
log(texto)
|
||||
item.url = host + "/?s=" + texto
|
||||
|
||||
try:
|
||||
return search_peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
def search_peliculas(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
action = 'findvideos' if item.extra == 'movie' else 'episodios'
|
||||
|
||||
data = httptools.downloadpage(item.url, headers=headers, ignore_response_code=True).data.replace('\t','').replace('\n','')
|
||||
log(data)
|
||||
patron = r'<a href="([^"]+)" title="Permalink to\s([^"]+) \(([^<]+)\).*?".*?<img[^s]+src="([^"]+)".*?<div class="calitate">\s*<p>([^<]+)<\/p>'
|
||||
matches = re.compile(patron, re.MULTILINE).findall(data)
|
||||
|
||||
for url, title, year, thumb, quality in matches:
|
||||
infoLabels = {}
|
||||
infoLabels['year'] = year
|
||||
title = scrapertoolsV2.decodeHtmlentities(title)
|
||||
quality = scrapertoolsV2.decodeHtmlentities(quality)
|
||||
longtitle = title + support.typo(quality,'_ [] color kod')
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action=action,
|
||||
contentType=item.contentType,
|
||||
fulltitle=title,
|
||||
show=title,
|
||||
title=longtitle,
|
||||
url=url,
|
||||
thumbnail=thumb,
|
||||
infoLabels=infoLabels,
|
||||
args=item.args))
|
||||
|
||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
return itemlist
|
||||
|
||||
@support.scrape
|
||||
def category(item):
|
||||
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' 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="(?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 locals()
|
||||
|
||||
|
||||
def episodios(item):
|
||||
log()
|
||||
itemlist = []
|
||||
if item.args == 'anime': return anime(item)
|
||||
|
||||
data = httptools.downloadpage(item.url).data
|
||||
|
||||
# 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">'
|
||||
url = scrapertoolsV2.find_single_match(data, patron)
|
||||
log('URL =', url)
|
||||
seasons = support.match(item, r'<a href="([^"]+)"\s*>\s*<i[^>]+><\/i>\s*(\d+)<\/a>', r'Stagioni<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>', headers=headers, url=url)[0]
|
||||
|
||||
for season_url, season in seasons:
|
||||
season_url = urlparse.urljoin(url, season_url)
|
||||
episodes = support.match(item, r'<a href="([^"]+)"\s*>\s*<i[^>]+><\/i>\s*(\d+)<\/a>', r'Episodio<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>', headers=headers, url=season_url)[0]
|
||||
for episode_url, episode in episodes:
|
||||
episode_url = urlparse.urljoin(url, episode_url)
|
||||
title = season + "x" + episode.zfill(2)
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title=support.typo(title + ' - ' + item.fulltitle,'bold'),
|
||||
url=episode_url,
|
||||
fulltitle=title + ' - ' + item.show,
|
||||
show=item.show,
|
||||
thumbnail=item.thumbnail))
|
||||
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
|
||||
return itemlist
|
||||
|
||||
def anime(item):
|
||||
log()
|
||||
itemlist = []
|
||||
|
||||
seasons = support.match(item, r'<div class="sp-body[^"]+">(.*?)<\/div>')[0]
|
||||
for season in seasons:
|
||||
episodes = scrapertoolsV2.find_multiple_matches(season, r'<a.*?href="([^"]+)"[^>]+>([^<]+)<\/a>(.*?)<(:?br|\/p)')
|
||||
for url, title, urls, none in episodes:
|
||||
urls = scrapertoolsV2.find_multiple_matches(urls, '<a.*?href="([^"]+)"[^>]+>')
|
||||
|
||||
for url2 in urls:
|
||||
url += url2 + '\n'
|
||||
|
||||
log('EP URL',url)
|
||||
|
||||
|
||||
itemlist.append(
|
||||
Item(channel=item.channel,
|
||||
action="findvideos",
|
||||
contentType=item.contentType,
|
||||
title=support.typo(title + ' - ' + item.fulltitle,'bold'),
|
||||
url=url,
|
||||
fulltitle=title + ' - ' + item.show,
|
||||
show=item.show,
|
||||
thumbnail=item.thumbnail,
|
||||
args=item.args))
|
||||
|
||||
autorenumber.renumber(itemlist, item,'bold')
|
||||
support.videolibrary(itemlist, item, 'color kod bold')
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
log()
|
||||
log()
|
||||
listurl = set()
|
||||
# itemlist = []
|
||||
support.log("ITEMLIST: ", item)
|
||||
## if item.args == 'anime':
|
||||
## data = item.url
|
||||
## else:
|
||||
## data = httptools.downloadpage(item.url, headers=headers).data
|
||||
data = item.url if item.contentType == "episode" else httptools.downloadpage(item.url, headers=headers).data
|
||||
|
||||
if item.args == 'anime':
|
||||
data = item.url
|
||||
else:
|
||||
data = httptools.downloadpage(item.url, headers=headers).data
|
||||
if 'protectlink' in data:
|
||||
urls = scrapertoolsV2.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
support.log("SONO QUI: ", urls)
|
||||
for url in urls:
|
||||
url = url.decode('base64')
|
||||
# tiro via l'ultimo carattere perchè non c'entra
|
||||
url, c = unshorten_only(url)
|
||||
data += '\t' + url
|
||||
support.log("SONO QUI: ", url)
|
||||
if 'nodmca' in data:
|
||||
page = httptools.downloadpage(url, headers=headers).data
|
||||
url += isturl.add('\t' + scrapertoolsV2.find_single_match(page,'<meta name="og:url" content="([^=]+)">'))
|
||||
|
||||
# Check if is series
|
||||
check = scrapertoolsV2.find_single_match(data.replace('\t','').replace('\n',''), r'<div class="category-film"><h3>([^<]+)<\/h3>')
|
||||
if 'serie tv' in check.lower(): return episodios(item)
|
||||
elif 'anime' in check.lower(): return anime(item)
|
||||
|
||||
if 'protectlink' in data:
|
||||
urls = scrapertoolsV2.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
for url in urls:
|
||||
url= url.decode('base64')
|
||||
if '\t' in url:
|
||||
url = url[:-1]
|
||||
data += '\t' + url
|
||||
if 'nodmca' in data:
|
||||
page = httptools.downloadpage(url, headers=headers).data
|
||||
data += '\t' + scrapertoolsV2.find_single_match(page,'<meta name="og:url" content="([^=]+)">')
|
||||
|
||||
return support.server(item, data, headers=headers)
|
||||
return support.server(item, data=listurl)#, headers=headers)
|
||||
# return itemlist
|
||||
|
||||
##def findvideos(item):
|
||||
## log()
|
||||
##
|
||||
## # Carica la pagina
|
||||
## data = item.url if item.contentType == "episode" else httptools.downloadpage(item.url, headers=headers).data
|
||||
##
|
||||
## if 'protectlink' in data:
|
||||
## urls = scrapertoolsV2.find_multiple_matches(data, r'<iframe src="[^=]+=(.*?)"')
|
||||
## for url in urls:
|
||||
## url = url.decode('base64')
|
||||
## data += '\t' + url
|
||||
## url, c = unshorten_only(url)
|
||||
## data += '\t' + url
|
||||
##
|
||||
## itemlist = servertools.find_video_items(data=data)
|
||||
##
|
||||
## for videoitem in itemlist:
|
||||
## videoitem.title = item.title + videoitem.title
|
||||
## videoitem.fulltitle = item.fulltitle
|
||||
## videoitem.thumbnail = item.thumbnail
|
||||
## videoitem.show = item.show
|
||||
## videoitem.plot = item.plot
|
||||
## videoitem.channel = item.channel
|
||||
## videoitem.contentType = item.contentType
|
||||
#### videoitem.language = IDIOMAS['Italiano']
|
||||
##
|
||||
#### # Requerido para Filtrar enlaces
|
||||
####
|
||||
#### if __comprueba_enlaces__:
|
||||
#### itemlist = servertools.check_list_links(itemlist, __comprueba_enlaces_num__)
|
||||
####
|
||||
#### # Requerido para FilterTools
|
||||
####
|
||||
#### itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||
####
|
||||
#### # Requerido para AutoPlay
|
||||
####
|
||||
#### autoplay.start(itemlist, item)
|
||||
##
|
||||
## if item.contentType != 'episode':
|
||||
## if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||
## itemlist.append(
|
||||
## Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
|
||||
## action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
||||
##
|
||||
## # Estrae i contenuti
|
||||
## patron = r'\{"file":"([^"]+)","type":"[^"]+","label":"([^"]+)"\}'
|
||||
## matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
## for scrapedurl, scrapedtitle in matches:
|
||||
## title = item.title + " " + scrapedtitle + " quality"
|
||||
## itemlist.append(
|
||||
## Item(channel=item.channel,
|
||||
## action="play",
|
||||
## title=title,
|
||||
## url=scrapedurl.replace(r'\/', '/').replace('%3B', ';'),
|
||||
## thumbnail=item.thumbnail,
|
||||
## fulltitle=item.title,
|
||||
## show=item.title,
|
||||
## server='',
|
||||
## contentType=item.contentType,
|
||||
## folder=False))
|
||||
##
|
||||
## return itemlist
|
||||
|
||||
+1
-5
@@ -73,11 +73,7 @@ def findvideos(item):
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
patron = '<a href="(?P<url>[^"#]+)"(?: title="[^"]+")?>(?P<title>[a-zA-Z0-9]+)'
|
||||
patronBlock = '<nav class="' + item.args + '">(?P<block>.*?)</nav>'
|
||||
action = 'peliculas'
|
||||
|
||||
return locals()
|
||||
return support.dooplay_menu(item, item.args)
|
||||
|
||||
|
||||
def play(item):
|
||||
|
||||
Reference in New Issue
Block a user