This commit is contained in:
marco
2020-06-14 19:55:39 +02:00
parent 6617f1665f
commit 32b9b39b29
6 changed files with 15 additions and 24 deletions

View File

@@ -26,9 +26,10 @@ def mainlist(item):
@support.scrape
def search(item, texto):
search = texto
# debug = True
item.contentType = 'tvshow'
anime = True
patron = r'<a href="(?P<url>[^"]+)"[^>]+> <span>(?P<title>[^<\(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-Za-z-]+)\))?'
patron = r'href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</a>.*?<p[^>]+>(?P<plot>[^<]+).*?<img src="(?P<thumbnail>[^"]+)'
action = 'check'
return locals()
@@ -62,6 +63,7 @@ def menu(item):
@support.scrape
def peliculas(item):
anime = True
# debug = True
deflang= 'Sub-ITA'
action = 'check'
@@ -97,7 +99,7 @@ def peliculas(item):
if item.args == 'incorso':
patron = r'<a href="(?P<url>[^"]+)"[^>]+>(?P<title>[^<(]+)(?:\s*\((?P<year>\d+)\))?(?:\s*\((?P<lang>[A-za-z-]+)\))?</a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*<img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)"[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<plot>[^<]+)<'
else:
patron = r'href="(?P<url>[^"]+)"[^>]+>[^>]+>(?P<title>.+?)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</span>'
patron = r'href="(?P<url>[^"]+)"[^>]*>(?P<title>[^<]+)(?:\((?P<lang>ITA)\))?(?:(?P<year>\((\d+)\)))?</a>.*?<p[^>]+>(?P<plot>[^<]+).*?<img src="(?P<thumbnail>[^"]+)'
return locals()

View File

@@ -3,7 +3,7 @@
# Canale per animeworld
# ----------------------------------------------------------
from core import support, jsontools
from core import support, jsontools
host = support.config.get_channel_url()
headers = [['Referer', host]]
@@ -11,9 +11,6 @@ headers = [['Referer', host]]
__channel__ = 'animeworld'
def order():
# Seleziona l'ordinamento dei risultati
return str(support.config.get_setting("order", __channel__))
@@ -35,6 +32,7 @@ def genres(item):
action = 'peliculas'
patronBlock = r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> Generi <span.[^>]+>(?P<block>.*?)</ul>'
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>'
def itemHook(item):
item.url = host + '/filter?' + item.name + '=' + item.value + '&sort='
return item
@@ -45,7 +43,8 @@ def genres(item):
def menu(item):
action = 'submenu'
patronBlock=r'<form class="filters.*?>(?P<block>.*?)</form>'
patronMenu=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (?P<title>.*?) <span.[^>]+>(?P<url>.*?)</ul>'
patronMenu=r'<button class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown"> (?P<title>.*?) <span.[^>]+>(?P<other>.*?)</ul>'
def itemlistHook(itemlist):
item.title = support.typo('Tutti','bold')
item.action = 'peliculas'
@@ -57,7 +56,7 @@ def menu(item):
@support.scrape
def submenu(item):
action = 'peliculas'
data = item.url
data = item.other
patronMenu = r'<input.*?name="(?P<name>[^"]+)" value="(?P<value>[^"]+)"\s*>[^>]+>(?P<title>[^<]+)<\/label>'
def itemHook(item):
item.url = host + '/filter?' + item.name + '=' + item.value + '&language[]=' + item.args + '&sort='

View File

@@ -15,15 +15,9 @@ def findhost():
host = support.config.get_channel_url(findhost)
headers = [['Referer', host]]
@support.menu
def mainlist(item):
support.log()
tvshow = []
anime = ['/category/anime-cartoni-animati/']
mix = [('Aggiornamenti {bullet bold} {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']),
@@ -37,7 +31,7 @@ def mainlist(item):
def peliculas(item):
action = 'episodios'
if item.args == 'newest':
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?)[^–â][\s]*<a href="(?P<url>[^"]+)"[^>]*> ?(?P<episode>\d+x\d+-\d+|\d+x\d+) .*?[ ]?\(?(?P<lang>SUB ITA)?\)?</a>'
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>[^<]+)\s*<a href="(?P<url>[^"]+)"[^>]*>\s?(?P<episode>\d+[×x]\d+-\d+|\d+[×x]\d+) (?P<title2>[^<]+)\s?\(?(?P<lang>SUB ITA)?\)?</a>'
pagination = ''
else:
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
@@ -55,7 +49,7 @@ def episodios(item):
def itemHook(item):
if not item.url:
item.url =''
item.url = ''
return item
return locals()

View File

@@ -7,16 +7,12 @@
import re
from core import scrapertools, httptools, support
from core import support
from core.support import log
from core.item import Item
from platformcode import config
host = config.get_channel_url()
headers = [['Referer', host]]
@support.menu

View File

@@ -88,7 +88,7 @@ def peliculas(item):
pagination = 25
if item.args == 'lista':
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)[ ]?(?P<year>\d+)?(?: Streaming | MD iSTANCE )?<'
patron = r'href="(?P<url>[^"]+)"[^>]+>(?P<title>.*?)(?P<year>\d{4})?<'
patronBlock = r'Lista dei film disponibili in streaming e anche in download\.</p>(?P<block>.*?)<div class="footer_c">'
else:
patron = r'<tr><td><a href="(?P<url>[^"]+)"(?:|.+?)?>(?:&nbsp;&nbsp;)?[ ]?(?P<title>.*?)[ ]?(?P<quality>HD)?[ ]?(?P<year>\d+)?(?: | HD | Streaming | MD(?: iSTANCE)? )?</a>'

View File

@@ -58,13 +58,13 @@ def peliculas(item):
# support.regexDbg(item, patron, headers)
else:
patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">'
patron = r'<div class="mediaWrap mediaWrapAlt">\s?<a href="(?P<url>[^"]+)"(?:[^>]+>|)>?\s?<img[^s]+src="([^"]+)"[^>]+>\s?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]<lang>[sSuUbB\-iItTaA]+)?(?:[ ]?\((?P<year>\d+)[\-\d+]+)\).[^<]+[^>]+><\/a>.+?<p>\s*(?P<quality>[a-zA-Z-0-9\.]+)\s*<\/p>[^>]+>'
patron = r'<div class="mediaWrap mediaWrapAlt">\s?<a href="(?P<url>[^"]+)"(?:[^>]+>|)>?\s?<img[^s]+src="([^"]+)"[^>]+>\s?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>.+?)(?:[ ]<lang>[sSuUbB\-iItTaA]+)?(?:[ ]?\((?P<year>\d{4}))\).[^<]+[^>]+><\/a>.+?<p>\s*(?P<quality>[a-zA-Z-0-9\.]+)\s*<\/p>[^>]+>'
patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->'
# if item.args != 'all' and item.args != 'search':
# action = 'findvideos' if item.extra == 'movie' else 'episodios'
# item.contentType = 'movie' if item.extra == 'movie' else 'tvshow'
#debug = True
# debug = True
return locals()