diff --git a/channels/animeforce.py b/channels/animeforce.py index 7db72c30..8963c28d 100644 --- a/channels/animeforce.py +++ b/channels/animeforce.py @@ -11,11 +11,9 @@ host = support.config.get_channel_url(__channel__) IDIOMAS = {'Italiano': 'IT'} list_language = IDIOMAS.values() -list_servers = ['directo', 'openload'] +list_servers = ['directo', 'openload', 'vvvvid'] list_quality = ['default'] -checklinks = support.config.get_setting('checklinks', __channel__) -checklinks_number = support.config.get_setting('checklinks_number', __channel__) headers = [['Referer', host]] @@ -38,7 +36,7 @@ def newest(categoria): item.contentType = 'tvshow' item.url = host item.args = 'newest' - itemlist = peliculas(item) + return peliculas(item) # Continua la ricerca in caso di errore except: import sys @@ -65,15 +63,6 @@ def peliculas(item): if item.args == 'newest': patron = r'\s*(?P<title>.*?)(?: Sub| sub| SUB|[^"]+)">(?P.*?) [Ss][Uu][Bb]' else: + pagination = '' patron = r'<a href="(?P<url>[^"]+)">\s*<strong[^>]+>(?P<title>[^<]+)<' + def itemHook(item): + if 'sub-ita' in item.url: + if item.args != 'newest': item.title = item.title + support.typo('Sub-ITA','_ [] color kod') + item.contentLanguage = 'Sub-ITA' + if item.args == 'newest': + url = support.match(item, '<a href="([^"]+)" title="[^"]+" target="[^"]+" class="btn', headers=headers)[0] + item.url = url[0] if url else '' + delete = support.scrapertoolsV2.find_single_match(item.fulltitle, r'( Episodi.*)') + episode = support.scrapertoolsV2.find_single_match(item.title, r'Episodi(?:o)? (?:\d+÷)?(\d+)') + item.title = support.typo(episode + ' - ','bold') + item.title.replace(delete,'') + item.fulltitle = item.show = item.title.replace(delete,'') + item.episode = episode + return item + return locals() @@ -104,12 +108,16 @@ def findvideos(item): itemlist = [] - if item.number: + if item.episode: from lib import unshortenit url, c = unshortenit.unshorten(item.url) - url = support.match(item, r'<a href="([^"]+)"[^>]*>', patronBlock=r'Episodio %s(.*?)</tr>' % item.number ,url=url)[0] + url = support.match(item, r'<a href="([^"]+)"[^>]*>', patronBlock=r'Episodio %s(.*?)</tr>' % item.episode ,url=url)[0] item.url = url[0] if url else '' + if 'vvvvid' in item.url: + item.action = 'play' + itemlist.append(item) + if 'http' not in item.url: if '//' in item.url[:2]: item.url = 'http:' + item.url @@ -126,11 +134,9 @@ def findvideos(item): for video in matches: itemlist.append( support.Item(channel=item.channel, - action="play", - title='diretto', - url=video, - server='directo')) + action="play", + title='diretto', + url=video, + server='directo')) - support.server(item, itemlist=itemlist) - - return itemlist + return support.server(item, itemlist=itemlist) diff --git a/servers/vvvvid.py b/servers/vvvvid.py index e66412a3..36e7d305 100644 --- a/servers/vvvvid.py +++ b/servers/vvvvid.py @@ -22,6 +22,11 @@ def test_video_exists(page_url): data = httptools.downloadpage(page_url).data if "Not Found" in data or "File was deleted" in data: return False, "[VVVVID] The file does not exist or has been deleted" + else: + page_url = page_url.replace("/show/","/#!show/") + show_id = re.findall("#!show/([0-9]+)/", page_url)[0] + name = re.findall(show_id + "/(.+?)/", page_url) + if not name: return False, "[VVVVID] The file does not exist or has been deleted" return True, "" diff --git a/specials/news.py b/specials/news.py index 0099ef87..10f7b68f 100644 --- a/specials/news.py +++ b/specials/news.py @@ -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.news) else '' + season_ = support.typo(config.get_localized_string(70736), '_ [] color white bold') if (type(item.args) != bool and 'season_completed' in item.news and not item.episode) else '' if season_: title += season_ return title