diff --git a/channels.json b/channels.json
index 6d8b6ae5..08362f96 100644
--- a/channels.json
+++ b/channels.json
@@ -2,6 +2,7 @@
"altadefinizione01": "https://www.altadefinizione01.photo",
"altadefinizione01_link": "https://altadefinizione01.wine",
"altadefinizioneclick": "https://altadefinizione.group",
+ "animealtadefinizione": "https://www.animealtadefinizione.it",
"animeforce": "https://ww1.animeforce.org",
"animeleggendari": "https://animeora.com",
"animesaturn": "https://www.animesaturn.com",
diff --git a/channels/animealtadefinizione.json b/channels/animealtadefinizione.json
new file mode 100644
index 00000000..80bf5a4c
--- /dev/null
+++ b/channels/animealtadefinizione.json
@@ -0,0 +1,21 @@
+{
+ "id": "animealtadefinizione",
+ "name": "AnimealtAdefinizione",
+ "active": true,
+ "language": ["ita", "sub-ita"],
+ "thumbnail": "animealtadefinizione.png",
+ "banner": "animealtadefinizione.png",
+ "categories": ["anime", "sub-ita"],
+ "not_active": ["include_in_newest"],
+ "settings": [
+ {
+ "id": "perpage",
+ "type": "list",
+ "label": "Elementi per pagina",
+ "default": 3,
+ "enabled": true,
+ "visible": true,
+ "lvalues": ["20","30","40","50","60","70","80","90","100"]
+ }
+ ]
+}
diff --git a/channels/animealtadefinizione.py b/channels/animealtadefinizione.py
new file mode 100644
index 00000000..f3bd68c2
--- /dev/null
+++ b/channels/animealtadefinizione.py
@@ -0,0 +1,107 @@
+# -*- coding: utf-8 -*-
+# ------------------------------------------------------------
+# Canale per animealtadefinizione
+# ----------------------------------------------------------
+
+from core import support
+
+host = support.config.get_channel_url()
+headers = [['Referer', host]]
+
+perpage_list = ['20','30','40','50','60','70','80','90','100']
+perpage = perpage_list[support.config.get_setting('perpage' , 'animealtadefinizione')]
+epPatron = r'
\s*(?P[^<]+)[^>]+>[^>]+>\s*' + item.args + r'').match
+ patronMenu = r'(?P[^<]+)<'
+ return locals()
+
+
+def search(item, texto):
+ support.log(texto)
+ item.search = texto
+ try:
+ return peliculas(item)
+ # Continua la ricerca in caso di errore
+ except:
+ import sys
+ for line in sys.exc_info():
+ support.logger.error("%s" % line)
+ return []
+
+
+@support.scrape
+def peliculas(item):
+ if '/movie/' in item.url:
+ item.contentType = 'movie'
+ action='findvideos'
+ else:
+ item.contentType = 'tvshow'
+ action='episodios'
+ if item.search:
+ query = 's'
+ searchtext = item.search
+ else:
+ query='category_name'
+ searchtext = item.url.split('/')[-2]
+ if not item.pag: item.pag = 1
+
+ anime=True
+ data = support.match(host + '/wp-admin/admin-ajax.php', post='action=itajax-sort&loop=main+loop&location=&thumbnail=1&rating=1sorter=recent&columns=4&numarticles='+perpage+'&paginated='+str(item.pag)+'¤tquery%5B'+query+'%5D='+searchtext).data.replace('\\','')
+ patron=r' [^"]+)"'
@support.menu
@@ -61,7 +62,7 @@ def peliculas(item):
anime=True
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' (?:[Ss][Uu][Bb].)?[Ii][Tt][Aa])'
+ patron=r' [^"]+)"'
+ patron = epPatron
return locals()
def findvideos(item):
- url = support.match(support.httptools.downloadpage(item.url).url, string=True, patron=r'file=([^$]+)').match
- if 'http' not in url: url = 'http://' + url
- itemlist=[item.clone(title='Diretto', url=url, server='directo', action='play')]
+ itemlist = []
+ if item.contentType == 'movie':
+ matches = support.match(item, patron=epPatron).matches
+ for title, url in matches:
+ get_video_list(url, title, itemlist)
+ else:
+ get_video_list(item.url, 'Diretto', itemlist)
return support.server(item, itemlist=itemlist)
+
+
+def get_video_list(url, title, itemlist):
+ from requests import get
+ if not url.startswith('http'): url = host + url
+
+ url = support.match(get(url).url, string=True, patron=r'file=([^$]+)').match
+ if 'http' not in url: url = 'http://' + url
+ itemlist.append(support.Item(title=title, url=url, server='directo', action='play'))
+
+ return itemlist
|