latest version
This commit is contained in:
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+27
-17
@@ -4,7 +4,7 @@
|
||||
# ------------------------------------------------------------
|
||||
|
||||
import cloudscraper, json, copy, inspect
|
||||
from core import jsontools, support, httptools
|
||||
from core import jsontools, support, httptools, scrapertools
|
||||
from platformcode import autorenumber
|
||||
|
||||
# support.dbg()
|
||||
@@ -53,7 +53,7 @@ def genres(item):
|
||||
# support.dbg()
|
||||
itemlist = []
|
||||
|
||||
genres = json.loads(support.match(response.text, patron='genres="([^"]+)').match.replace('"','"'))
|
||||
genres = json.loads(support.match(response.data, patron='genres="([^"]+)').match.replace('"','"'))
|
||||
|
||||
for genre in genres:
|
||||
item.args['genres'] = [genre]
|
||||
@@ -65,10 +65,10 @@ def years(item):
|
||||
itemlist = []
|
||||
|
||||
from datetime import datetime
|
||||
current_year = datetime.today().year
|
||||
oldest_year = int(support.match(response.text, patron='anime_oldest_date="([^"]+)').match)
|
||||
next_year = datetime.today().year + 1
|
||||
oldest_year = int(support.match(response.data, patron='anime_oldest_date="([^"]+)').match)
|
||||
|
||||
for year in list(reversed(range(oldest_year, current_year + 1))):
|
||||
for year in list(reversed(range(oldest_year, next_year + 1))):
|
||||
item.args['year']=year
|
||||
itemlist.append(item.clone(title=support.typo(year,'bold'), action='peliculas'))
|
||||
return itemlist
|
||||
@@ -116,23 +116,33 @@ def news(item):
|
||||
support.info()
|
||||
item.contentType = 'episode'
|
||||
itemlist = []
|
||||
import cloudscraper
|
||||
session = cloudscraper.create_scraper()
|
||||
|
||||
fullJs = json.loads(support.match(session.get(item.url).text, headers=headers, patron=r'items-json="([^"]+)"').match.replace('"','"'))
|
||||
fullJs = json.loads(support.match(httptools.downloadpage(item.url).data, headers=headers, patron=r'items-json="([^"]+)"').match.replace('"','"'))
|
||||
js = fullJs['data']
|
||||
|
||||
for it in js:
|
||||
if it.get('anime', {}).get('title'):
|
||||
if it.get('anime', {}).get('title') or it.get('anime', {}).get('title_eng'):
|
||||
title_name = it['anime']['title'] if it.get('anime', {}).get('title') else it['anime']['title_eng']
|
||||
pattern = r'[sS](?P<season>\d+)[eE](?P<episode>\d+)'
|
||||
match = scrapertools.find_single_match(it['file_name'], pattern)
|
||||
full_episode = ''
|
||||
if match:
|
||||
season, episode = match
|
||||
full_episode = ' - S' + season + ' E' + episode
|
||||
else:
|
||||
pattern = r'[._\s]Ep[._\s]*(?P<episode>\d+)'
|
||||
episode = scrapertools.find_single_match(it['file_name'], pattern)
|
||||
if episode:
|
||||
full_episode = ' - E' + episode
|
||||
itemlist.append(
|
||||
item.clone(title= support.typo(it['anime']['title'] + ' - EP. ' + it['number'], 'bold'),
|
||||
fulltitle=it['anime']['title'],
|
||||
thumbnail=it['anime']['imageurl'],
|
||||
item.clone(title = support.typo(title_name + full_episode, 'bold'),
|
||||
fulltitle = it['anime']['title'],
|
||||
thumbnail = it['anime']['imageurl'],
|
||||
forcethumb = True,
|
||||
scws_id=it.get('scws_id', ''),
|
||||
# video_url=it.get('link', ''),
|
||||
plot=it['anime']['plot'],
|
||||
action='findvideos')
|
||||
scws_id = it.get('scws_id', ''),
|
||||
url = '{}/anime/{}-{}'.format(item.url, it['anime']['id'],it['anime']['slug']),
|
||||
plot = it['anime']['plot'],
|
||||
action = 'findvideos')
|
||||
)
|
||||
if 'next_page_url' in fullJs:
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'),thumbnail=support.thumb(), url=fullJs['next_page_url']))
|
||||
@@ -255,4 +265,4 @@ def findvideos(item):
|
||||
# if info:
|
||||
# for url, res in info:
|
||||
# urls.append(['hls [{}]'.format(res), url])
|
||||
# return urls
|
||||
# return urls
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+2
-2
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"id": "eurostreaming",
|
||||
"name": "Eurostreaming",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "eurostreaming.png",
|
||||
"banner": "eurostreaming.png",
|
||||
"categories": ["tvshow", "anime", "vos"],
|
||||
"settings": []
|
||||
}
|
||||
}
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+18
-51
@@ -3,56 +3,33 @@
|
||||
# Canale per ilcorsaronero
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import support
|
||||
|
||||
# def findhost(url):
|
||||
# data = support.httptools.downloadpage(url).data
|
||||
# url = support.scrapertools.find_single_match(data, '<li><a href="([^"]+)')
|
||||
# return url[:-1] if url.endswith('/') else url
|
||||
from core import support, httptools
|
||||
|
||||
host = support.config.get_channel_url()
|
||||
support.info('HOST',host)
|
||||
# host = 'https://ilcorsaronero.xyz'
|
||||
headers = [['Referer', host]]
|
||||
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
menu = [
|
||||
('BDRiP {film}', ['/categoria.php?active=0&category=1&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
|
||||
('Cerca BDRiP... {submenu} {film}', ['/torrent-ita/1/', 'search', ['search', 'movie', True], 'movie']),
|
||||
('DVD {film}', ['/categoria.php?active=0&category=20&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
|
||||
('Cerca DVD... {submenu} {film}', ['/torrent-ita/20/', 'search', ['search', 'movie', True], 'movie']),
|
||||
('Screener {film}', ['/categoria.php?active=0&category=19&order=data&by=DESC&page=', 'peliculas', [0, 'movie', True], 'undefined']),
|
||||
('Cerca Screener.. {submenu} {film}', ['/torrent-ita/19/', 'search', ['search', 'movie', True], 'movie']),
|
||||
('Serie TV', ['/categoria.php?active=0&category=15&order=data&by=DES&page=', 'peliculas', [0 , 'tvshow', True], 'tvshow']),
|
||||
('Cerca Serie TV.. {submenu}', ['/torrent-ita/15/', 'search', ['search', 'tvshow',True], 'tvshow']),
|
||||
('Anime', ['/categoria.php?active=0&category=5&order=data&by=DESC&page=', 'peliculas', [0, 'anime', True], 'tvshow']),
|
||||
('Cerca Anime.. {submenu}', ['/torrent-ita/5/', 'search', ['search', 'anime', True], 'tvshow']),
|
||||
('Musica', ['/categoria.php?active=0&category=2&order=data&by=DESC&page=', 'peliculas', [0, 'music', False], 'music']),
|
||||
('Cerca Musica.. {submenu}', ['/torrent-ita/2/', 'search', ['search', 'music', False], 'music']),
|
||||
('Audiolibri {musica}', ['/categoria.php?active=0&category=18&order=data&by=DESC&page=', 'peliculas', [0, 'music', False], 'music']),
|
||||
('Cerca Audiolibri.. {submenu}', ['/torrent-ita/18/', 'search', ['search', 'music', False], 'music']),
|
||||
# mostrerebbe anche risultati non "multimediali" e allungherebbero inutilmente la ricerca globale
|
||||
# ('Altro {film}', ['/categoria.php?active=0&category=4&order=data&by=DESC&page=', 'peliculas', [0, 'other', False]]),
|
||||
# ('Cerca altro.. {submenu}', ['/torrent-ita/4/', 'search', ['search', 'other', False]]),
|
||||
# ('Cerca Tutto... {color kod bold}', ['/argh.php?search=', 'search', ['search', 'all', False]])
|
||||
('Film {film}', ['/cat/film', 'peliculas', [0, 'movie', True], 'undefined']),
|
||||
('Serie TV', ['/cat/serie-tv', 'peliculas', [0 , 'tvshow', True], 'undefined']),
|
||||
('Animazione', ['/cat/animazione', 'peliculas', [0 , 'anime', True], 'undefined']),
|
||||
('Documentari', ['/cat/altro/documentari', 'peliculas', [0 , 'documentary', True], 'undefined']),
|
||||
('Programmi TV', ['/cat/altro/programmi-tv', 'peliculas', [0 , 'tvshow', True], 'tvshow']),
|
||||
('Video Musica', ['/cat/musica/video-musicali', 'peliculas', [0 , 'music', False], 'undefined']),
|
||||
('Videocorsi', ['/cat/altro/videocorsi', 'peliculas', [0 , 'music', False], 'undefined'])
|
||||
]
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
# debug = True
|
||||
debug = False
|
||||
action = 'findvideos'
|
||||
sceneTitle = item.args[2]
|
||||
if item.args[1] in ['tvshow', 'anime', 'music', 'other']:
|
||||
patron = r'>[^"<]+'
|
||||
else:
|
||||
patron = r'>(?P<quality>[^"<]+)'
|
||||
patron += '<td[^>]+><a class="tab" href="(?P<url>[^"]+)"\s*>[^<]+<[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<size>[^<]+)<[^>]+>[^>]+>[^>]+><form action="[^"]+/\d+/(?P<title>[^"]+)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<seed>[^<]+)'
|
||||
sceneTitle = item.args[2]
|
||||
|
||||
def itemHook(item):
|
||||
if not sceneTitle:
|
||||
@@ -62,33 +39,23 @@ def peliculas(item):
|
||||
|
||||
return item
|
||||
|
||||
if 'search' not in item.args:
|
||||
item.url += str(item.args[0])
|
||||
def itemlistHook(itemlist):
|
||||
args = item.args
|
||||
args[0] += 1
|
||||
support.nextPage(itemlist, item, next_page=item.url, function_or_level="peliculas")
|
||||
# itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), args=args, thumbnail=support.thumb()))
|
||||
return itemlist
|
||||
patron = r'<a class="hover:underline line-clamp-1.*?href="(?P<url>[^"]+)"\s*>(?P<title>.*?)</a>[^>]+>[^>]+>[^>]+>(?P<seed>.*?)<'
|
||||
patronNext = r'<a href="(?P<url>[^"]+)".*?Next</span>'
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
support.info(item, text)
|
||||
if 'all' in item.args:
|
||||
item.url += text
|
||||
else:
|
||||
item.url += text + '.html'
|
||||
item.url = "{}/search?{}".format(host, support.urlencode({'q': text}))
|
||||
item.args = 'search'
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
# Cattura la eccezione così non interrompe la ricerca globle se il canale si rompe!
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
support.logger.error("search except: %s" % line)
|
||||
logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
if item.contentType == 'tvshow': item.contentType = 'episode'
|
||||
Videolibrary = True if 'movie' in item.args else False
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "lordchannel",
|
||||
"name": "LordChannel",
|
||||
"active": true,
|
||||
"language": ["ita", "sub-ita"],
|
||||
"thumbnail": "lordchannel.png",
|
||||
"banner": "lordchannel.png",
|
||||
"categories": ["anime", "tvshow", "movie"],
|
||||
"settings": []
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per lordchannel.py
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools, support, scrapertools
|
||||
from core.item import Item
|
||||
from platformcode import config, logger
|
||||
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
|
||||
film = ['/film/',
|
||||
]
|
||||
tvshow = ['/serietv/',
|
||||
]
|
||||
|
||||
anime = ['/anime/anime-ita/',
|
||||
('Anime SUB-Ita', ['/anime/anime-sub-ita/','peliculas']),
|
||||
]
|
||||
search = ''
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
if item.args == 'search':
|
||||
action = 'check'
|
||||
patron= r'<div class="col-6.*?<img\s.*?src="(?P<thumb>[^"]+).*?<h3.*?<a\shref="(?P<url>[^"]+).*?>(?P<title>.*?)</a'
|
||||
patronNext = r'<li class="paginator__item paginator__item--next">.*?href="(?P<url>[^"]+)'
|
||||
return locals()
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
patronBlock=r'<div class="accordion__card.*?<span>.*?:\s*(?P<season>\d*?)\s*</span>(?P<block>.*?)</table>'
|
||||
patron=r'<tr>\s<th class="episode-link".*?href="(?P<url>[^"]+).*?>(?P<episode>\d+).*?_blank">(?P<title>.*?)</a>'
|
||||
downloadEnabled = False
|
||||
return locals()
|
||||
|
||||
def check(item):
|
||||
item.data = httptools.downloadpage(item.url).data
|
||||
if 'episode-link' in item.data.lower():
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
else:
|
||||
item.contentType = 'movie'
|
||||
return findvideos(item)
|
||||
|
||||
|
||||
def search(item, text):
|
||||
item.url = "{}/cerca/?{}".format(host, support.urlencode({'q': text}))
|
||||
item.args = 'search'
|
||||
|
||||
try:
|
||||
return peliculas(item)
|
||||
|
||||
except:
|
||||
import sys
|
||||
for line in sys.exc_info():
|
||||
logger.error("search except: %s" % line)
|
||||
return []
|
||||
|
||||
def findvideos(item):
|
||||
video_url = item.url
|
||||
|
||||
if item.contentType == 'movie':
|
||||
video_url = support.match(video_url, patron=r'<a\shref="(?P<url>[^"]+)"\sclass="btn-streaming streaming_btn">').match
|
||||
|
||||
video_url = support.match(video_url, patron=r'<video-js.*?src="(?P<url>[^"]+)').match
|
||||
|
||||
if (video_url == ''):
|
||||
return []
|
||||
|
||||
item = item.clone(server='directo', url=video_url, no_return=True)
|
||||
return support.server(item,itemlist=[item], Download=False, Videolibrary=False)
|
||||
Regular → Executable
Regular → Executable
+9
-7
@@ -48,17 +48,19 @@ pagination = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100][config.get_setting('pagin
|
||||
def mainlist(item):
|
||||
top = [('Dirette {bold}', ['', 'live'])]
|
||||
|
||||
menu = [('Film {bullet bold}', ['/cinema', 'peliculas', {'uxReference':'filmUltimiArrivi'}, 'movie']),
|
||||
('Film Più Visti {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmPiuVisti24H'}, 'movie']),
|
||||
menu = [('Film Più Visti {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmPiuVisti24H'}, 'movie']),
|
||||
('Film ultimi arrivi {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmUltimiArrivi'}, 'movie']),
|
||||
('Film Da Non Perdere {submenu}', ['/cinema', 'peliculas', {'uxReference':'filmClustering'}, 'movie']),
|
||||
('Fiction / Serie TV {bullet bold}', ['/fiction', 'peliculas', {'uxReference':'fictionSerieTvDelMomento'}, 'tvshow']),
|
||||
('Fiction e Serie Tv del momento {submenu}', ['/fiction', 'peliculas', {'uxReference':'fictionSerieTvDelMomento'}, 'tvshow']),
|
||||
('Serie TV Piu Viste {submenu}', ['/fiction', 'peliculas', {'uxReference':'serieTvPiuViste24H'}, 'tvshow']),
|
||||
('Le Serie Soap Del Momento {submenu}', ['/cinema', 'peliculas', {'uxReference':'fictionSerieTvParamsGenre', 'params': 'genre≈Soap opera'}, 'tvshow']),
|
||||
('Programmi TV{ bullet bold}', ['/programmitv', 'peliculas', {'uxReference':'stagioniPrimaSerata'}, 'tvshow']),
|
||||
('Kids {bullet bold}', ['/kids', 'peliculas', {'uxReference':'kidsMediaset' }, 'undefined']),
|
||||
('Soap del momento {submenu}', ['/cinema', 'peliculas', {'uxReference':'fictionSerieTvParamsGenre', 'params': 'genre≈Soap opera'}, 'tvshow']),
|
||||
('Programmi TV Prima serata{ submenu}', ['/programmitv', 'peliculas', {'uxReference':'stagioniPrimaSerata'}, 'tvshow']),
|
||||
('Programmi TV Daytime{ submenu}', ['/programmitv', 'peliculas', {'uxReference':'stagioniDaytime'}, 'tvshow']),
|
||||
('Talent e reality {submenu}', ['/talent', 'peliculas', {'uxReference':'multipleBlockProgrammiTv', 'userContext' :'iwiAeyJwbGF0Zm9ybSI6IndlYiJ9Aw'}, 'tvshow']),
|
||||
('Kids Evergreen {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsMediaset' }, 'undefined']),
|
||||
('Kids Boing {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsBoing' }, 'undefined']),
|
||||
('Kids Cartoonito {submenu}', ['/kids', 'peliculas', {'uxReference':'kidsCartoonito' }, 'undefined']),
|
||||
('Documentari {bullet bold}', ['/documentari', 'peliculas', {'uxReference': 'documentariPiuVisti24H'}, 'undefined']),
|
||||
('Documentari più visti {submenu}', ['/documentari', 'peliculas', {'uxReference': 'documentariPiuVisti24H'}, 'undefined']),
|
||||
]
|
||||
|
||||
search = ''
|
||||
|
||||
Regular → Executable
Regular → Executable
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "metalvideo",
|
||||
"name": "Metal Video",
|
||||
"active": true,
|
||||
"active": false,
|
||||
"language": ["*"],
|
||||
"thumbnail": "metalvideo.png",
|
||||
"banner": "metalvideo.png",
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+2
-2
@@ -162,9 +162,9 @@ def peliculas(item):
|
||||
if not item.newest:
|
||||
item.mainThumb = item.thumbnail
|
||||
if recordlist:
|
||||
itemlist.append(item.clone(action='peliculas',title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), page=page, records=recordlist))
|
||||
elif len(itemlist) >= 20:
|
||||
itemlist.append(item.clone(action='peliculas',title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
||||
itemlist.append(item.clone(title=support.typo(support.config.get_localized_string(30992), 'color kod bold'), thumbnail=support.thumb(), records=[], page=page + 1))
|
||||
|
||||
support.tmdb.set_infoLabels_itemlist(itemlist, seekTmdb=True)
|
||||
support.check_trakt(itemlist)
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
+2
-2
@@ -2,10 +2,10 @@
|
||||
"id": "tantifilm",
|
||||
"name": "Tantifilm",
|
||||
"language": ["ita"],
|
||||
"active": false,
|
||||
"active": true,
|
||||
"thumbnail": "tantifilm.png",
|
||||
"banner": "tantifilm.png",
|
||||
"categories": ["tvshow", "movie", "anime"],
|
||||
"categories": ["tvshow", "movie"],
|
||||
"not_active": ["include_in_newest_anime", "include_in_newest_peliculas"],
|
||||
"settings": []
|
||||
}
|
||||
|
||||
Regular → Executable
+22
-112
@@ -12,26 +12,14 @@ from platformcode import config
|
||||
host = config.get_channel_url()
|
||||
headers = [['Referer', host]]
|
||||
|
||||
player_iframe = r'<iframe.*?src="([^"]+)"[^>]+></iframe>\s*<div class="player'
|
||||
player_iframe = r'<iframe.*?src="([^"]+)"[^>]+></iframe>\s*<\/div'
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
logger.debug()
|
||||
|
||||
top = [('Generi', ['', 'genres'])]
|
||||
|
||||
film = ['/film',
|
||||
('Al Cinema', ['/watch-genre/al-cinema/']),
|
||||
('HD', ['/watch-genre/altadefinizione/']),
|
||||
('Sub-ITA', ['/watch-genre/sub-ita/'])]
|
||||
|
||||
tvshow = ['/serie-tv/',
|
||||
('HD', ['/watch-genre/serie-altadefinizione/']),
|
||||
('Miniserie', ['/watch-genre/miniserie-1/']),
|
||||
('Programmi TV', ['/watch-genre/programmi-tv/'])]
|
||||
|
||||
anime = ['/watch-genre/anime/']
|
||||
|
||||
film = ['/film']
|
||||
tvshow = ['/serie-tv/']
|
||||
search = ''
|
||||
|
||||
return locals()
|
||||
@@ -48,10 +36,9 @@ def genres(item):
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, texto):
|
||||
logger.debug(texto)
|
||||
|
||||
item.url = host + "/?s=" + texto
|
||||
def search(item, text):
|
||||
item.url = "{}/?{}".format(host, support.urlencode({'story': text,'do':'search', 'subaction':'search'}))
|
||||
#item.url = host + "/?story=" + texto
|
||||
try:
|
||||
item.args = 'search'
|
||||
return peliculas(item)
|
||||
@@ -63,89 +50,34 @@ def search(item, texto):
|
||||
logger.error("%s" % line)
|
||||
return []
|
||||
|
||||
|
||||
@support.scrape
|
||||
def newest(categoria):
|
||||
if categoria == 'series':
|
||||
item = Item(url=host + '/aggiornamenti-serie-tv')
|
||||
data = support.match(item).data.replace('<u>','').replace('</u>','')
|
||||
item.contentType = 'episode'
|
||||
patronBlock = r'Aggiornamenti (?:Giornalieri )?Serie TV.*?<div class="sp-body folded">(?P<block>.*?)</div>'
|
||||
patron = r'<p>(?P<title>.*?)\((?P<year>[0-9]{4})[^\)]*\)[^<]+<a href="(?P<url>[^"]+)">(?P<episode>[^ ]+) (?P<lang>[Ss][Uu][Bb].[Ii][Tt][Aa])?(?P<title2>[^<]+)?'
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
action = 'check'
|
||||
item.contentType = 'undefined'
|
||||
if item.args == 'search':
|
||||
patron = r'<a href="(?P<url>[^"]+)" title="Permalink to\s*(?P<title>[^"]+) \((?P<year>[0-9]+)[^<]*\)[^"]*"[^>]+>\s*<img[^s]+src="(?P<thumb>[^"]+)".*?<div class="calitate">\s*<p>(?P<quality>[^<]+)<\/p>'
|
||||
patron = r'<div class="film.*?<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<p>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?).*?\)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z]+)?'
|
||||
else:
|
||||
patronNext = r'<a class="nextpostslink" rel="next" href="([^"]+)">'
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s*<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?)\).[^<]+[^>]+><\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z-0-9\.]+)?'
|
||||
patronBlock = r'<div id="main_col">(?P<block>.*?)<!\-\- main_col \-\->'
|
||||
patronNext = r'<b class="nextpostslink">.*?<a href="([^"]+)">'
|
||||
if 'serie-tv' in item.url:
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s*<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<\/a>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?).*?\)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z]+)?'
|
||||
else:
|
||||
patron = r'<div class="mediaWrap mediaWrapAlt">\s*<a href="(?P<url>[^"]+)"(?:[^>]+)?>?\s*(?:<img[^s]+src="(?P<thumb>[^"]+)"[^>]+>\s*)?<\/a>[^>]+>[^>]+>[^>]+>(?P<title>[^<]+?)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?(?:[ ]?\((?P<year>\d{4})-?(?:\d{4})?).*?\)[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>[^>]+>\s*(?P<quality>[a-zA-Z]+)?'
|
||||
patronBlock = r'<div id="dle-content">(?P<block>.*?)<!\-\- main_col \-\->'
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def episodios(item):
|
||||
def get_season(pageData, seas_url, season):
|
||||
data = ''
|
||||
episodes = support.match(pageData if pageData else seas_url, patronBlock=patron_episode, patron=patron_option).matches
|
||||
for episode_url, episode in episodes:
|
||||
title = season + "x" + episode.zfill(2) + ' - ' + item.fulltitle
|
||||
data += title + '|' + episode_url + '\n'
|
||||
return data
|
||||
|
||||
patron_season = 'Stagioni<\/a>.*?<ul class="nav navbar-nav">(.*?)<\/ul>'
|
||||
patron_episode = 'Episodio<\/a>.*?<ul class="nav navbar-nav">(?P<block>.*?)<\/ul>'
|
||||
patron_option = r'<a href="([^"]+?)".*?>[^>]+></i>\s*(\d+)'
|
||||
|
||||
if item.data:
|
||||
url = support.match(item.data, patron=player_iframe).match
|
||||
item.data = ''
|
||||
else:
|
||||
url = support.match(item, patron=player_iframe).match
|
||||
seasons = support.match(url, patronBlock=patron_season, patron=patron_option)
|
||||
|
||||
data = ''
|
||||
|
||||
import sys
|
||||
if sys.version_info[0] >= 3: from concurrent import futures
|
||||
else: from concurrent_py2 import futures
|
||||
with futures.ThreadPoolExecutor() as executor:
|
||||
thL = []
|
||||
for i, season in enumerate(seasons.matches):
|
||||
thL.append(executor.submit(get_season, '', season[0], season[1]))
|
||||
for res in futures.as_completed(thL):
|
||||
if res.result():
|
||||
data += res.result()
|
||||
patron = r'(?P<season>\d+)x(?P<episode>\d+)\s*-\s*(?P<title>[^\|]+)\|(?P<url>[^ ]+)'
|
||||
# debug = True
|
||||
patron = r'data-num="(?P<season>.*?)x(?P<episode>.*?)"\s*data-title="(?P<title>[^"]+)(?P<lang>[sS][uU][bB]\-[iI][tT][aA]+)?".*?<div class="mirrors"(?P<server_links>.*?)<!---'
|
||||
action = 'findvideos'
|
||||
|
||||
def itemlistHook(itemlist):
|
||||
itemlist.sort(key=lambda item: (item.infoLabels['season'], item.infoLabels['episode']))
|
||||
return itemlist
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def check(item):
|
||||
item.data = support.match(item.url, headers=headers).data
|
||||
check = support.match(item.data, patron=r'<div class="category-film">(.*?)</div>').match
|
||||
if 'sub' in check.lower():
|
||||
item.contentLanguage = 'Sub-ITA'
|
||||
logger.debug("CHECK : ", check)
|
||||
# if 'anime' in check.lower():
|
||||
# item.contentType = 'tvshow'
|
||||
# logger.debug('select = ### è una anime ###')
|
||||
# try:
|
||||
# return episodios(item)
|
||||
# except:
|
||||
# pass
|
||||
if 'serie' in check.lower():
|
||||
item.contentType = 'tvshow'
|
||||
return episodios(item)
|
||||
@@ -156,36 +88,14 @@ def check(item):
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
logger.debug()
|
||||
data = item.data if item.data else support.match(item.url, headers=headers).data
|
||||
itemlist = []
|
||||
if item.server_links:
|
||||
return support.server(item, data = item.server_links)
|
||||
|
||||
if '/serietv/series/names' in item.url:
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=item.url))))
|
||||
else:
|
||||
urls = support.match(data, patron=player_iframe).matches
|
||||
if item.otherLinks:
|
||||
urls += support.match(item.otherLinks, patron=r'href="([^"]+)').matches
|
||||
video_url = support.match(item.url, patron=player_iframe).match
|
||||
|
||||
logger.debug('URLS', urls)
|
||||
for u in urls:
|
||||
if 'hdplayer.casa/series/' in u:
|
||||
urls.remove(u)
|
||||
itemlist.extend(support.server(item, itemlist=hdpass(Item(url=u))))
|
||||
break
|
||||
else:
|
||||
itemlist.extend(support.server(item, urls))
|
||||
support.addQualityTag(item, itemlist, data, 'Keywords:\s*(?:<span>)?([^<]+)')
|
||||
if (video_url == ''):
|
||||
return []
|
||||
|
||||
itemlist = [item.clone(action="play", url=srv) for srv in support.match(video_url, patron='<li class="(?:active)?" data-link=\"([^"]+)').matches]
|
||||
itemlist = support.server(item,itemlist=itemlist)
|
||||
return itemlist
|
||||
|
||||
|
||||
@support.scrape
|
||||
def hdpass(item):
|
||||
patronBlock = r'<ul class="nav navbar-nav">(?P<block>.*?)</ul>'
|
||||
patron = r'<a.*?href="(?P<url>[^"]+)">'
|
||||
|
||||
def itemHook(item):
|
||||
url = support.match(item.url, patron='<iframe.*?src="([^"]+)').match
|
||||
return Item(url=url)
|
||||
|
||||
return locals()
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user