MondoserieTV inizio scrittura
This commit is contained in:
@@ -6,65 +6,6 @@
|
||||
"language": ["ita"],
|
||||
"thumbnail": "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"],
|
||||
"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"]
|
||||
}
|
||||
]
|
||||
"categories": ["movie","anime","tvshow","documentary"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
@@ -1,357 +1,361 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Ringraziamo Icarus crew
|
||||
# Canale per mondoserietv
|
||||
#
|
||||
# ----------------------------------------------------------
|
||||
import re
|
||||
|
||||
from core import scrapertools, servertools, httptools, scrapertoolsV2
|
||||
from core import tmdb
|
||||
from core.item import Item
|
||||
from lib.unshortenit import unshorten
|
||||
from platformcode import logger, config
|
||||
from specials import autoplay
|
||||
from core import support
|
||||
|
||||
__channel__ = "mondoserietv"
|
||||
host = config.get_channel_url(__channel__)
|
||||
host = support.config.get_channel_url(__channel__)
|
||||
|
||||
IDIOMAS = {'Italiano': 'IT'}
|
||||
list_language = IDIOMAS.values()
|
||||
list_servers = ['akstream']
|
||||
list_quality = ['default']
|
||||
|
||||
checklinks = config.get_setting('checklinks', 'mondoserietv')
|
||||
checklinks_number = config.get_setting('checklinks_number', 'mondoserietv')
|
||||
|
||||
headers = {'Referer': host}
|
||||
|
||||
PERPAGE = 14
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
logger.info("kod.mondoserietvmainlist")
|
||||
|
||||
autoplay.init(item.channel, list_servers, list_quality)
|
||||
film =['/lista-film']
|
||||
|
||||
itemlist = [Item(channel=item.channel,
|
||||
action="lista_serie",
|
||||
title="[COLOR azure]Lista Serie Tv Anni 50 60 70 80[/COLOR]",
|
||||
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)
|
||||
tvshow = ['/lista-serie-tv',
|
||||
('HD {TV}', ['/lista-serie-tv-in-altadefinizione']),
|
||||
('Anni 50 60 70 80 {TV}',['/lista-serie-tv-anni-60-70-80'])]
|
||||
|
||||
return itemlist
|
||||
anime = ['/lista-cartoni-animati-e-anime']
|
||||
|
||||
def search(item, texto):
|
||||
logger.info("kod.mondoserietv search " + texto)
|
||||
item.url = "%s/?s=%s" % (host, texto)
|
||||
docu = [('Documentari bullet bold',['/lista-documentari', 'peliculas', '', 'tvshow']),
|
||||
('Cerca Documentari... submenu bold', ['/lista-documentari', 'search', '', 'tvshow'])]
|
||||
|
||||
return locals()
|
||||
|
||||
def search(item, text):
|
||||
support.log(text)
|
||||
try:
|
||||
if item.extra == "movie":
|
||||
return search_peliculas(item)
|
||||
if item.extra == "tvshow":
|
||||
return search_peliculas_tv(item)
|
||||
item.search = text
|
||||
return peliculas(item)
|
||||
|
||||
# Continua la ricerca in caso di errore
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("%s" % line)
|
||||
support.logger.error("%s" % line)
|
||||
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):
|
||||
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 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
|
||||
pagination = ''
|
||||
search = item.search
|
||||
patronBlock = r'<div class="entry-content pagess">(?P<block>.*?)</ul>'
|
||||
patron = r'<li><a href="(?P<url>[^"]+)" title="(?P<title>.*?)(?:\s(?P<year>\d{4}))?"[^>]*>'
|
||||
if item.contentType == 'tvshow':
|
||||
action = 'episodios'
|
||||
anime = True
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
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
|
||||
|
||||
anime = True
|
||||
patronBlock = r'<table>(?P<block>.*?)</table>'
|
||||
patron = r'<tr><td><b>(?:\d+)?.*?(?:(?P<episode>(?:\d+x\d+|\d+)))\s*(?P<title>[^<]+)(?P<url>.*?)<tr>'
|
||||
def itemHook(item):
|
||||
clear = support.re.sub(r'\[[^\]]+\]', '', item.title)
|
||||
if clear.isdigit():
|
||||
item.title = support. typo('Episodio ' + clear, 'bold')
|
||||
return item
|
||||
return locals()
|
||||
|
||||
def findvideos(item):
|
||||
logger.info(" findvideos")
|
||||
return support.server(item, item.url)
|
||||
|
||||
if item.contentType != "episode":
|
||||
return findvideos_movie(item)
|
||||
# def search(item, texto):
|
||||
# logger.info("kod.mondoserietv search " + texto)
|
||||
# item.url = "%s/?s=%s" % (host, texto)
|
||||
|
||||
itemlist = servertools.find_video_items(data=item.url)
|
||||
logger.info(itemlist)
|
||||
# try:
|
||||
# if item.extra == "movie":
|
||||
# return search_peliculas(item)
|
||||
# if item.extra == "tvshow":
|
||||
# return search_peliculas_tv(item)
|
||||
|
||||
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']
|
||||
# # Continua la ricerca in caso di errore
|
||||
# except:
|
||||
# import sys
|
||||
# for line in sys.exc_info():
|
||||
# logger.error("%s" % line)
|
||||
# return []
|
||||
|
||||
# Requerido para Filtrar enlaces
|
||||
# def search_peliculas(item):
|
||||
# logger.info("kod.mondoserietv search_peliculas")
|
||||
# itemlist = []
|
||||
|
||||
if checklinks:
|
||||
itemlist = servertools.check_list_links(itemlist, checklinks_number)
|
||||
# # Carica la pagina
|
||||
# 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':
|
||||
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))
|
||||
# def search_peliculas_tv(item):
|
||||
# logger.info("kod.mondoserietv search_peliculas_tv")
|
||||
# itemlist = []
|
||||
|
||||
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):
|
||||
logger.info(" findvideos_movie")
|
||||
# def lista_serie(item):
|
||||
# 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>"
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for scrapedurl in matches:
|
||||
url, c = unshorten(scrapedurl)
|
||||
data += url + '\n'
|
||||
# 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)
|
||||
|
||||
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:
|
||||
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
|
||||
# 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))
|
||||
|
||||
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
|
||||
|
||||
@@ -910,7 +910,7 @@ def server(item, data='', itemlist=[], headers='', AutoPlay=True, CheckLinks=Tru
|
||||
videoitem.server = findS[2]
|
||||
videoitem.title = findS[0]
|
||||
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.show = item.show
|
||||
videoitem.thumbnail = item.thumbnail
|
||||
|
||||
Reference in New Issue
Block a user