Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"id": "animealtadefinizione",
|
||||
"name": "AnimealtAdefinizione",
|
||||
"active": true,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "animealtadefinizione.png",
|
||||
"banner": "animealtadefinizione.png",
|
||||
"categories": ["anime", "sub-ita"],
|
||||
"default_off": ["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"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
# -*- 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'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
anime=['/anime/',
|
||||
('Tipo',['', 'menu', 'Anime']),
|
||||
('Anno',['', 'menu', 'Anno']),
|
||||
('Genere', ['', 'menu','Genere']),
|
||||
('Ultimi Episodi',['', 'peliculas', 'last'])]
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def menu(item):
|
||||
action = 'peliculas'
|
||||
data = support.match(item, patron= r'<a href="' + host + r'/category/' + item.args.lower() + r'/">' + item.args + r'</a><ul class="sub-menu">(.*?)</ul>').match
|
||||
patronMenu = r'<a href="(?P<url>[^"]+)">(?P<title>[^<]+)<'
|
||||
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 []
|
||||
|
||||
|
||||
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'
|
||||
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'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s+(?P<type>Movie)?\s*(?P<lang>Sub Ita|Ita)'
|
||||
|
||||
typeContentDict = {'movie':['movie']}
|
||||
typeActionDict = {'findvideos':['movie']}
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
if item.search:
|
||||
itemlist = [ it for it in itemlist if ' Episodio ' not in it.title ]
|
||||
if len(itemlist) == int(perpage):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='peliculas'))
|
||||
return itemlist
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
pagination = int(perpage)
|
||||
patron = epPatron
|
||||
return locals()
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
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
|
||||
@@ -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",
|
||||
|
||||
@@ -10,6 +10,7 @@ headers = {}
|
||||
|
||||
perpage_list = ['20','30','40','50','60','70','80','90','100']
|
||||
perpage = perpage_list[support.config.get_setting('perpage' , 'animeuniverse')]
|
||||
epPatron = r'<td>\s*(?P<title>[^<]+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
|
||||
|
||||
@support.menu
|
||||
@@ -18,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()
|
||||
|
||||
@@ -43,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'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>[^\["]+)\s+(?P<lang>(?:[Ss][Uu][Bb].)?[Ii][Tt][Aa])'
|
||||
patron=r'<a href="(?P<url>[^"]+)"><img width="[^"]+" height="[^"]+" src="(?P<thumb>[^"]+)" class="[^"]+" alt="" title="(?P<title>.*?)\s*(?P<lang>Sub ITA|ITA)?(?:"| \[)'
|
||||
|
||||
def ItemItemlistHook(item, itemlist):
|
||||
if len(itemlist) == int(perpage):
|
||||
if len(itemlist) == int(perpage) - len(blacklist):
|
||||
item.pag += 1
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), action='peliculas'))
|
||||
return itemlist
|
||||
@@ -76,12 +100,27 @@ def peliculas(item):
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
pagination = int(perpage)
|
||||
patron = r'<td>\s*(?P<title>[A-Za-z]+ \d+)[^>]+>[^>]+>\s*<a href="(?P<url>[^"]+)"'
|
||||
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
|
||||
|
||||
@@ -23,8 +23,8 @@ def get_data(item, head=[]):
|
||||
for h in head:
|
||||
headers[h[0]] = h[1]
|
||||
if not item.count: item.count = 0
|
||||
jstr, location = support.match(item, patron=r'<script>(.*?location.href="([^"]+)";)</').match
|
||||
item.url=location.replace('http://','https://')
|
||||
jstr, location = support.match(item, patron=r'<script>(.*?location.href=".*?(http[^"]+)";)</').match
|
||||
item.url=support.re.sub(r':\d+', '', location).replace('http://','https://')
|
||||
if not config.get_setting('key', item.channel) and jstr:
|
||||
jshe = 'var document = {}, location = {}'
|
||||
aesjs = str(support.match(host + '/aes.min.js').data)
|
||||
@@ -38,7 +38,7 @@ def get_data(item, head=[]):
|
||||
|
||||
# set cookie
|
||||
headers['cookie'] = config.get_setting('key', item.channel)
|
||||
res = support.match(item, headers=headers, patron=r';\s*location.href="([^"]+)"')
|
||||
res = support.match(item, headers=headers, patron=r';\s*location.href=".*?(http[^"]+)"')
|
||||
if res.match:
|
||||
item.url= res.match.replace('http://','https://')
|
||||
data = support.match(item, headers=headers).data
|
||||
@@ -70,8 +70,8 @@ def mainlist(item):
|
||||
def genres(item):
|
||||
action = 'peliculas'
|
||||
data = get_data(item)
|
||||
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>'
|
||||
patronBlock = r'dropdown[^>]*>\s*Generi\s*<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='
|
||||
@@ -149,7 +149,7 @@ def peliculas(item):
|
||||
action='episodios'
|
||||
|
||||
# Controlla la lingua se assente
|
||||
patronNext=r'href="([^"]+)" rel="next"'
|
||||
patronNext=r'</span></a><a href="([^"]+)"'
|
||||
typeContentDict={'movie':['movie', 'special']}
|
||||
typeActionDict={'findvideos':['movie', 'special']}
|
||||
def itemHook(item):
|
||||
|
||||
@@ -245,7 +245,7 @@ def run(item=None):
|
||||
# Special action for searching, first asks for the words then call the "search" function
|
||||
elif item.action == "search":
|
||||
# from core.support import dbg;dbg()
|
||||
if filetools.isfile(temp_search_file):
|
||||
if filetools.isfile(temp_search_file) and config.get_setting('videolibrary_kodi'):
|
||||
itemlist = []
|
||||
f = filetools.read(temp_search_file)
|
||||
strList = f.split(',')
|
||||
@@ -356,7 +356,7 @@ def new_search(item, channel=None):
|
||||
return itemlist
|
||||
|
||||
def set_search_temp(item):
|
||||
if filetools.isfile(temp_search_file):
|
||||
if filetools.isfile(temp_search_file) and config.get_setting('videolibrary_kodi'):
|
||||
f = '[V],' + filetools.read(temp_search_file)
|
||||
filetools.write(temp_search_file, f)
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
global data
|
||||
|
||||
post = urllib.urlencode({k: v for k, v in scrapertools.find_multiple_matches(data, "name='([^']+)' value='([^']*)'")})
|
||||
time.sleep(2.1)
|
||||
time.sleep(2.5)
|
||||
data = httptools.downloadpage(page_url, post=post).data
|
||||
|
||||
videos_packed = scrapertools.find_single_match(data, r"</div>\s*<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||
|
||||
+4
-7
@@ -29,18 +29,15 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "perfil",
|
||||
"id": "order",
|
||||
"type": "list",
|
||||
"label": "@60666",
|
||||
"label": "Ordinamento",
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"visible": true,
|
||||
"lvalues": [
|
||||
"@60667",
|
||||
"@60668",
|
||||
"@60669",
|
||||
"@60670",
|
||||
"@60671"
|
||||
"Default",
|
||||
"Alfabetico"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
+3
-2
@@ -453,8 +453,9 @@ def no_group(list_result_canal):
|
||||
# i.text_color = color3
|
||||
|
||||
itemlist.append(i.clone())
|
||||
|
||||
return sorted(itemlist, key=lambda it: it.title.lower())
|
||||
if config.get_setting('order','news') == 1:
|
||||
itemlist = sorted(itemlist, key=lambda it: it.title.lower())
|
||||
return itemlist
|
||||
|
||||
|
||||
def group_by_channel(list_result_canal):
|
||||
|
||||
+3
-6
@@ -201,8 +201,7 @@ def channel_search(item):
|
||||
searching_titles += channel_titles
|
||||
cnt = 0
|
||||
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list),
|
||||
', '.join(searching_titles))
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(70744) % len(channel_list), ', '.join(searching_titles))
|
||||
config.set_setting('tmdb_active', False)
|
||||
|
||||
search_action_list = []
|
||||
@@ -250,14 +249,12 @@ def channel_search(item):
|
||||
cnt += 1
|
||||
searching_titles.remove(searching_titles[searching.index(channel)])
|
||||
searching.remove(channel)
|
||||
progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt),
|
||||
', '.join(searching_titles))
|
||||
progress.update(old_div(((total_search_actions - len(search_action_list)) * 100), total_search_actions), config.get_localized_string(70744) % str(len(channel_list) - cnt), ', '.join(searching_titles))
|
||||
|
||||
progress.close()
|
||||
|
||||
cnt = 0
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295),
|
||||
config.get_localized_string(60293))
|
||||
progress = platformtools.dialog_progress(config.get_localized_string(30993) % item.title, config.get_localized_string(60295), config.get_localized_string(60293))
|
||||
|
||||
config.set_setting('tmdb_active', True)
|
||||
# res_count = 0
|
||||
|
||||
Reference in New Issue
Block a user