Animeforce Fix

This commit is contained in:
Alhaziel
2019-10-16 19:56:29 +02:00
parent f50e460e33
commit 11101190ad
3 changed files with 16 additions and 6 deletions
+13 -4
View File
@@ -24,7 +24,6 @@ headers = [['Referer', host]]
def mainlist(item):
anime = ['/lista-anime/',
('In Corso',['/lista-anime-in-corso/']),
('Ultimei Aggiornamenti',['','peliculas','newest']),
('Ultime Serie',['/category/anime/articoli-principali/','peliculas','last'])
]
return locals()
@@ -61,16 +60,26 @@ def search(item, texto):
@support.scrape
def peliculas(item):
anime = True
action = 'episodios'
if item.args == 'newest':
patron = r'src="(?P<thumb>[^"]+)" class="attachment-grid-post[^"]+" alt="[^"]*" title="(?P<title>.*?) Episodi[^"]+".*?<h2><a href="(?P<url>[^"]+)"'
patron = r'src="(?P<thumb>[^"]+)" class="attachment-grid-post[^"]+" alt="[^"]*" title="(?P<title>[^"]+").*?<h2><a href="(?P<url>[^"]+)"'
def itemHook(item):
item.url = support.match(item, '<a href="([^"]+)" class="btn', headers=headers)[0][0]
delete = support.scrapertoolsV2.find_single_match(item.fulltitle, r'( Episodi.*)')
number = support.scrapertoolsV2.find_single_match(item.title, r'Episodi(?:o)? (?:\d+÷)?(\d+)')
item.title = support.typo(number + ' - ','bold') + item.title.replace(delete,'')
item.fulltitle = item.show = item.title.replace(delete,'')
item.number = number
return item
action = 'findvideos'
elif item.args == 'last':
patron = r'src="(?P<thumb>[^"]+)" class="attachment-grid-post[^"]+" alt="[^"]*" title="(?P<title>.*?)(?: Sub| sub| SUB|").*?<h2><a href="(?P<url>[^"]+)"'
else:
pagination = ''
patron = '<strong><a href="(?P<url>[^"]+)">(?P<title>.*?) [Ss][Uu][Bb]'
action = 'episodios'
patron = r'<strong><a href="(?P<url>[^"]+)">(?P<title>.*?) [Ss][Uu][Bb]'
return locals()
+2 -1
View File
@@ -223,7 +223,7 @@ def scrapeBlock(item, args, block, patron, headers, action, pagination, debug, t
if stagione:
episode = season +'x'+ scraped['episode']
elif item.contentType == 'tvshow' and (scraped['episode'] == '' and season == ''):
item.args = 'season_completed'
item.news = 'season_completed'
episode = ''
else:
episode = re.sub(r'\s-\s|-|x|&#8211|&#215;', 'x', scraped['episode']) if scraped['episode'] else ''
@@ -768,6 +768,7 @@ def match(item, patron='', patronBlock='', headers='', url='', post=''):
if patron:
matches = scrapertoolsV2.find_multiple_matches(block, patron)
if not matches: matches = ['']
log('MATCHES= ',matches)
return matches, block
+1 -1
View File
@@ -434,7 +434,7 @@ def get_title(item):
if item.quality:
title += support.typo(item.quality, '_ [] color kod')
season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.args) else ''
season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.news) else ''
if season_:
title += season_
return title