KoD 1.7
- Aggiunto menu globale opzioni di KoD\n- Aggiunto canale tapmovie e server annessi\n- Notifica quando il tipo di vista viene salvata (con indicazione del tipo di contenuto)\n\n
This commit is contained in:
@@ -20,6 +20,7 @@ def get_cookie(data):
|
||||
|
||||
|
||||
def get_data(item):
|
||||
# support.dbg()
|
||||
url = httptools.downloadpage(item.url, headers=headers, follow_redirects=True, only_headers=True).url
|
||||
data = support.match(url, headers=headers, follow_redirects=True).data
|
||||
if 'AWCookieVerify' in data:
|
||||
|
||||
@@ -29,6 +29,7 @@ def mainlist(item):
|
||||
def menu(item):
|
||||
item.contentType = ''
|
||||
action = 'peliculas'
|
||||
|
||||
|
||||
patronBlock = r'<div class="filter-header"><b>%s</b>(?P<block>.*?)<div class="filter-box">' % item.args
|
||||
patronMenu = r'<a class="[^"]+" data-state="[^"]+" (?P<other>[^>]+)>[^>]+></i>[^>]+></i>[^>]+></i>(?P<title>[^>]+)</a>'
|
||||
@@ -89,7 +90,7 @@ def peliculas(item):
|
||||
patronBlock = r'<div id="%s"[^>]+>(?P<block>.*?)<div class="vistaDettagliata"' % item.args[1]
|
||||
patron = r'<li>\s*<a href="(?P<url>[^"]+)" title="(?P<title>[^"]+)" class="thumb">[^>]+>[^>]+>[^>]+>\s*[EePp]+\s*(?P<episode>\d+)[^>]+>\s<img src="(?P<thumb>[^"]+)"'
|
||||
else:
|
||||
patron = r'<div class="showStreaming"> +<b>(?P<title>[^<]+)[^>]+>[^>]+>\s*<span>Lingua:\s*(?P<lang>[^>]+)?>[<>br\s]+a href="(?P<url>[^"]+)"[^>]+>.*?--image-url:url\(/*(?P<thumb>[^\)]+).*?Anno di inizio</b>:\s*(?P<year>[0-9]{4})'
|
||||
patron = r'<div class="showStreaming">\s*<b>(?P<title>[^<]+)[^>]+>[^>]+>\s*<span>Lingua:\s*(?:DUB|JAP)?\s*(?P<lang>(?:SUB )?ITA)[^>]+>[<>br\s]+a href="(?P<url>[^"]+)"[^>]+>.*?--image-url:url\(/*(?P<thumb>[^\)]+).*?Anno di inizio</b>:\s*(?P<year>[0-9]{4})'
|
||||
patronNext = '<li class="currentPage">[^>]+><li[^<]+<a href="([^"]+)">'
|
||||
|
||||
def itemHook(item):
|
||||
@@ -128,7 +129,6 @@ def findvideos(item):
|
||||
if 'vvvvid' in matches.data:
|
||||
itemlist.append(item.clone(action="play", title='VVVVID', url=support.match(matches.data, patron=r'(http://www.vvvvid[^"]+)').match, server='vvvvid'))
|
||||
else:
|
||||
# matches.matches.sort()
|
||||
support.info('VIDEO')
|
||||
for url in matches.matches:
|
||||
lang = url.split('/')[-2]
|
||||
@@ -139,8 +139,6 @@ def findvideos(item):
|
||||
quality = url.split('/')[-1].split('?')[0]
|
||||
url += '|User-Agent=' + support.httptools.get_user_agent() + '&Referer=' + url
|
||||
|
||||
itemlist.append(item.clone(action="play", title=language, url=url, contentLanguage = language, quality = quality, order = quality.replace('p','').zfill(4), server='directo',))
|
||||
|
||||
itemlist.sort(key=lambda x: (x.title, x.order), reverse=False)
|
||||
itemlist.append(item.clone(action="play", title='', url=url, contentLanguage = language, quality = quality, order = quality.replace('p','').zfill(4), server='directo',))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"id": "guardaseriecam",
|
||||
"name": "GuardaSerie Cam",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"active": false,
|
||||
"thumbnail": "https://raw.githubusercontent.com/32Dexter/DexterRepo/master/media/guardaserie_live.png",
|
||||
"banner": "",
|
||||
"categories": ["tvshow"],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "ilgeniodellostreaming_cam",
|
||||
"name": "IlGenioDelloStreaming CAM",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita"],
|
||||
"thumbnail": "ilgeniodellostreaming.png",
|
||||
"banner": "ilgeniodellostreaming.png",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "tapmovie",
|
||||
"name": "Tap Movie",
|
||||
"language": ["ita", "sub-ita"],
|
||||
"active": true,
|
||||
"thumbnail": "tapmovie.png",
|
||||
"banner": "tapmovie.png",
|
||||
"categories": ["movie", "tvshow", "anime"],
|
||||
"not_active": ["include_in_newest"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per 'dvdita'
|
||||
|
||||
from core import support, httptools
|
||||
from core.item import Item
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
api_url = '/api/v2/'
|
||||
per_page = 24
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
film = ['/browse/movie']
|
||||
tvshow = ['/browse/tvshow']
|
||||
search = ''
|
||||
|
||||
# [Voce Menu,['url','action','args',contentType]
|
||||
top = [('Generi', ['', 'genres', '', 'undefined'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def episodios(item):
|
||||
support.info(item)
|
||||
itemlist = []
|
||||
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for season in httptools.downloadpage(host + api_url + 'tvshow', post={'tvshow_id': item.id}).json.get('season', []):
|
||||
season_id = season['season_number']
|
||||
thL.append(executor.submit(httptools.downloadpage, host + api_url + 'episodes', post={'tvshow_id': item.id, 'season_id': season_id}))
|
||||
for th in futures.as_completed(thL):
|
||||
for episode in th.result().json.get('episodes', []):
|
||||
itemlist.append(item.clone(action="findvideos", contentSeason=episode['season_id'], contentEpisodeNumber=episode['episode_number'], id=item.id,
|
||||
title=episode['season_id']+'x'+episode['episode_number'], contentType='episode'))
|
||||
support.scraper.sort_episode_list(itemlist)
|
||||
support.videolibrary(itemlist, item)
|
||||
support.download(itemlist, item)
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def genres(item):
|
||||
itemlist = []
|
||||
for n, genre in enumerate(httptools.downloadpage(host + api_url + 'categories', post={}).json.get('categories', [])):
|
||||
itemlist.append(item.clone(action="peliculas", genre=genre.get('name'), title=genre.get('value'), n=n))
|
||||
return support.thumb(itemlist, genre=True)
|
||||
|
||||
|
||||
def peliculas(item, text=''):
|
||||
support.info('search', item)
|
||||
itemlist = []
|
||||
filter_type = False
|
||||
if item.genre:
|
||||
text = item.genre
|
||||
cmd = 'search/category'
|
||||
else:
|
||||
cmd = 'search'
|
||||
if not text:
|
||||
filter_type = True
|
||||
|
||||
try:
|
||||
page = int(item.url.split('?p=')[1])
|
||||
except:
|
||||
page = 1
|
||||
results = httptools.downloadpage(host + api_url + cmd, post={'search': text, 'page': page}).json.get('results', [])
|
||||
for result in results:
|
||||
contentType = 'movie' if result['type'] == 'FILM' else 'tvshow'
|
||||
if not filter_type or (filter_type and contentType == item.contentType):
|
||||
itemlist.append(item.clone(id=result.get('id'), title=result.get('title'), contentTitle=result.get('title'),
|
||||
contentSerieName='' if contentType == 'movie' else result.get('title'),
|
||||
contentPlot=result.get('description'), thumbnail=result.get('poster'),
|
||||
fanart=result.get('backdrop'), year=result.get('year'), action='episodios' if contentType == 'tvshow' else 'findvideos',
|
||||
url='{}/{}/{}-{}'.format('https://filmigratis.org', contentType, result.get('id'), support.scrapertools.slugify(result.get('title'))),
|
||||
contentType=contentType))
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
|
||||
if len(results) >= per_page:
|
||||
page += 1
|
||||
support.nextPage(itemlist, item, next_page='https://filmigratis.org/category/' + str(item.n) + '/' + item.genre + '?p=' + str(page))
|
||||
return itemlist
|
||||
|
||||
|
||||
def search(item, text):
|
||||
return peliculas(item, text)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
itemlist = []
|
||||
if not item.contentSeason: # film
|
||||
json = httptools.downloadpage(host + api_url + 'movie', post={'movie_id': item.id}).json
|
||||
else:
|
||||
json = httptools.downloadpage(host + api_url + 'episode/links', post={'tvshow_id': item.id, 'season_id': item.contentSeason, 'episode_id': item.contentEpisodeNumber}).json
|
||||
|
||||
for i in json.get('links', []) + json.get('special', []):
|
||||
itemlist.append(Item(url=i.get('link')))
|
||||
return support.server(item, itemlist=itemlist)
|
||||
Reference in New Issue
Block a user