diff --git a/channels/animealtadefinizione.json b/channels/animealtadefinizione.json index 80bf5a4c..ce0c0876 100644 --- a/channels/animealtadefinizione.json +++ b/channels/animealtadefinizione.json @@ -6,7 +6,7 @@ "thumbnail": "animealtadefinizione.png", "banner": "animealtadefinizione.png", "categories": ["anime", "sub-ita"], - "not_active": ["include_in_newest"], + "default_off": ["include_in_newest"], "settings": [ { "id": "perpage", diff --git a/channels/animealtadefinizione.py b/channels/animealtadefinizione.py index f3bd68c2..df9c3229 100644 --- a/channels/animealtadefinizione.py +++ b/channels/animealtadefinizione.py @@ -18,7 +18,8 @@ def mainlist(item): anime=['/anime/', ('Tipo',['', 'menu', 'Anime']), ('Anno',['', 'menu', 'Anno']), - ('Genere', ['', 'menu','Genere'])] + ('Genere', ['', 'menu','Genere']), + ('Ultimi Episodi',['', 'peliculas', 'last'])] return locals() @@ -43,11 +44,30 @@ def search(item, texto): return [] +def newest(categoria): + support.log(categoria) + item = support.Item() + try: + if categoria == "anime": + item.url = host + item.args = "last" + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.logger.error("{0}".format(line)) + return [] + + @support.scrape def peliculas(item): if '/movie/' in item.url: item.contentType = 'movie' action='findvideos' + elif item.args == 'last': + item.contentType = 'episode' + action='findvideos' else: item.contentType = 'tvshow' action='episodios' @@ -76,8 +96,6 @@ def peliculas(item): return locals() - - @support.scrape def episodios(item): pagination = int(perpage) diff --git a/channels/animeuniverse.json b/channels/animeuniverse.json index 34f11412..0fa509cc 100644 --- a/channels/animeuniverse.json +++ b/channels/animeuniverse.json @@ -6,7 +6,7 @@ "thumbnail": "animeuniverse.png", "banner": "animeuniverse.png", "categories": ["anime", "sub-ita"], - "not_active": ["include_in_newest"], + "default_off": ["include_in_newest"], "settings": [ { "id": "perpage", diff --git a/channels/animeuniverse.py b/channels/animeuniverse.py index b170a7c4..8a496698 100644 --- a/channels/animeuniverse.py +++ b/channels/animeuniverse.py @@ -19,6 +19,7 @@ def mainlist(item): ('Tipo',['', 'menu', 'Anime']), ('Anno',['', 'menu', 'Anno']), ('Genere', ['', 'menu','Genere']), + ('Ultimi Episodi',['/2/', 'peliculas', 'last']), ('Hentai', ['/hentai/', 'peliculas'])] return locals() @@ -44,28 +45,50 @@ def search(item, texto): return [] +def newest(categoria): + support.log(categoria) + item = support.Item() + try: + if categoria == "anime": + item.url = host + item.args = "last" + return peliculas(item) + # Continua la ricerca in caso di errore + except: + import sys + for line in sys.exc_info(): + support.logger.error("{0}".format(line)) + return [] + + @support.scrape def peliculas(item): if '/mos/' in item.url: item.contentType = 'movie' action='findvideos' + elif item.args == 'last': + query='cat%5D=1¤tquery%5Bcategory__not_in%5D%5B' + searchtext='' + item.contentType = 'episode' + action='findvideos' else: item.contentType = 'tvshow' action='episodios' if item.search: query = 's' searchtext = item.search - else: + if not query: query='category_name' - searchtext = item.url.split('/')[-2] + searchtext = item.url.split('/')[-2] if item.url != host else '' if not item.pag: item.pag = 1 anime=True + blacklist=['Altri Hentai'] data = support.match(host + '/wp-content/themes/animeuniverse/functions/ajax.php', post='sorter=recent&location=&loop=main+loop&action=sort&numarticles='+perpage+'&paginated='+str(item.pag)+'¤tquery%5B'+query+'%5D='+searchtext+'&thumbnail=1').data.replace('\\','') - patron=r'[^"]+)">