MondoserieTV inizio scrittura
This commit is contained in:
@@ -6,65 +6,6 @@
|
|||||||
"language": ["ita"],
|
"language": ["ita"],
|
||||||
"thumbnail": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
"thumbnail": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
||||||
"bannermenu": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
"bannermenu": "https:\/\/mondoserietv.com\/wp-content\/uploads\/2018\/04\/logo.png",
|
||||||
"categories": ["movie","anime","tvshow"],
|
"categories": ["movie","anime","tvshow","documentary"],
|
||||||
"settings": [
|
"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", "3", "5", "10" ]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "filter_languages",
|
|
||||||
"type": "list",
|
|
||||||
"label": "Mostra link in lingua...",
|
|
||||||
"default": 0,
|
|
||||||
"enabled": true,
|
|
||||||
"visible": true,
|
|
||||||
"lvalues": ["Non filtrare","IT"]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
+306
-302
@@ -1,357 +1,361 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Ringraziamo Icarus crew
|
|
||||||
# Canale per mondoserietv
|
# Canale per mondoserietv
|
||||||
#
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
import re
|
|
||||||
|
|
||||||
from core import scrapertools, servertools, httptools, scrapertoolsV2
|
from core import support
|
||||||
from core import tmdb
|
|
||||||
from core.item import Item
|
|
||||||
from lib.unshortenit import unshorten
|
|
||||||
from platformcode import logger, config
|
|
||||||
from specials import autoplay
|
|
||||||
|
|
||||||
__channel__ = "mondoserietv"
|
__channel__ = "mondoserietv"
|
||||||
host = config.get_channel_url(__channel__)
|
host = support.config.get_channel_url(__channel__)
|
||||||
|
|
||||||
IDIOMAS = {'Italiano': 'IT'}
|
IDIOMAS = {'Italiano': 'IT'}
|
||||||
list_language = IDIOMAS.values()
|
list_language = IDIOMAS.values()
|
||||||
list_servers = ['akstream']
|
list_servers = ['akstream']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
|
|
||||||
checklinks = config.get_setting('checklinks', 'mondoserietv')
|
|
||||||
checklinks_number = config.get_setting('checklinks_number', 'mondoserietv')
|
|
||||||
|
|
||||||
headers = {'Referer': host}
|
headers = {'Referer': host}
|
||||||
|
|
||||||
PERPAGE = 14
|
@support.menu
|
||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info("kod.mondoserietvmainlist")
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
film =['/lista-film']
|
||||||
|
|
||||||
itemlist = [Item(channel=item.channel,
|
tvshow = ['/lista-serie-tv',
|
||||||
action="lista_serie",
|
('HD {TV}', ['/lista-serie-tv-in-altadefinizione']),
|
||||||
title="[COLOR azure]Lista Serie Tv Anni 50 60 70 80[/COLOR]",
|
('Anni 50 60 70 80 {TV}',['/lista-serie-tv-anni-60-70-80'])]
|
||||||
url=("%s/lista-serie-tv-anni-60-70-80/" % 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,
|
|
||||||
action="lista_serie",
|
|
||||||
title="[COLOR azure]Lista Serie Tv Italiane[/COLOR]",
|
|
||||||
url=("%s/lista-serie-tv-italiane/" % 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,
|
|
||||||
action="lista_serie",
|
|
||||||
title="[COLOR azure]Lista Cartoni Animati & Anime[/COLOR]",
|
|
||||||
url=("%s/lista-cartoni-animati-e-anime/" % 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,
|
|
||||||
action="peliculas",
|
|
||||||
title="[COLOR azure]Lista Film[/COLOR]",
|
|
||||||
url=("%s/lista-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 Film...[/COLOR]",
|
|
||||||
action="search",
|
|
||||||
extra="movie",
|
|
||||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search"),
|
|
||||||
Item(channel=item.channel,
|
|
||||||
title="[COLOR yellow]Cerca SerieTV...[/COLOR]",
|
|
||||||
action="search",
|
|
||||||
extra="tvshow",
|
|
||||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
|
||||||
|
|
||||||
return itemlist
|
anime = ['/lista-cartoni-animati-e-anime']
|
||||||
|
|
||||||
def search(item, texto):
|
docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow']),
|
||||||
logger.info("kod.mondoserietv search " + texto)
|
('Cerca Documentari... submenu bold', ['/lista-documentari', 'search', '', 'tvshow'])]
|
||||||
item.url = "%s/?s=%s" % (host, texto)
|
|
||||||
|
|
||||||
|
return locals()
|
||||||
|
|
||||||
|
def search(item, text):
|
||||||
|
support.log(text)
|
||||||
try:
|
try:
|
||||||
if item.extra == "movie":
|
item.search = text
|
||||||
return search_peliculas(item)
|
return peliculas(item)
|
||||||
if item.extra == "tvshow":
|
|
||||||
return search_peliculas_tv(item)
|
|
||||||
|
|
||||||
# Continua la ricerca in caso di errore
|
# Continua la ricerca in caso di errore
|
||||||
except:
|
except:
|
||||||
import sys
|
import sys
|
||||||
for line in sys.exc_info():
|
for line in sys.exc_info():
|
||||||
logger.error("%s" % line)
|
support.logger.error("%s" % line)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def search_peliculas(item):
|
|
||||||
logger.info("kod.mondoserietv search_peliculas")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
|
||||||
|
|
||||||
# Estrae i contenuti
|
|
||||||
patron = '<div class="boxinfo">\s*<a href="([^"]+)">\s*<span class="tt">(.*?)</span>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
scrapedplot = ""
|
|
||||||
scrapedthumbnail = ""
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="findvideos",
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
show=scrapedtitle,
|
|
||||||
title=scrapedtitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail=scrapedthumbnail,
|
|
||||||
plot=scrapedplot,
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
def search_peliculas_tv(item):
|
|
||||||
logger.info("kod.mondoserietv search_peliculas_tv")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
|
||||||
|
|
||||||
# Estrae i contenuti
|
|
||||||
patron = '<div class="boxinfo">\s*<a href="([^"]+)">\s*<span class="tt">(.*?)</span>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
|
||||||
scrapedplot = ""
|
|
||||||
scrapedthumbnail = ""
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="episodios",
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
show=scrapedtitle,
|
|
||||||
title=scrapedtitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail=scrapedthumbnail,
|
|
||||||
plot=scrapedplot,
|
|
||||||
extra=item.extra,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
logger.info("kod.mondoserietv film")
|
pagination = ''
|
||||||
itemlist = []
|
search = item.search
|
||||||
|
patronBlock = r'<div class="entry-content pagess">(?P<block>.*?)</ul>'
|
||||||
p = 1
|
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
|
||||||
if '{}' in item.url:
|
if item.contentType == 'tvshow':
|
||||||
item.url, p = item.url.split('{}')
|
action = 'episodios'
|
||||||
p = int(p)
|
anime = True
|
||||||
|
return locals()
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
|
||||||
|
|
||||||
blocco = scrapertools.find_single_match(data, '<div class="entry-content pagess">(.*?)</ul>')
|
|
||||||
patron = r'<a href="(.*?)" title="(.*?)">'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
|
||||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
|
||||||
if (p - 1) * PERPAGE > i: continue
|
|
||||||
if i >= p * PERPAGE: break
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
contentType="movie",
|
|
||||||
action="findvideos",
|
|
||||||
title=scrapedtitle,
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
fanart=item.fanart if item.fanart != "" else item.scrapedthumbnail,
|
|
||||||
show=item.fulltitle,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
if len(matches) >= p * PERPAGE:
|
|
||||||
scrapedurl = item.url + '{}' + str(p + 1)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
extra=item.extra,
|
|
||||||
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))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def lista_serie(item):
|
|
||||||
logger.info("kod.mondoserietv novità")
|
|
||||||
itemlist = []
|
|
||||||
|
|
||||||
p = 1
|
|
||||||
if '{}' in item.url:
|
|
||||||
item.url, p = item.url.split('{}')
|
|
||||||
p = int(p)
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
|
||||||
|
|
||||||
blocco = scrapertools.find_single_match(data, '<div class="entry-content pagess">(.*?)</ul>')
|
|
||||||
patron = r'<a href="(.*?)" title="(.*?)">'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
scrapertools.printMatches(matches)
|
|
||||||
|
|
||||||
for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
|
||||||
if (p - 1) * PERPAGE > i: continue
|
|
||||||
if i >= p * PERPAGE: break
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
|
||||||
action="episodios",
|
|
||||||
title=scrapedtitle,
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
fanart=item.fanart if item.fanart != "" else item.scrapedthumbnail,
|
|
||||||
show=item.fulltitle,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
if len(matches) >= p * PERPAGE:
|
|
||||||
scrapedurl = item.url + '{}' + str(p + 1)
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
extra=item.extra,
|
|
||||||
action="lista_serie",
|
|
||||||
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))
|
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
logger.info("kod.mondoserietv episodios")
|
anime = True
|
||||||
itemlist = []
|
patronBlock = r'<table>(?P<block>.*?)</table>'
|
||||||
|
patron = r'<tr><td><b>(?:\d+)?.*?(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title>[^<]+)(?P<url>.*?)<tr>'
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
def itemHook(item):
|
||||||
blocco = scrapertools.find_single_match(data, '<table>(.*?)</table>')
|
clear = support.re.sub(r'\[[^\]]+\]', '', item.title)
|
||||||
|
if clear.isdigit():
|
||||||
patron = "<tr><td><b>(.*?)(\d+)((?:x\d+| ))(.*?)<\/b>(.*?<tr>)"
|
item.title = support. typo('Episodio ' + clear, 'bold')
|
||||||
matches = scrapertoolsV2.find_multiple_matches(blocco, patron)
|
return item
|
||||||
|
return locals()
|
||||||
for t1, s, e, t2, scrapedurl in matches:
|
|
||||||
|
|
||||||
if "x" not in e:
|
|
||||||
e = s
|
|
||||||
|
|
||||||
if e == s:
|
|
||||||
s = None
|
|
||||||
|
|
||||||
if s is None:
|
|
||||||
s = "1"
|
|
||||||
|
|
||||||
if s.startswith('0'):
|
|
||||||
s = s.replace("0", "")
|
|
||||||
|
|
||||||
if e.startswith('x'):
|
|
||||||
e = e.replace("x", "")
|
|
||||||
|
|
||||||
scrapedtitle = t1 + s + "x" + e + " " + t2
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
contentType="episode",
|
|
||||||
action="findvideos",
|
|
||||||
items=s,
|
|
||||||
iteme=e,
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
show=scrapedtitle,
|
|
||||||
title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
|
||||||
url=scrapedurl,
|
|
||||||
thumbnail=item.scrapedthumbnail,
|
|
||||||
plot=item.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="episodios",
|
|
||||||
show=item.show))
|
|
||||||
|
|
||||||
return itemlist
|
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info(" findvideos")
|
return support.server(item, item.url)
|
||||||
|
|
||||||
if item.contentType != "episode":
|
# def search(item, texto):
|
||||||
return findvideos_movie(item)
|
# logger.info("kod.mondoserietv search " + texto)
|
||||||
|
# item.url = "%s/?s=%s" % (host, texto)
|
||||||
|
|
||||||
itemlist = servertools.find_video_items(data=item.url)
|
# try:
|
||||||
logger.info(itemlist)
|
# if item.extra == "movie":
|
||||||
|
# return search_peliculas(item)
|
||||||
|
# if item.extra == "tvshow":
|
||||||
|
# return search_peliculas_tv(item)
|
||||||
|
|
||||||
for videoitem in itemlist:
|
# # Continua la ricerca in caso di errore
|
||||||
videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]'])
|
# except:
|
||||||
videoitem.fulltitle = item.fulltitle
|
# import sys
|
||||||
videoitem.thumbnail = item.thumbnail
|
# for line in sys.exc_info():
|
||||||
videoitem.show = item.show
|
# logger.error("%s" % line)
|
||||||
videoitem.plot = item.plot
|
# return []
|
||||||
videoitem.channel = item.channel
|
|
||||||
videoitem.contentType = item.contentType
|
|
||||||
videoitem.language = IDIOMAS['Italiano']
|
|
||||||
|
|
||||||
# Requerido para Filtrar enlaces
|
# def search_peliculas(item):
|
||||||
|
# logger.info("kod.mondoserietv search_peliculas")
|
||||||
|
# itemlist = []
|
||||||
|
|
||||||
if checklinks:
|
# # Carica la pagina
|
||||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
# Requerido para FilterTools
|
# # Estrae i contenuti
|
||||||
|
# patron = '<div class="boxinfo">\s*<a href="([^"]+)">\s*<span class="tt">(.*?)</span>'
|
||||||
|
# matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
# itemlist = filtertools.get_links(itemlist, item, list_language)
|
# for scrapedurl, scrapedtitle in matches:
|
||||||
|
# scrapedplot = ""
|
||||||
|
# scrapedthumbnail = ""
|
||||||
|
# scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||||
|
|
||||||
# Requerido para AutoPlay
|
# itemlist.append(
|
||||||
|
# Item(channel=item.channel,
|
||||||
|
# action="findvideos",
|
||||||
|
# fulltitle=scrapedtitle,
|
||||||
|
# show=scrapedtitle,
|
||||||
|
# title=scrapedtitle,
|
||||||
|
# url=scrapedurl,
|
||||||
|
# thumbnail=scrapedthumbnail,
|
||||||
|
# plot=scrapedplot,
|
||||||
|
# extra=item.extra,
|
||||||
|
# folder=True))
|
||||||
|
|
||||||
autoplay.start(itemlist, item)
|
# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
if item.contentType != 'episode':
|
# def search_peliculas_tv(item):
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
# logger.info("kod.mondoserietv search_peliculas_tv")
|
||||||
itemlist.append(
|
# itemlist = []
|
||||||
Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
|
|
||||||
action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
|
||||||
|
|
||||||
return itemlist
|
# # Carica la pagina
|
||||||
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
|
# # Estrae i contenuti
|
||||||
|
# patron = '<div class="boxinfo">\s*<a href="([^"]+)">\s*<span class="tt">(.*?)</span>'
|
||||||
|
# matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
# for scrapedurl, scrapedtitle in matches:
|
||||||
|
# scrapedplot = ""
|
||||||
|
# scrapedthumbnail = ""
|
||||||
|
# scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||||
|
|
||||||
|
# itemlist.append(
|
||||||
|
# Item(channel=item.channel,
|
||||||
|
# action="episodios",
|
||||||
|
# fulltitle=scrapedtitle,
|
||||||
|
# show=scrapedtitle,
|
||||||
|
# title=scrapedtitle,
|
||||||
|
# url=scrapedurl,
|
||||||
|
# thumbnail=scrapedthumbnail,
|
||||||
|
# plot=scrapedplot,
|
||||||
|
# extra=item.extra,
|
||||||
|
# folder=True))
|
||||||
|
|
||||||
|
# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
|
# def peliculas(item):
|
||||||
|
# logger.info("kod.mondoserietv film")
|
||||||
|
# itemlist = []
|
||||||
|
|
||||||
|
# p = 1
|
||||||
|
# if '{}' in item.url:
|
||||||
|
# item.url, p = item.url.split('{}')
|
||||||
|
# p = int(p)
|
||||||
|
|
||||||
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
|
# blocco = scrapertools.find_single_match(data, '<div class="entry-content pagess">(.*?)</ul>')
|
||||||
|
# patron = r'<a href="(.*?)" title="(.*?)">'
|
||||||
|
# matches = re.compile(patron, re.DOTALL).findall(blocco)
|
||||||
|
|
||||||
|
# for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||||
|
# if (p - 1) * PERPAGE > i: continue
|
||||||
|
# if i >= p * PERPAGE: break
|
||||||
|
# scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||||
|
# itemlist.append(Item(channel=item.channel,
|
||||||
|
# contentType="movie",
|
||||||
|
# action="findvideos",
|
||||||
|
# title=scrapedtitle,
|
||||||
|
# fulltitle=scrapedtitle,
|
||||||
|
# url=scrapedurl,
|
||||||
|
# fanart=item.fanart if item.fanart != "" else item.scrapedthumbnail,
|
||||||
|
# show=item.fulltitle,
|
||||||
|
# folder=True))
|
||||||
|
|
||||||
|
# if len(matches) >= p * PERPAGE:
|
||||||
|
# scrapedurl = item.url + '{}' + str(p + 1)
|
||||||
|
# itemlist.append(
|
||||||
|
# Item(channel=item.channel,
|
||||||
|
# extra=item.extra,
|
||||||
|
# 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))
|
||||||
|
|
||||||
|
# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos_movie(item):
|
# def lista_serie(item):
|
||||||
logger.info(" findvideos_movie")
|
# logger.info("kod.mondoserietv novità")
|
||||||
|
# itemlist = []
|
||||||
|
|
||||||
# Carica la pagina
|
# p = 1
|
||||||
|
# if '{}' in item.url:
|
||||||
|
# item.url, p = item.url.split('{}')
|
||||||
|
# p = int(p)
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
patron = r"<a href='([^']+)'[^>]*?>[^<]*?<img src='[^']+' style='[^']+' alt='[^']+'>[^<]+?</a>"
|
# blocco = scrapertools.find_single_match(data, '<div class="entry-content pagess">(.*?)</ul>')
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
# patron = r'<a href="(.*?)" title="(.*?)">'
|
||||||
for scrapedurl in matches:
|
# matches = re.compile(patron, re.DOTALL).findall(blocco)
|
||||||
url, c = unshorten(scrapedurl)
|
# scrapertools.printMatches(matches)
|
||||||
data += url + '\n'
|
|
||||||
|
|
||||||
itemlist = servertools.find_video_items(data=data)
|
# for i, (scrapedurl, scrapedtitle) in enumerate(matches):
|
||||||
|
# if (p - 1) * PERPAGE > i: continue
|
||||||
|
# if i >= p * PERPAGE: break
|
||||||
|
# scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
||||||
|
# itemlist.append(Item(channel=item.channel,
|
||||||
|
# action="episodios",
|
||||||
|
# title=scrapedtitle,
|
||||||
|
# fulltitle=scrapedtitle,
|
||||||
|
# url=scrapedurl,
|
||||||
|
# fanart=item.fanart if item.fanart != "" else item.scrapedthumbnail,
|
||||||
|
# show=item.fulltitle,
|
||||||
|
# folder=True))
|
||||||
|
|
||||||
for videoitem in itemlist:
|
# if len(matches) >= p * PERPAGE:
|
||||||
videoitem.title = "".join([item.title, '[COLOR green][B]' + videoitem.title + '[/B][/COLOR]'])
|
# scrapedurl = item.url + '{}' + str(p + 1)
|
||||||
videoitem.fulltitle = item.fulltitle
|
# itemlist.append(
|
||||||
videoitem.thumbnail = item.thumbnail
|
# Item(channel=item.channel,
|
||||||
videoitem.show = item.show
|
# extra=item.extra,
|
||||||
videoitem.plot = item.plot
|
# action="lista_serie",
|
||||||
videoitem.channel = item.channel
|
# title="[COLOR lightgreen]" + config.get_localized_string(30992) + "[/COLOR]",
|
||||||
videoitem.contentType = item.contentType
|
# url=scrapedurl,
|
||||||
|
# thumbnail="http://2.bp.blogspot.com/-fE9tzwmjaeQ/UcM2apxDtjI/AAAAAAAAeeg/WKSGM2TADLM/s1600/pager+old.png",
|
||||||
|
# folder=True))
|
||||||
|
|
||||||
return itemlist
|
# tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
# def episodios(item):
|
||||||
|
# logger.info("kod.mondoserietv episodios")
|
||||||
|
# itemlist = []
|
||||||
|
|
||||||
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
# blocco = scrapertools.find_single_match(data, '<table>(.*?)</table>')
|
||||||
|
|
||||||
|
# patron = "<tr><td><b>(.*?)(\d+)((?:x\d+| ))(.*?)<\/b>(.*?<tr>)"
|
||||||
|
# matches = scrapertoolsV2.find_multiple_matches(blocco, patron)
|
||||||
|
|
||||||
|
# for t1, s, e, t2, scrapedurl in matches:
|
||||||
|
|
||||||
|
# if "x" not in e:
|
||||||
|
# e = s
|
||||||
|
|
||||||
|
# if e == s:
|
||||||
|
# s = None
|
||||||
|
|
||||||
|
# if s is None:
|
||||||
|
# s = "1"
|
||||||
|
|
||||||
|
# if s.startswith('0'):
|
||||||
|
# s = s.replace("0", "")
|
||||||
|
|
||||||
|
# if e.startswith('x'):
|
||||||
|
# e = e.replace("x", "")
|
||||||
|
|
||||||
|
# scrapedtitle = t1 + s + "x" + e + " " + t2
|
||||||
|
# itemlist.append(
|
||||||
|
# Item(channel=item.channel,
|
||||||
|
# contentType="episode",
|
||||||
|
# action="findvideos",
|
||||||
|
# items=s,
|
||||||
|
# iteme=e,
|
||||||
|
# fulltitle=scrapedtitle,
|
||||||
|
# show=scrapedtitle,
|
||||||
|
# title="[COLOR azure]" + scrapedtitle + "[/COLOR]",
|
||||||
|
# url=scrapedurl,
|
||||||
|
# thumbnail=item.scrapedthumbnail,
|
||||||
|
# plot=item.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="episodios",
|
||||||
|
# show=item.show))
|
||||||
|
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
# def findvideos(item):
|
||||||
|
# logger.info(" findvideos")
|
||||||
|
|
||||||
|
# if item.contentType != "episode":
|
||||||
|
# return findvideos_movie(item)
|
||||||
|
|
||||||
|
# itemlist = servertools.find_video_items(data=item.url)
|
||||||
|
# logger.info(itemlist)
|
||||||
|
|
||||||
|
# for videoitem in itemlist:
|
||||||
|
# videoitem.title = "".join([item.title, '[COLOR green][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
|
||||||
|
# videoitem.language = IDIOMAS['Italiano']
|
||||||
|
|
||||||
|
# # Requerido para Filtrar enlaces
|
||||||
|
|
||||||
|
# if checklinks:
|
||||||
|
# itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||||
|
|
||||||
|
# # Requerido para FilterTools
|
||||||
|
|
||||||
|
# # itemlist = filtertools.get_links(itemlist, item, list_language)
|
||||||
|
|
||||||
|
# # Requerido para AutoPlay
|
||||||
|
|
||||||
|
# autoplay.start(itemlist, item)
|
||||||
|
|
||||||
|
# if item.contentType != 'episode':
|
||||||
|
# if config.get_videolibrary_support() and len(itemlist) > 0 and item.extra != 'findvideos':
|
||||||
|
# itemlist.append(
|
||||||
|
# Item(channel=item.channel, title='[COLOR yellow][B]Aggiungi alla videoteca[/B][/COLOR]', url=item.url,
|
||||||
|
# action="add_pelicula_to_library", extra="findvideos", contentTitle=item.contentTitle))
|
||||||
|
|
||||||
|
# return itemlist
|
||||||
|
|
||||||
|
|
||||||
|
# def findvideos_movie(item):
|
||||||
|
# logger.info(" findvideos_movie")
|
||||||
|
|
||||||
|
# # Carica la pagina
|
||||||
|
|
||||||
|
# data = httptools.downloadpage(item.url).data
|
||||||
|
|
||||||
|
# patron = r"<a href='([^']+)'[^>]*?>[^<]*?<img src='[^']+' style='[^']+' alt='[^']+'>[^<]+?</a>"
|
||||||
|
# matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
# for scrapedurl in matches:
|
||||||
|
# url, c = unshorten(scrapedurl)
|
||||||
|
# data += url + '\n'
|
||||||
|
|
||||||
|
# itemlist = servertools.find_video_items(data=data)
|
||||||
|
|
||||||
|
# for videoitem in itemlist:
|
||||||
|
# videoitem.title = "".join([item.title, '[COLOR green][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
|
||||||
|
|||||||
+1
-1
@@ -910,7 +910,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
|||||||
videoitem.server = findS[2]
|
videoitem.server = findS[2]
|
||||||
videoitem.title = findS[0]
|
videoitem.title = findS[0]
|
||||||
item.title = item.contentTitle if config.get_localized_string(30161) in item.title else item.title
|
item.title = item.contentTitle if config.get_localized_string(30161) in item.title else item.title
|
||||||
videoitem.title = item.fulltitle + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
videoitem.title = item.title + (typo(videoitem.title, '_ color kod []') if videoitem.title else "") + (typo(videoitem.quality, '_ color kod []') if videoitem.quality else "")
|
||||||
videoitem.fulltitle = item.fulltitle
|
videoitem.fulltitle = item.fulltitle
|
||||||
videoitem.show = item.show
|
videoitem.show = item.show
|
||||||
videoitem.thumbnail = item.thumbnail
|
videoitem.thumbnail = item.thumbnail
|
||||||
|
|||||||
Reference in New Issue
Block a user