Filmpertutti Rewrited
This commit is contained in:
@@ -4,8 +4,8 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["ita"],
|
"language": ["ita"],
|
||||||
"thumbnail": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/filmpertutti.png",
|
"thumbnail": "https://www.filmpertutti.club/wp-content/themes/blunge/assets/logo.png",
|
||||||
"banner": "https://raw.githubusercontent.com/Zanzibar82/images/master/posters/filmpertutti.png",
|
"banner": "https://www.filmpertutti.club/wp-content/themes/blunge/assets/logo.png",
|
||||||
"categories": ["tvshow","movie"],
|
"categories": ["tvshow","movie"],
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
@@ -32,13 +32,13 @@
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "include_in_newest_italiano",
|
"id": "include_in_newest_italiano",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"label": "Includi in Novità - Italiano",
|
"label": "Includi in Novità - Italiano",
|
||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": true
|
"visible": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,57 +6,42 @@
|
|||||||
import re
|
import re
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
from channels import autoplay
|
from channels import autoplay, support
|
||||||
from core import scrapertools, servertools, httptools
|
from core import scrapertoolsV2, servertools, httptools, tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from core import tmdb
|
|
||||||
from lib import unshortenit
|
from lib import unshortenit
|
||||||
from platformcode import config, logger
|
from platformcode import config, logger
|
||||||
|
from channelselector import thumb
|
||||||
|
|
||||||
host = "https://www.filmpertutti.club"
|
host = "https://www.filmpertutti.club"
|
||||||
list_servers = ['akvideo', 'openload', 'streamango', 'wstream']
|
headers = [['Referer', host]]
|
||||||
list_quality = ['default']
|
list_servers = ['openload', 'streamango', 'wstream', 'akvideo']
|
||||||
|
list_quality = ['HD', 'SD']
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info("kod.filmpertutti mainlist")
|
logger.info()
|
||||||
|
|
||||||
|
itemlist =[]
|
||||||
|
|
||||||
|
support.menu(itemlist, '[B]Film[/B]', 'peliculas', host + '/category/film/', 'movie')
|
||||||
|
support.menu(itemlist, '[B] > Film per Genere[/B]', 'genre', host, 'episode')
|
||||||
|
support.menu(itemlist, '[B]Serie TV[/B]', 'peliculas', host + '/category/serie-tv/', 'episode')
|
||||||
|
support.menu(itemlist, '[B] > Serie TV in ordine alfabetico[/B]', 'az', host + '/category/serie-tv/', 'episode')
|
||||||
|
support.menu(itemlist, '[COLOR blue]Cerca Serie TV...[/COLOR]', 'search', '', 'episode')
|
||||||
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
|
|
||||||
itemlist = [Item(channel=item.channel,
|
|
||||||
title="[COLOR azure]Ultimi film inseriti[/COLOR]",
|
|
||||||
action="peliculas",
|
|
||||||
extra="movie",
|
|
||||||
url="%s/category/film/" % 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 film[/COLOR]",
|
|
||||||
action="categorias",
|
|
||||||
url="%s/category/film/" % 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...[/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]",
|
|
||||||
extra="tvshow",
|
|
||||||
action="peliculas_tv",
|
|
||||||
url="%s/category/serie-tv/" % 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")]
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
|
for item in itemlist:
|
||||||
|
logger.info('MENU=' + str(item) )
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info("kod.filmpertutti newest" + categoria)
|
logger.info("filmpertutti newest" + categoria)
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
try:
|
try:
|
||||||
@@ -79,133 +64,11 @@ def newest(categoria):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def peliculas(item):
|
|
||||||
logger.info("kod.filmpertutti peliculas")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
# Estrae i contenuti
|
|
||||||
patron = '<li><a href="([^"]+)" data-thumbnail="([^"]+)"><div>\s*<div class="title">(.*?)<.*?IMDb">([^<]+)'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle, scraprate in matches:
|
|
||||||
scrapedplot = ""
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="findvideos",
|
|
||||||
contentType="movie",
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
show=scrapedtitle,
|
|
||||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR] - IMDb: " + scraprate,
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail=scrapedthumbnail,
|
|
||||||
plot=scrapedplot,
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
# Paginazione
|
|
||||||
patronvideos = '<a href="([^"]+)"[^>]+>Pagina'
|
|
||||||
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",
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def peliculas_tv(item):
|
|
||||||
logger.info("kod.filmpertutti peliculas")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
# Estrae i contenuti
|
|
||||||
patron = '<li><a href="([^"]+)" data-thumbnail="([^"]+)"><div>\s*<div class="title">(.*?)<'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
|
||||||
title = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
scrapedplot = ""
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="episodios",
|
|
||||||
fulltitle=title,
|
|
||||||
show=title,
|
|
||||||
title="[COLOR azure]" + title + "[/COLOR]",
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail=scrapedthumbnail,
|
|
||||||
plot=scrapedplot,
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
# Paginazione
|
|
||||||
patronvideos = '<a href="([^"]+)"[^>]+>Pagina'
|
|
||||||
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",
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
def categorias(item):
|
|
||||||
logger.info("kod.filmpertutti categorias")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
|
|
||||||
# Narrow search by selecting only the combo
|
|
||||||
patron = '<option>Scegli per Genere</option>(.*?)</select'
|
|
||||||
bloque = scrapertools.get_match(data, patron)
|
|
||||||
|
|
||||||
# The categories are the options for the combo
|
|
||||||
patron = '<option data-src="([^"]+)">([^<]+)</option>'
|
|
||||||
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,
|
|
||||||
extra=item.extra,
|
|
||||||
plot=scrapedplot))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info("kod.filmpertutti " + item.url + " search " + texto)
|
logger.info("filmpertutti " + item.url + " search " + texto)
|
||||||
item.url = host + "/?s=" + texto
|
item.url = host + "/?s=" + texto
|
||||||
try:
|
try:
|
||||||
if item.extra == "movie":
|
return peliculas(item)
|
||||||
return peliculas(item)
|
|
||||||
if item.extra == "tvshow":
|
|
||||||
return peliculas_tv(item)
|
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
@@ -214,146 +77,169 @@ def search(item, texto):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
def genre(item):
|
||||||
def load_episodios(html, item, itemlist, lang_title):
|
logger.info(item.channel + 'genre')
|
||||||
patron = '.*?<a[^h]+href="[^"]+"[^>]+>[^<]+<\/a>(?:<br \/>|<\/p>|-)'
|
|
||||||
matches = re.compile(patron).findall(html)
|
|
||||||
for data in matches:
|
|
||||||
# Estrae i contenuti
|
|
||||||
scrapedtitle = data.split('<a ')[0]
|
|
||||||
scrapedtitle = re.sub(r'<[^>]*>', '', scrapedtitle).strip()
|
|
||||||
if scrapedtitle != 'Categorie':
|
|
||||||
scrapedtitle = scrapedtitle.replace('×', 'x')
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="findvideos",
|
|
||||||
contentType="episode",
|
|
||||||
title="[COLOR azure]%s[/COLOR]" % (scrapedtitle + " (" + lang_title + ")"),
|
|
||||||
url=data,
|
|
||||||
thumbnail=item.thumbnail,
|
|
||||||
extra=item.extra,
|
|
||||||
fulltitle=scrapedtitle + " (" + lang_title + ")" + ' - ' + item.show,
|
|
||||||
show=item.show))
|
|
||||||
|
|
||||||
logger.info("[filmpertutti.py] episodios")
|
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
# Carica la pagina
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
data = httptools.downloadpage(item.url).data
|
block = scrapertoolsV2.find_single_match(data, r'<ul class="table-list">(.*?)<\/ul>')
|
||||||
data = scrapertools.decodeHtmlentities(data)
|
matches = scrapertoolsV2.find_multiple_matches(block, r'<a href="([^"]+)">.*?<\/span>(.*?)<\/a>')
|
||||||
|
for url, title in matches:
|
||||||
lang_titles = []
|
|
||||||
starts = []
|
|
||||||
patron = r"Stagione.*?ITA"
|
|
||||||
matches = re.compile(patron, re.IGNORECASE).finditer(data)
|
|
||||||
for match in matches:
|
|
||||||
season_title = match.group()
|
|
||||||
if season_title != '':
|
|
||||||
lang_titles.append('SUB ITA' if 'SUB' in season_title.upper() else 'ITA')
|
|
||||||
starts.append(match.end())
|
|
||||||
|
|
||||||
i = 1
|
|
||||||
len_lang_titles = len(lang_titles)
|
|
||||||
|
|
||||||
while i <= len_lang_titles:
|
|
||||||
inizio = starts[i - 1]
|
|
||||||
fine = starts[i] if i < len_lang_titles else -1
|
|
||||||
|
|
||||||
html = data[inizio:fine]
|
|
||||||
lang_title = lang_titles[i - 1]
|
|
||||||
|
|
||||||
load_episodios(html, item, itemlist, lang_title)
|
|
||||||
|
|
||||||
i += 1
|
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
action='peliculas',
|
||||||
url=item.url,
|
title=title,
|
||||||
action="add_serie_to_library",
|
url=host+url)
|
||||||
extra="episodios" + "###" + item.extra,
|
)
|
||||||
show=item.show))
|
itemlist = thumb(itemlist)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def az(item):
|
||||||
|
logger.info(item.channel + 'genre')
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
block = scrapertoolsV2.find_single_match(data, r'<select class="cats">(.*?)<\/select>')
|
||||||
|
matches = scrapertoolsV2.find_multiple_matches(block, r'<option data-src="([^"]+)">(.*?)<\/option>')
|
||||||
|
for url, title in matches:
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
action='peliculas',
|
||||||
|
title=title,
|
||||||
|
url=url)
|
||||||
|
)
|
||||||
|
itemlist = thumb(itemlist)
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
def peliculas(item):
|
||||||
|
logger.info(item.channel + 'peliculas')
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
block = scrapertoolsV2.get_match(data, r'<ul class="posts">(.*)<\/ul>')
|
||||||
|
|
||||||
|
patron = r'<li><a href="([^"]+)" data-thumbnail="([^"]+)">.*?<div class="title">([^<]+)<\/div>'
|
||||||
|
matches = scrapertoolsV2.find_multiple_matches(block, patron)
|
||||||
|
|
||||||
|
for scrapedurl, scrapedthumb, scrapedtitle in matches:
|
||||||
|
title = re.sub(r'.\(.*?\)|.\[.*?\]', '', scrapedtitle)
|
||||||
|
quality = scrapertoolsV2.find_single_match(scrapedtitle, r'\[(.*?)\]')
|
||||||
|
if not quality:
|
||||||
|
quality = 'SD'
|
||||||
|
|
||||||
|
longtitle = title + ' [COLOR blue][' + quality + '][/COLOR]'
|
||||||
|
|
||||||
|
if item.contentType == 'episode':
|
||||||
|
action = 'episodios'
|
||||||
|
else:
|
||||||
|
action ='findvideos'
|
||||||
|
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
action=action,
|
||||||
|
contentType=item.contentType,
|
||||||
|
title=longtitle,
|
||||||
|
fulltitle=title,
|
||||||
|
show=title,
|
||||||
|
quality=quality,
|
||||||
|
url=scrapedurl,
|
||||||
|
thumbnail=scrapedthumb
|
||||||
|
))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
|
next_page = scrapertoolsV2.find_single_match(data, '<a href="([^"]+)">Pagina')
|
||||||
|
if next_page != "":
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
action="peliculas",
|
||||||
|
contentType=item.contentType,
|
||||||
|
title="[COLOR blue]" + config.get_localized_string(30992) + " >[/COLOR]",
|
||||||
|
url=next_page,
|
||||||
|
thumbnails=thumb()))
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
def episodios(item):
|
||||||
|
logger.info(item.channel + 'findvideos')
|
||||||
|
itemlist = []
|
||||||
|
|
||||||
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
|
|
||||||
|
if 'accordion-item' in data:
|
||||||
|
block = scrapertoolsV2.get_match(data, 'accordion-item.*?>(.*?)<div id="disqus_thread">')
|
||||||
|
patron = r'<img src="([^"]+)">.*?<li class="season-no">(.*?)<\/li>(.*?)<\/table>'
|
||||||
|
matches = scrapertoolsV2.find_multiple_matches(block, patron)
|
||||||
|
|
||||||
|
for scrapedthumb, scrapedtitle, scrapedurl in matches:
|
||||||
|
title = scrapedtitle + ' - ' + item.title
|
||||||
|
if title[0] == 'x':
|
||||||
|
title = '1' + title
|
||||||
|
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
action='findvideos',
|
||||||
|
contentType=item.contentType,
|
||||||
|
title=title,
|
||||||
|
fulltitle=title,
|
||||||
|
show=title,
|
||||||
|
quality=item.quality,
|
||||||
|
url=scrapedurl,
|
||||||
|
thumbnail=scrapedthumb
|
||||||
|
))
|
||||||
|
|
||||||
|
|
||||||
|
else:
|
||||||
|
block = scrapertoolsV2.get_match(data, '<div id="info" class="pad">(.*?)<div id="disqus_thread">').replace('</p>','<br />').replace('×','x')
|
||||||
|
matches = scrapertoolsV2.find_multiple_matches(block, r'<strong>(.*?)<\/strong>.*?<p>(.*?)<span')
|
||||||
|
for lang, seasons in matches:
|
||||||
|
lang = re.sub('.*?Stagione[^a-zA-Z]+', '', lang)
|
||||||
|
# patron = r'([0-9]+x[0-9]+) (.*?)<br'
|
||||||
|
season = scrapertoolsV2.find_multiple_matches(seasons, r'([0-9]+x[0-9]+) (.*?)<br')
|
||||||
|
for title, url in season:
|
||||||
|
title = title + ' - ' + lang
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel=item.channel,
|
||||||
|
title=title,
|
||||||
|
fulltitle=title,
|
||||||
|
show=title,
|
||||||
|
url=url,
|
||||||
|
contentType=item.contentType,
|
||||||
|
action='findvideos'
|
||||||
|
))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
def add_myitem(sitemlist, scontentType, server, stitle, surl):
|
logger.info(item.channel + 'findvideos')
|
||||||
sitemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="play",
|
|
||||||
contentType=scontentType,
|
|
||||||
title=stitle,
|
|
||||||
fulltitle=item.fulltitle,
|
|
||||||
server=server,
|
|
||||||
url=surl,
|
|
||||||
thumbnail=item.thumbnail,
|
|
||||||
extra=item.extra))
|
|
||||||
|
|
||||||
logger.info("kod.filmpertutti findvideos")
|
if item.contentType == 'movie':
|
||||||
itemlist = []
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
logger.debug(item)
|
|
||||||
|
|
||||||
# Carica la pagina
|
|
||||||
if item.contentType == "episode":
|
|
||||||
patron = '<a\s*href="(.*?)\s*".*?[^>]+>([^<]+)<\/a>'
|
|
||||||
matches = re.compile(patron).findall(item.url)
|
|
||||||
|
|
||||||
lsrvo = ''
|
|
||||||
for lurl, lsrv in matches:
|
|
||||||
|
|
||||||
if lsrv == 'HD': lsrv = lsrvo + ' HD'
|
|
||||||
lsrvo = lsrv
|
|
||||||
|
|
||||||
add_myitem(itemlist, "episode", lsrv, "[COLOR azure]%s[/COLOR]" % lsrv, lurl)
|
|
||||||
else:
|
else:
|
||||||
# Carica la pagina
|
data = item.url
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = '<strong>\s*(Versione.*?)<p><strong>Download'
|
|
||||||
data = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
if data:
|
|
||||||
vqual = re.compile('ersione.*?:\s*([^|,\s,&,<]+)').findall(data[0])
|
|
||||||
sect = re.compile('Streaming', re.DOTALL).split(data[0])
|
|
||||||
|
|
||||||
## SD links
|
|
||||||
links = re.compile('<a\s*href="([^",\s]+).*?>([^<]+)', re.DOTALL).findall(sect[1])
|
|
||||||
|
|
||||||
for link, srv in links:
|
|
||||||
add_myitem(itemlist, "movie", srv, "[COLOR azure]%s (SD)[/COLOR] - %s" % (srv, vqual[0]), link)
|
|
||||||
|
|
||||||
## HD Links
|
|
||||||
if len(sect) > 2:
|
|
||||||
links = re.compile('<a\s*href="([^",\s]+).*?>([^<]+)', re.DOTALL).findall(sect[2])
|
|
||||||
|
|
||||||
for link, srv in links:
|
|
||||||
add_myitem(itemlist, "movie", srv, "[COLOR azure]%s (HD)[/COLOR] - %s" % (srv, vqual[0]), link)
|
|
||||||
else:
|
|
||||||
itemlist = servertools.find_video_items(item=item)
|
|
||||||
|
|
||||||
autoplay.start(itemlist, item)
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def play(item):
|
|
||||||
logger.info("kod.filmpertutti play: %s" % item.url)
|
|
||||||
|
|
||||||
data = item.url
|
|
||||||
|
|
||||||
data, c = unshortenit.unshorten(data)
|
|
||||||
|
|
||||||
itemlist = servertools.find_video_items(data=data)
|
itemlist = servertools.find_video_items(data=data)
|
||||||
|
|
||||||
for videoitem in itemlist:
|
for videoitem in itemlist:
|
||||||
videoitem.title = item.title + videoitem.title
|
videoitem.title = item.title + ' - [COLOR limegreen][[/COLOR]' + videoitem.title + '[COLOR limegreen]][/COLOR]'
|
||||||
videoitem.fulltitle = item.fulltitle
|
videoitem.fulltitle = item.fulltitle
|
||||||
videoitem.thumbnail = item.thumbnail
|
videoitem.thumbnail = item.thumbnail
|
||||||
videoitem.show = item.show
|
videoitem.show = item.show
|
||||||
videoitem.plot = item.plot
|
videoitem.plot = item.plot
|
||||||
videoitem.channel = item.channel
|
videoitem.channel = item.channel
|
||||||
videoitem.contentType = item.contentType
|
videoitem.contentType = item.contentType
|
||||||
|
videoitem.quality = item.quality
|
||||||
|
|
||||||
|
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]'+config.get_localized_string(30161)+'[/B][/COLOR]', url=item.url,
|
||||||
|
action="add_pelicula_to_library", extra="findvideos", contentTitle=item.fulltitle))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
Reference in New Issue
Block a user