Merge pull request #40 from 4l3x87/master
Refactor channel Guardaserie.click e AnimeWorld
This commit is contained in:
@@ -4,9 +4,18 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["ita"],
|
"language": ["ita"],
|
||||||
"thumbnail": "https://cdn.animeworld.it/static/images/general/logoaw.png",
|
"thumbnail": "animeworld.png",
|
||||||
|
"banner": "animeworld.png",
|
||||||
"categories": ["anime"],
|
"categories": ["anime"],
|
||||||
"settings": [
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "channel_host",
|
||||||
|
"type": "text",
|
||||||
|
"label": "Host del canale",
|
||||||
|
"default": "https://www.animeworld.it",
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "include_in_global_search",
|
"id": "include_in_global_search",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
|
|||||||
+156
-49
@@ -3,16 +3,20 @@
|
|||||||
# Canale per animeworld
|
# Canale per animeworld
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
import urllib
|
||||||
|
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
|
import channelselector
|
||||||
from channelselector import thumb
|
from channelselector import thumb
|
||||||
from core import httptools, scrapertoolsV2, servertools, tmdb, support
|
from core import httptools, scrapertoolsV2, servertools, tmdb, support, jsontools
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
from specials import autoplay, autorenumber
|
from specials import autoplay, autorenumber
|
||||||
|
|
||||||
host = "https://www.animeworld.it"
|
__channel__ = 'animeworld'
|
||||||
|
host = config.get_setting("channel_host", __channel__)
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
IDIOMAS = {'Italiano': 'Italiano'}
|
IDIOMAS = {'Italiano': 'Italiano'}
|
||||||
@@ -25,21 +29,51 @@ checklinks_number = config.get_setting('checklinks_number', 'animeworld')
|
|||||||
|
|
||||||
|
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info("[animeworld.py] mainlist")
|
logger.info(__channel__+" mainlist")
|
||||||
|
|
||||||
itemlist =[]
|
itemlist =[]
|
||||||
|
|
||||||
support.menu(itemlist, 'Anime ITA submenu bold', 'build_menu', host+'/filter?language[]=1')
|
support.menu(itemlist, 'Anime bold', 'lista_anime', host+'/az-list')
|
||||||
support.menu(itemlist, 'Anime SUB submenu bold', 'build_menu', host+'/filter?language[]=0')
|
support.menu(itemlist, 'ITA submenu', 'build_menu', host+'/filter?language[]=1', args=["anime"])
|
||||||
support.menu(itemlist, 'Anime A-Z sub', 'alfabetico', host+'/az-list')
|
support.menu(itemlist, 'Sub-ITA submenu', 'build_menu', host+'/filter?language[]=0', args=["anime"])
|
||||||
support.menu(itemlist, 'Anime - Ultimi Aggiunti', 'alfabetico', host+'/newest')
|
support.menu(itemlist, 'Archivio A-Z submenu', 'alfabetico', host+'/az-list', args=["tvshow","a-z"])
|
||||||
support.menu(itemlist, 'Anime - Ultimi Episodi', 'alfabetico', host+'/newest')
|
support.menu(itemlist, 'In corso submenu', 'video', host+'/', args=["in sala"])
|
||||||
|
support.menu(itemlist, 'Generi submenu', 'generi', host+'/')
|
||||||
|
support.menu(itemlist, 'Ultimi Aggiunti bold', 'video', host+'/newest', args=["anime"])
|
||||||
|
support.menu(itemlist, 'Ultimi Episodi bold', 'video', host+'/updated', args=["novita'"])
|
||||||
support.menu(itemlist, 'Cerca...', 'search')
|
support.menu(itemlist, 'Cerca...', 'search')
|
||||||
|
|
||||||
|
|
||||||
autoplay.init(item.channel, list_servers, list_quality)
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
|
|
||||||
|
itemlist.append(
|
||||||
|
Item(channel='setting',
|
||||||
|
action="channel_config",
|
||||||
|
title=support.typo("Configurazione Canale color lime"),
|
||||||
|
config=item.channel,
|
||||||
|
folder=False,
|
||||||
|
thumbnail=channelselector.get_thumb('setting_0.png'))
|
||||||
|
)
|
||||||
|
|
||||||
|
return itemlist
|
||||||
|
|
||||||
|
# Crea menu dei generi =================================================
|
||||||
|
|
||||||
|
def generi(item):
|
||||||
|
support.log(item.channel+" generi")
|
||||||
|
itemlist = []
|
||||||
|
patron_block = r'</i>\sGeneri</a>\s*<ul class="sub">(.*?)</ul>'
|
||||||
|
patron = r'<a href="([^"]+)"\stitle="([^"]+)">'
|
||||||
|
matches = support.match(item,patron, patron_block, headers)[0]
|
||||||
|
|
||||||
|
for scrapedurl, scrapedtitle in matches:
|
||||||
|
itemlist.append(Item(
|
||||||
|
channel=item.channel,
|
||||||
|
action="video",
|
||||||
|
title=scrapedtitle,
|
||||||
|
url="%s%s" % (host,scrapedurl)))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -103,7 +137,7 @@ def build_sub_menu(item):
|
|||||||
# Novità ======================================================
|
# Novità ======================================================
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info("[animeworld.py] newest")
|
logger.info(__channel__+" newest")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
try:
|
try:
|
||||||
@@ -144,7 +178,7 @@ def search(item, texto):
|
|||||||
# Lista A-Z ====================================================
|
# Lista A-Z ====================================================
|
||||||
|
|
||||||
def alfabetico(item):
|
def alfabetico(item):
|
||||||
logger.info("[animeworld.py] alfabetico")
|
logger.info(__channel__+" alfabetico")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
@@ -170,7 +204,7 @@ def alfabetico(item):
|
|||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
def lista_anime(item):
|
def lista_anime(item):
|
||||||
logger.info("[animeworld.py] lista_anime")
|
logger.info(__channel__+" lista_anime")
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
@@ -202,7 +236,7 @@ def lista_anime(item):
|
|||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
extra=item.extra,
|
extra=item.extra,
|
||||||
contentType="tvshow",
|
contentType="episode",
|
||||||
action="episodios",
|
action="episodios",
|
||||||
text_color="azure",
|
text_color="azure",
|
||||||
title=title,
|
title=title,
|
||||||
@@ -217,23 +251,24 @@ def lista_anime(item):
|
|||||||
autorenumber.renumber(itemlist)
|
autorenumber.renumber(itemlist)
|
||||||
|
|
||||||
# Next page
|
# Next page
|
||||||
next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href="([^"]+)" rel="next"')
|
support.nextPage(itemlist, item, data, r'<a class="page-link" href="([^"]+)" rel="next"')
|
||||||
|
# next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href="([^"]+)" rel="next"')
|
||||||
if next_page != '':
|
#
|
||||||
itemlist.append(
|
# if next_page != '':
|
||||||
Item(channel=item.channel,
|
# itemlist.append(
|
||||||
action='lista_anime',
|
# Item(channel=item.channel,
|
||||||
title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
# action='lista_anime',
|
||||||
url=next_page,
|
# title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
||||||
contentType=item.contentType,
|
# url=next_page,
|
||||||
thumbnail=thumb()))
|
# contentType=item.contentType,
|
||||||
|
# thumbnail=thumb()))
|
||||||
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def video(item):
|
def video(item):
|
||||||
logger.info("[animeworld.py] video")
|
logger.info(__channel__+" video")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
data = httptools.downloadpage(item.url).data
|
||||||
@@ -296,7 +331,7 @@ def video(item):
|
|||||||
|
|
||||||
# Controlla se sono Episodi o Film
|
# Controlla se sono Episodi o Film
|
||||||
if movie == '':
|
if movie == '':
|
||||||
contentType = 'tvshow'
|
contentType = 'episode'
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
else:
|
else:
|
||||||
contentType = 'movie'
|
contentType = 'movie'
|
||||||
@@ -317,33 +352,38 @@ def video(item):
|
|||||||
autorenumber.renumber(itemlist)
|
autorenumber.renumber(itemlist)
|
||||||
|
|
||||||
# Next page
|
# Next page
|
||||||
next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href=".*?page=([^"]+)" rel="next"')
|
support.nextPage(itemlist, item, data, r'<a\sclass="page-link"\shref="([^"]+)"\srel="next"\saria-label="Successiva')
|
||||||
|
# next_page = scrapertoolsV2.find_single_match(data, '<a class="page-link" href=".*?page=([^"]+)" rel="next"')
|
||||||
if next_page != '':
|
#
|
||||||
itemlist.append(
|
# if next_page != '':
|
||||||
Item(channel=item.channel,
|
# itemlist.append(
|
||||||
action='video',
|
# Item(channel=item.channel,
|
||||||
title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
# action='video',
|
||||||
url=re.sub('&page=([^"]+)', '', item.url) + '&page=' + next_page,
|
# title='[B]' + config.get_localized_string(30992) + ' >[/B]',
|
||||||
contentType=item.contentType,
|
# url=re.sub('&page=([^"]+)', '', item.url) + '&page=' + next_page,
|
||||||
thumbnail=thumb()))
|
# contentType=item.contentType,
|
||||||
|
# thumbnail=thumb()))
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
logger.info("[animeworld.py] episodios")
|
logger.info(__channel__+" episodios")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data.replace('\n', '')
|
data = httptools.downloadpage(item.url).data.replace('\n', '')
|
||||||
data = re.sub(r'>\s*<', '><', data)
|
data = re.sub(r'>\s*<', '><', data)
|
||||||
block = scrapertoolsV2.find_single_match(data, r'<div class="widget servers".*?>(.*?)<div id="download"')
|
block1 = scrapertoolsV2.find_single_match(data, r'<div class="widget servers".*?>(.*?)<div id="download"')
|
||||||
block = scrapertoolsV2.find_single_match(block,r'<div class="server.*?>(.*?)<div class="server.*?>')
|
block = scrapertoolsV2.find_single_match(block1,r'<div class="server.*?>(.*?)<div class="server.*?>')
|
||||||
|
|
||||||
patron = r'<li><a.*?href="([^"]+)".*?>(.*?)<\/a>'
|
patron = r'<li><a.*?href="([^"]+)".*?>(.*?)<\/a>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(block)
|
matches = re.compile(patron, re.DOTALL).findall(block)
|
||||||
|
|
||||||
|
extra = {}
|
||||||
|
extra['data'] = block1.replace('<strong>Attenzione!</strong> Non ci sono episodi in questa sezione, torna indietro!.','')
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
|
extra['episode'] = scrapedtitle
|
||||||
scrapedtitle = '[B] Episodio ' + scrapedtitle + '[/B]'
|
scrapedtitle = '[B] Episodio ' + scrapedtitle + '[/B]'
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
@@ -356,46 +396,113 @@ def episodios(item):
|
|||||||
show=scrapedtitle,
|
show=scrapedtitle,
|
||||||
plot=item.plot,
|
plot=item.plot,
|
||||||
fanart=item.thumbnail,
|
fanart=item.thumbnail,
|
||||||
|
extra=extra,
|
||||||
thumbnail=item.thumbnail))
|
thumbnail=item.thumbnail))
|
||||||
|
|
||||||
autorenumber.renumber(itemlist, item,'bold')
|
autorenumber.renumber(itemlist, item,'bold')
|
||||||
|
|
||||||
|
|
||||||
# Aggiungi a Libreria
|
# Aggiungi a Libreria
|
||||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
# if config.get_videolibrary_support() and len(itemlist) != 0:
|
||||||
itemlist.append(
|
# itemlist.append(
|
||||||
Item(
|
# Item(
|
||||||
channel=item.channel,
|
# channel=item.channel,
|
||||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
# title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
||||||
url=item.url,
|
# url=item.url,
|
||||||
action="add_serie_to_library",
|
# action="add_serie_to_library",
|
||||||
extra="episodios",
|
# extra="episodios",
|
||||||
show=item.show))
|
# show=item.show))
|
||||||
|
support.videolibrary(itemlist, item)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info("[animeworld.py] findvideos")
|
logger.info(__channel__+" findvideos")
|
||||||
|
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
# logger.debug(item.extra)
|
||||||
|
episode = '1'
|
||||||
|
#recupero i server disponibili
|
||||||
|
if item.extra and item.extra['episode']:
|
||||||
|
data = item.extra['data']
|
||||||
|
episode = item.extra['episode']
|
||||||
|
else:
|
||||||
|
data = httptools.downloadpage(item.url,headers=headers).data
|
||||||
|
block = scrapertoolsV2.find_single_match(data,r'data-target="\.widget\.servers.*?>(.*?)</div>')
|
||||||
|
servers = scrapertoolsV2.find_multiple_matches(block,r'class="tab.*?data-name="([0-9]+)">([^<]+)</span')
|
||||||
|
videolist = []
|
||||||
|
videoData = ''
|
||||||
|
for serverid, servername in servers:
|
||||||
|
#recupero l'id del video per questo server
|
||||||
|
block = scrapertoolsV2.find_single_match(data,r'<div class="server.*?data-id="'+serverid+'">(.*?)</ul>')
|
||||||
|
id = scrapertoolsV2.find_single_match(block,r'<a\sdata-id="([^"]+)"\sdata-base="'+episode+'"')
|
||||||
|
|
||||||
|
dataJson = httptools.downloadpage('%s/ajax/episode/info?id=%s&server=%s&ts=%s' % (host, id, serverid, int(time.time())), headers=[['x-requested-with', 'XMLHttpRequest']]).data
|
||||||
|
json = jsontools.load(dataJson)
|
||||||
|
|
||||||
|
videoData +='\n'+json['grabber']
|
||||||
|
|
||||||
|
if serverid == '33':
|
||||||
|
post = urllib.urlencode({'r': '', 'd': 'www.animeworld.biz'})
|
||||||
|
dataJson = httptools.downloadpage(json['grabber'].replace('/v/','/api/source/'),headers=[['x-requested-with', 'XMLHttpRequest']],post=post).data
|
||||||
|
json = jsontools.load(dataJson)
|
||||||
|
logger.debug(json['data'])
|
||||||
|
if json['data']:
|
||||||
|
for file in json['data']:
|
||||||
|
itemlist.append(
|
||||||
|
Item(
|
||||||
|
channel=item.channel,
|
||||||
|
action="play",
|
||||||
|
title='diretto',
|
||||||
|
url=file['file'],
|
||||||
|
quality=file['label'],
|
||||||
|
server='directo',
|
||||||
|
show=item.show,
|
||||||
|
contentType=item.contentType,
|
||||||
|
folder=False))
|
||||||
|
|
||||||
|
if serverid == '28':
|
||||||
|
itemlist.append(
|
||||||
|
Item(
|
||||||
|
channel=item.channel,
|
||||||
|
action="play",
|
||||||
|
title='diretto',
|
||||||
|
quality='',
|
||||||
|
url=json['grabber'],
|
||||||
|
server='directo',
|
||||||
|
show=item.show,
|
||||||
|
contentType=item.contentType,
|
||||||
|
folder=False))
|
||||||
|
|
||||||
|
|
||||||
|
itemlist += servertools.find_video_items(item,videoData)
|
||||||
|
|
||||||
|
return support.server(item,itemlist=itemlist)
|
||||||
|
|
||||||
anime_id = scrapertoolsV2.find_single_match(item.url, r'.*\..*?\/(.*)')
|
anime_id = scrapertoolsV2.find_single_match(item.url, r'.*\..*?\/(.*)')
|
||||||
data = httptools.downloadpage(host + "/ajax/episode/serverPlayer?id=" + anime_id).data
|
data = httptools.downloadpage(host + "/ajax/episode/serverPlayer?id=" + anime_id).data
|
||||||
patron = '<source src="([^"]+)"'
|
patron = '<source src="([^"]+)"'
|
||||||
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
|
|
||||||
|
|
||||||
for video in matches:
|
for video in matches:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(
|
Item(
|
||||||
channel=item.channel,
|
channel=item.channel,
|
||||||
action="play",
|
action="play",
|
||||||
title=item.title + " [[COLOR orange]Diretto[/COLOR]]",
|
# title=item.title + " [[COLOR orange]Diretto[/COLOR]]",
|
||||||
|
title='diretto',
|
||||||
|
quality='',
|
||||||
url=video,
|
url=video,
|
||||||
server='directo',
|
server='directo',
|
||||||
|
show=item.show,
|
||||||
contentType=item.contentType,
|
contentType=item.contentType,
|
||||||
folder=False))
|
folder=False))
|
||||||
|
|
||||||
|
return support.server(item,data, itemlist)
|
||||||
|
|
||||||
# Requerido para Filtrar enlaces
|
# Requerido para Filtrar enlaces
|
||||||
|
|
||||||
if checklinks:
|
if checklinks:
|
||||||
|
|||||||
@@ -4,10 +4,18 @@
|
|||||||
"active": true,
|
"active": true,
|
||||||
"adult": false,
|
"adult": false,
|
||||||
"language": ["ita"],
|
"language": ["ita"],
|
||||||
"thumbnail": "http://www.guardaserie.click/wp-content/themes/guardaserie/images/logogd.png",
|
"thumbnail": "guardaserieclick.png",
|
||||||
"bannermenu": "http://www.guardaserie.click/wp-content/themes/guardaserie/images/logogd.png",
|
"bannermenu": "guardaserieclick.png",
|
||||||
"categories": ["tvshow","anime"],
|
"categories": ["tvshow","anime"],
|
||||||
"settings": [
|
"settings": [
|
||||||
|
{
|
||||||
|
"id": "channel_host",
|
||||||
|
"type": "text",
|
||||||
|
"label": "Host del canale",
|
||||||
|
"default": "https://www.guardaserie.media",
|
||||||
|
"enabled": true,
|
||||||
|
"visible": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "include_in_global_search",
|
"id": "include_in_global_search",
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
@@ -31,6 +39,32 @@
|
|||||||
"default": true,
|
"default": true,
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"visible": 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"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+165
-123
@@ -1,49 +1,56 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Ringraziamo Icarus crew
|
|
||||||
# Canale per guardaserie.click
|
# Canale per guardaserie.click
|
||||||
|
# Thanks to Icarus crew & Alfa addon
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
import channelselector
|
||||||
from core import httptools, scrapertools, servertools, support
|
from core import httptools, scrapertools, servertools, support
|
||||||
from core import tmdb
|
from core import tmdb
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
from platformcode import logger, config
|
from platformcode import logger, config
|
||||||
|
from specials import autoplay
|
||||||
|
|
||||||
host = "http://www.guardaserie.watch"
|
__channel__ = 'guardaserieclick'
|
||||||
|
host = config.get_setting("channel_host", __channel__)
|
||||||
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
IDIOMAS = {'Italiano': 'IT'}
|
||||||
|
list_language = IDIOMAS.values()
|
||||||
|
list_servers = ['speedvideo','openload']
|
||||||
|
list_quality = ['default']
|
||||||
|
|
||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def mainlist(item):
|
def mainlist(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> mainlist")
|
support.log(item.channel+" mainlist")
|
||||||
itemlist = [Item(channel=item.channel,
|
|
||||||
action="nuoveserie",
|
itemlist = []
|
||||||
title=support.color("Nuove serie TV", "orange"),
|
# support.menu(itemlist, 'Serie TV bold')
|
||||||
url="%s/lista-serie-tv" % host,
|
support.menu(itemlist, 'Novità bold', 'serietvaggiornate', "%s/lista-serie-tv" % host,'tvshow')
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
support.menu(itemlist, 'Nuove serie', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow')
|
||||||
Item(channel=item.channel,
|
support.menu(itemlist, 'Serie inedite Sub-ITA', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['inedite'])
|
||||||
action="serietvaggiornate",
|
support.menu(itemlist, 'Da non perdere bold', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['tv','da non perdere'])
|
||||||
title=support.color("Serie TV Aggiornate", "azure"),
|
support.menu(itemlist, 'Classiche bold', 'nuoveserie', "%s/lista-serie-tv" % host,'tvshow',args=['tv','classiche'])
|
||||||
url="%s/lista-serie-tv" % host,
|
support.menu(itemlist, 'Anime', 'lista_serie', "%s/category/animazione/" % host,'tvshow')
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
support.menu(itemlist, 'Categorie', 'categorie', host,'tvshow',args=['serie'])
|
||||||
Item(channel=item.channel,
|
support.menu(itemlist, 'Cerca', 'search', host,'tvshow',args=['serie'])
|
||||||
action="lista_serie",
|
|
||||||
title=support.color("Anime", "azure"),
|
autoplay.init(item.channel, list_servers, list_quality)
|
||||||
url="%s/category/animazione/" % host,
|
autoplay.show_option(item.channel, itemlist)
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
|
||||||
Item(channel=item.channel,
|
itemlist.append(
|
||||||
action="categorie",
|
Item(channel='setting',
|
||||||
title=support.color("Categorie", "azure"),
|
action="channel_config",
|
||||||
url=host,
|
title=support.typo("Configurazione Canale color lime"),
|
||||||
thumbnail="http://orig03.deviantart.net/6889/f/2014/079/7/b/movies_and_popcorn_folder_icon_by_matheusgrilo-d7ay4tw.png"),
|
config=item.channel,
|
||||||
Item(channel=item.channel,
|
folder=False,
|
||||||
action="search",
|
thumbnail=channelselector.get_thumb('setting_0.png'))
|
||||||
title=support.color("Cerca ...", "yellow"),
|
)
|
||||||
extra="serie",
|
|
||||||
thumbnail="http://dc467.4shared.com/img/fEbJqOum/s7/13feaf0c8c0/Search")]
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -52,7 +59,7 @@ def mainlist(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
logger.info("[GuardaSerieClick.py]==> newest" + categoria)
|
support.log(__channel__+" newest" + categoria)
|
||||||
itemlist = []
|
itemlist = []
|
||||||
item = Item()
|
item = Item()
|
||||||
try:
|
try:
|
||||||
@@ -78,7 +85,7 @@ def newest(categoria):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
logger.info("[GuardaSerieClick.py]==> search")
|
support.log(item.channel+" search")
|
||||||
item.url = host + "/?s=" + texto
|
item.url = host + "/?s=" + texto
|
||||||
try:
|
try:
|
||||||
return lista_serie(item)
|
return lista_serie(item)
|
||||||
@@ -91,29 +98,44 @@ def search(item, texto):
|
|||||||
|
|
||||||
|
|
||||||
# ================================================================================================================
|
# ================================================================================================================
|
||||||
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
|
def cleantitle(scrapedtitle):
|
||||||
|
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle.strip()).replace('"',"'")
|
||||||
|
|
||||||
|
return scrapedtitle.strip()
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================================================================================
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def nuoveserie(item):
|
def nuoveserie(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> nuoveserie")
|
support.log(item.channel+" nuoveserie")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
patron_block = ''
|
||||||
blocco = scrapertools.find_single_match(data, '<div\s*class="container container-title-serie-new container-scheda" meta-slug="new">(.*?)</div></div><div')
|
if 'inedite' in item.args:
|
||||||
|
patron_block = r'<div\s*class="container container-title-serie-ined container-scheda" meta-slug="ined">(.*?)</div></div><div'
|
||||||
|
elif 'da non perder' in item.args:
|
||||||
|
patron_block = r'<div\s*class="container container-title-serie-danonperd container-scheda" meta-slug="danonperd">(.*?)</div></div><div'
|
||||||
|
elif 'classiche' in item.args:
|
||||||
|
patron_block = r'<div\s*class="container container-title-serie-classiche container-scheda" meta-slug="classiche">(.*?)</div></div><div'
|
||||||
|
else:
|
||||||
|
patron_block = r'<div\s*class="container container-title-serie-new container-scheda" meta-slug="new">(.*?)</div></div><div'
|
||||||
|
|
||||||
patron = r'<a\s*href="([^"]+)".*?>\s*<img\s*.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>'
|
patron = r'<a\s*href="([^"]+)".*?>\s*<img\s*.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>'
|
||||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p>'
|
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
matches = support.match(item, patron, patron_block, headers)[0]
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
for scrapedurl, scrapedthumbnail, scrapedtitle in matches:
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
scrapedtitle = cleantitle(scrapedtitle)
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="episodi",
|
action="episodios",
|
||||||
contentType="tv",
|
contentType="episode",
|
||||||
title=scrapedtitle,
|
title=scrapedtitle,
|
||||||
fulltitle=scrapedtitle,
|
fulltitle=scrapedtitle,
|
||||||
url=scrapedurl,
|
url=scrapedurl,
|
||||||
extra="tv",
|
|
||||||
show=scrapedtitle,
|
show=scrapedtitle,
|
||||||
thumbnail=scrapedthumbnail,
|
thumbnail=scrapedthumbnail,
|
||||||
folder=True))
|
folder=True))
|
||||||
@@ -126,35 +148,48 @@ def nuoveserie(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def serietvaggiornate(item):
|
def serietvaggiornate(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> serietvaggiornate")
|
support.log(item.channel+" serietvaggiornate")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
patron_block = r'<div\s*class="container container-title-serie-lastep container-scheda" meta-slug="lastep">(.*?)</div></div><div'
|
||||||
blocco = scrapertools.find_single_match(data,
|
|
||||||
r'<div\s*class="container container-title-serie-lastep container-scheda" meta-slug="lastep">(.*?)</div></div><div')
|
|
||||||
|
|
||||||
patron = r'<a\s*rel="nofollow" href="([^"]+)"[^>]+> <img\s*.*?src="([^"]+)"[^>]+>[^>]+>'
|
patron = r'<a\s*rel="nofollow" href="([^"]+)"[^>]+> <img\s*.*?src="([^"]+)"[^>]+>[^>]+>'
|
||||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>'
|
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)<[^>]+>'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
matches = support.match(item,patron, patron_block, headers)[0]
|
||||||
|
|
||||||
for scrapedurl, scrapedthumbnail, scrapedep, scrapedtitle in matches:
|
for scrapedurl, scrapedthumbnail, scrapedep, scrapedtitle in matches:
|
||||||
episode = re.compile(r'^(\d+)x(\d+)', re.DOTALL).findall(scrapedep) # Prendo stagione ed episodio
|
episode = re.compile(r'^(\d+)x(\d+)', re.DOTALL).findall(scrapedep) # Prendo stagione ed episodioso
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle)
|
scrapedtitle = cleantitle(scrapedtitle)
|
||||||
title = "%s %s" % (scrapedtitle, scrapedep)
|
|
||||||
extra = r'<span\s*.*?meta-stag="%s" meta-ep="%s" meta-embed="([^"]+)"[^>]*>' % (
|
contentlanguage = ""
|
||||||
|
if 'sub-ita' in scrapedep.strip().lower():
|
||||||
|
contentlanguage = 'Sub-ITA'
|
||||||
|
|
||||||
|
extra = r'<span\s*.*?meta-stag="%s" meta-ep="%s" meta-embed="([^"]+)"\s*.*?embed2="([^"]+)?"\s*.*?embed3="([^"]+)?"[^>]*>' % (
|
||||||
episode[0][0], episode[0][1].lstrip("0"))
|
episode[0][0], episode[0][1].lstrip("0"))
|
||||||
|
|
||||||
|
infoLabels = {}
|
||||||
|
infoLabels['episode'] = episode[0][1].lstrip("0")
|
||||||
|
infoLabels['season'] = episode[0][0]
|
||||||
|
|
||||||
|
title = str("%s - %sx%s %s" % (scrapedtitle,infoLabels['season'],infoLabels['episode'],contentlanguage)).strip()
|
||||||
|
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="findepvideos",
|
action="findepvideos",
|
||||||
contentType="tv",
|
contentType="episode",
|
||||||
title=title,
|
title=title,
|
||||||
show=title,
|
show=scrapedtitle,
|
||||||
fulltitle=scrapedtitle,
|
fulltitle=scrapedtitle,
|
||||||
url=scrapedurl,
|
url=scrapedurl,
|
||||||
extra=extra,
|
extra=extra,
|
||||||
thumbnail=scrapedthumbnail,
|
thumbnail=scrapedthumbnail,
|
||||||
|
contentLanguage=contentlanguage,
|
||||||
|
infoLabels=infoLabels,
|
||||||
folder=True))
|
folder=True))
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
@@ -162,20 +197,17 @@ def serietvaggiornate(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def categorie(item):
|
def categorie(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> categorie")
|
support.log(item.channel+" categorie")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
matches = support.match(item, r'<li>\s*<a\s*href="([^"]+)"[^>]+>([^<]+)</a></li>', r'<ul\s*class="dropdown-menu category">(.*?)</ul>', headers)[0]
|
||||||
blocco = scrapertools.find_single_match(data, r'<ul\s*class="dropdown-menu category">(.*?)</ul>')
|
|
||||||
patron = r'<li>\s*<a\s*href="([^"]+)"[^>]+>([^<]+)</a></li>'
|
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedtitle in matches:
|
for scrapedurl, scrapedtitle in matches:
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
action="lista_serie",
|
action="lista_serie",
|
||||||
title=scrapedtitle,
|
title=scrapedtitle,
|
||||||
contentType="tv",
|
contentType="tvshow",
|
||||||
url="".join([host, scrapedurl]),
|
url="".join([host, scrapedurl]),
|
||||||
thumbnail=item.thumbnail,
|
thumbnail=item.thumbnail,
|
||||||
extra="tv",
|
extra="tv",
|
||||||
@@ -188,66 +220,93 @@ def categorie(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def lista_serie(item):
|
def lista_serie(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> lista_serie")
|
support.log(item.channel+" lista_serie")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
#
|
||||||
|
# patron = r'<a\s*href="([^"]+)".*?>\s*<img\s*.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p></div>'
|
||||||
|
# blocco = scrapertools.find_single_match(data,
|
||||||
|
# r'<div\s*class="col-xs-\d+ col-sm-\d+-\d+">(.*?)<div\s*class="container-fluid whitebg" style="">')
|
||||||
|
# matches = re.compile(patron, re.DOTALL).findall(blocco)
|
||||||
|
|
||||||
|
patron_block = r'<div\s*class="col-xs-\d+ col-sm-\d+-\d+">(.*?)<div\s*class="container-fluid whitebg" style="">'
|
||||||
patron = r'<a\s*href="([^"]+)".*?>\s*<img\s*.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p></div>'
|
patron = r'<a\s*href="([^"]+)".*?>\s*<img\s*.*?src="([^"]+)" />[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)</p></div>'
|
||||||
blocco = scrapertools.find_single_match(data,
|
|
||||||
r'<div\s*class="col-xs-\d+ col-sm-\d+-\d+">(.*?)<div\s*class="container-fluid whitebg" style="">')
|
matches, data = support.match(item, patron, patron_block, headers)
|
||||||
matches = re.compile(patron, re.DOTALL).findall(blocco)
|
|
||||||
|
|
||||||
for scrapedurl, scrapedimg, scrapedtitle in matches:
|
for scrapedurl, scrapedimg, scrapedtitle in matches:
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
scrapedtitle = cleantitle(scrapedtitle)
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
if scrapedtitle not in ['DMCA','Contatti','Lista di tutte le serie tv']:
|
||||||
action="episodi",
|
itemlist.append(
|
||||||
title=scrapedtitle,
|
Item(channel=item.channel,
|
||||||
fulltitle=scrapedtitle,
|
action="episodios",
|
||||||
url=scrapedurl,
|
contentType="episode",
|
||||||
thumbnail=scrapedimg,
|
title=scrapedtitle,
|
||||||
extra=item.extra,
|
fulltitle=scrapedtitle,
|
||||||
show=scrapedtitle,
|
url=scrapedurl,
|
||||||
folder=True))
|
thumbnail=scrapedimg,
|
||||||
|
extra=item.extra,
|
||||||
|
show=scrapedtitle,
|
||||||
|
folder=True))
|
||||||
|
|
||||||
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
|
support.nextPage(itemlist,item,data,r"<link\s.*?rel='next'\shref='([^']*)'")
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
|
|
||||||
# ================================================================================================================
|
# ================================================================================================================
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def episodi(item):
|
def episodios(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> episodi")
|
support.log(item.channel+" episodios")
|
||||||
itemlist = []
|
itemlist = []
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
# data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
|
|
||||||
patron = r'<div\s*class="[^"]+">([^<]+)<\/div>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>'
|
patron = r'<div\s*class="[^"]+">\s*([^<]+)<\/div>[^>]+>[^>]+>[^>]+>[^>]+>([^<]+)?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><p[^>]+>([^<]+)<[^>]+>[^>]+>[^>]+>'
|
||||||
patron += r'[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<span\s*.*?'
|
patron += r'[^<]+[^"]+".*?serie="([^"]+)".*?stag="([0-9]*)".*?ep="([0-9]*)"\s*'
|
||||||
patron += r'embed="([^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*'
|
patron += r'.*?embed="([^"]+)"\s*.*?embed2="([^"]+)?"\s*.*?embed3="([^"]+)?"?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*'
|
||||||
patron += r'<img\s*class="[^"]+" src="" data-original="([^"]+)"[^>]+>'
|
patron += r'(?:<img\s*class="[^"]+" meta-src="([^"]+)"[^>]+>|<img\s*class="[^"]+" src="" data-original="([^"]+)"[^>]+>)?'
|
||||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
# matches = re.compile(patron, re.DOTALL).findall(data)
|
||||||
for scrapedtitle, scrapedurl, scrapedthumbnail in matches:
|
|
||||||
scrapedtitle = scrapertools.decodeHtmlentities(scrapedtitle).strip()
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
action="findvideos",
|
|
||||||
title=scrapedtitle,
|
|
||||||
fulltitle=scrapedtitle,
|
|
||||||
url=scrapedurl,
|
|
||||||
contentType="episode",
|
|
||||||
thumbnail=scrapedthumbnail,
|
|
||||||
folder=True))
|
|
||||||
|
|
||||||
if config.get_videolibrary_support() and len(itemlist) != 0:
|
# logger.debug(matches)
|
||||||
|
|
||||||
|
matches = support.match(item, patron, headers=headers)[0]
|
||||||
|
|
||||||
|
|
||||||
|
for scrapedtitle, scrapedepisodetitle, scrapedplot, scrapedserie, scrapedseason, scrapedepisode, scrapedurl, scrapedurl2,scrapedurl3,scrapedthumbnail,scrapedthumbnail2 in matches:
|
||||||
|
scrapedtitle = cleantitle(scrapedtitle)
|
||||||
|
scrapedepisode = scrapedepisode.zfill(2)
|
||||||
|
scrapedepisodetitle = cleantitle(scrapedepisodetitle)
|
||||||
|
title = str("%sx%s %s" % (scrapedseason, scrapedepisode, scrapedepisodetitle)).strip()
|
||||||
|
if 'SUB-ITA' in scrapedtitle:
|
||||||
|
title +=" Sub-ITA"
|
||||||
|
|
||||||
|
infoLabels = {}
|
||||||
|
infoLabels['season'] = scrapedseason
|
||||||
|
infoLabels['episode'] = scrapedepisode
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title="[COLOR lightblue]%s[/COLOR]" % config.get_localized_string(30161),
|
action="findvideos",
|
||||||
url=item.url,
|
title=title,
|
||||||
action="add_serie_to_library",
|
fulltitle=scrapedtitle,
|
||||||
extra="episodi",
|
url=scrapedurl+"\r\n"+scrapedurl2+"\r\n"+scrapedurl3,
|
||||||
show=item.show))
|
contentType="episode",
|
||||||
|
plot=scrapedplot,
|
||||||
|
contentSerieName=scrapedserie,
|
||||||
|
contentLanguage='Sub-ITA' if 'Sub-ITA' in title else '',
|
||||||
|
infoLabels=infoLabels,
|
||||||
|
thumbnail=scrapedthumbnail2 if scrapedthumbnail2 != '' else scrapedthumbnail,
|
||||||
|
folder=True))
|
||||||
|
|
||||||
|
tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||||
|
|
||||||
|
support.videolibrary(itemlist, item)
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -256,20 +315,12 @@ def episodi(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def findepvideos(item):
|
def findepvideos(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> findepvideos")
|
support.log(item.channel+" findepvideos")
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url, headers=headers).data
|
data = httptools.downloadpage(item.url, headers=headers).data
|
||||||
data = scrapertools.find_single_match(data, item.extra)
|
matches = scrapertools.find_multiple_matches(data, item.extra)
|
||||||
itemlist = servertools.find_video_items(data=data)
|
data = "\r\n".join(matches[0])
|
||||||
|
item.contentType = 'movie'
|
||||||
for videoitem in itemlist:
|
itemlist = support.server(item, data=data)
|
||||||
server = re.sub(r'[-\[\]\s]+', '', videoitem.title).capitalize()
|
|
||||||
videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
|
|
||||||
videoitem.fulltitle = item.fulltitle
|
|
||||||
videoitem.thumbnail = item.thumbnail
|
|
||||||
videoitem.show = item.show
|
|
||||||
videoitem.plot = item.plot
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
@@ -278,17 +329,8 @@ def findepvideos(item):
|
|||||||
|
|
||||||
# ----------------------------------------------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------------------------------------------
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
logger.info("[GuardaSerieClick.py]==> findvideos")
|
support.log(item.channel+" findvideos")
|
||||||
|
logger.debug(item.url)
|
||||||
itemlist = servertools.find_video_items(data=item.url)
|
itemlist = support.server(item, data=item.url)
|
||||||
|
|
||||||
for videoitem in itemlist:
|
|
||||||
server = re.sub(r'[-\[\]\s]+', '', videoitem.title).capitalize()
|
|
||||||
videoitem.title = "".join(["[%s] " % support.color(server.capitalize(), 'orange'), item.title])
|
|
||||||
videoitem.fulltitle = item.fulltitle
|
|
||||||
videoitem.thumbnail = item.thumbnail
|
|
||||||
videoitem.show = item.show
|
|
||||||
videoitem.plot = item.plot
|
|
||||||
videoitem.channel = item.channel
|
|
||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|||||||
+5
-1
@@ -383,7 +383,11 @@ def thumb(itemlist=[]):
|
|||||||
item.thumbnail = get_thumb(thumb + '.png')
|
item.thumbnail = get_thumb(thumb + '.png')
|
||||||
else:
|
else:
|
||||||
thumb = item.thumbnails
|
thumb = item.thumbnails
|
||||||
# REmove args from title
|
|
||||||
|
if item.thumbnail != '':
|
||||||
|
break
|
||||||
|
|
||||||
|
# Remove args from title
|
||||||
if item.args: item.title = item.title.replace(' || ' + str(item.args), '')
|
if item.args: item.title = item.title.replace(' || ' + str(item.args), '')
|
||||||
return itemlist
|
return itemlist
|
||||||
else:
|
else:
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.7 KiB |
Reference in New Issue
Block a user