Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -111,15 +111,15 @@ def findvideos(item):
|
|||||||
itemlist = []
|
itemlist = []
|
||||||
support.log()
|
support.log()
|
||||||
|
|
||||||
matches = support.match(item, patron=r'<a href="([^"]+)"', patronBlock=r'<div style="white-space: (.*?)<div id="main-content"')
|
matches = support.match(item, patron=r'href="([^"]+)"', patronBlock=r'<div style="white-space: (.*?)<div id="main-content"')
|
||||||
|
|
||||||
if not matches.matches:
|
if not matches.matches and item.contentType != 'episode':
|
||||||
item.data = matches.data
|
item.data = matches.data
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
return episodios(item)
|
return episodios(item)
|
||||||
|
|
||||||
# matches.matches.sort()
|
# matches.matches.sort()
|
||||||
|
support.log('VIDEO')
|
||||||
for url in matches.matches:
|
for url in matches.matches:
|
||||||
lang = url.split('/')[-2]
|
lang = url.split('/')[-2]
|
||||||
if 'ita' in lang.lower():
|
if 'ita' in lang.lower():
|
||||||
|
|||||||
@@ -4,32 +4,6 @@
|
|||||||
# Canale per ilgeniodellostreaming
|
# Canale per ilgeniodellostreaming
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
Alcuni video non si aprono sul sito...
|
|
||||||
|
|
||||||
Avvisi per il test:
|
|
||||||
i link per le categorie non sono TUTTI visibili nella pagina del sito:
|
|
||||||
vanno costruiti con i nomi dei generi che vedete nel CANALE.
|
|
||||||
Es:
|
|
||||||
https://ilgeniodellostreaming.se/genere/+ genere nel canale
|
|
||||||
genere-> kids
|
|
||||||
https://ilgeniodellostreaming.se/genere/kids
|
|
||||||
genere-> avventura
|
|
||||||
https://ilgeniodellostreaming.se/genere/avventura
|
|
||||||
Se il genere è formato da 2 parola lo spazio si trasforma in -
|
|
||||||
genere-> televisione film
|
|
||||||
https://ilgeniodellostreaming.se/genere/televisione-film
|
|
||||||
|
|
||||||
Novità -> Serietv e Aggiornamenti nel canale:
|
|
||||||
- le pagine sono di 25 titoli
|
|
||||||
|
|
||||||
|
|
||||||
##### note per i dev #########
|
|
||||||
- La pagina "Aggiornamenti Anime" del sito è vuota (update 13-9-2019)
|
|
||||||
- in url: film o serietv
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
@@ -68,7 +42,7 @@ def mainlist(item):
|
|||||||
]
|
]
|
||||||
|
|
||||||
Tvshow = [
|
Tvshow = [
|
||||||
('Show TV', ['/tv-show/', 'peliculas', '', 'tvshow'])
|
('Show TV bullet bold', ['/tv-show/', 'peliculas', '', 'tvshow'])
|
||||||
]
|
]
|
||||||
|
|
||||||
search = ''
|
search = ''
|
||||||
@@ -81,21 +55,11 @@ def peliculas(item):
|
|||||||
log()
|
log()
|
||||||
|
|
||||||
if item.args == 'search':
|
if item.args == 'search':
|
||||||
|
|
||||||
patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">'
|
patronBlock = r'<div class="search-page">(?P<block>.*?)<footer class="main">'
|
||||||
patron = r'<div class="thumbnail animation-2"><a href="(?P<url>[^"]+)">'\
|
patron = r'<img src="(?P<thumb>[^"]+)" alt="[^"]+" />[^>]+>(?P<type>[^<]+)</span>.*?<a href="(?P<url>[^"]+)">(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?</a>[^>]+>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[^>]+)</span>)?.?(?:<span class="year">(?P<year>[0-9]+)</span>)?[^>]+>[^>]+><p>(?P<plot>.*?)</p>'
|
||||||
'<img src="(?P<thumb>[^"]+)" alt="[^"]+" \/>[^>]+>(?P<type>[^<]+)'\
|
|
||||||
'<\/span>.*?<a href.*?>(?P<title>.+?)[ ]?(?:\[(?P<lang>Sub-ITA)\])?'\
|
|
||||||
'<\/a>[^>]+>(?:<span class="rating">IMDb\s*(?P<rating>[0-9.]+)<\/span>)?'\
|
|
||||||
'.+?(?:<span class="year">(?P<year>[0-9]+)<\/span>)?[^>]+>[^>]+><p>(?P<plot>.*?)<\/p>'
|
|
||||||
|
|
||||||
## type_content_dict={'movie': ['film'], 'tvshow': ['tv']}
|
typeContentDict={'movie': ['film'], 'tvshow': ['tv']}
|
||||||
## type_action_dict={'findvideos': ['film'], 'episodios': ['tv']}
|
typeActionDict={'findvideos': ['film'], 'episodios': ['tv']}
|
||||||
def itemHook(item):
|
|
||||||
if 'film' not in item.url:
|
|
||||||
item.contentType = 'tvshow'
|
|
||||||
item.action = 'episodios'
|
|
||||||
return item
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
if item.contentType == 'movie':
|
if item.contentType == 'movie':
|
||||||
@@ -161,9 +125,8 @@ def genres(item):
|
|||||||
elif item.args == 'letter':
|
elif item.args == 'letter':
|
||||||
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
patronBlock = r'<div class="movies-letter">(?P<block>.*?)<div class="clearfix">'
|
||||||
|
|
||||||
patron = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
patronMenu = r'<a(?:.+?)?href="(?P<url>.*?)"[ ]?>(?P<title>.*?)<\/a>'
|
||||||
|
|
||||||
## debug = True
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
def search(item, text):
|
def search(item, text):
|
||||||
@@ -211,34 +174,4 @@ def newest(categoria):
|
|||||||
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
log()
|
log()
|
||||||
itemlist =[]
|
return support.server(item)
|
||||||
|
|
||||||
html = support.match(item, patron='<iframe class="metaframe rptss" src="([^"]+)"[^>]+>',headers=headers)
|
|
||||||
matches = html.matches
|
|
||||||
data = html.data
|
|
||||||
for url in matches:
|
|
||||||
html = httptools.downloadpage(url, headers=headers).data
|
|
||||||
data += str(scrapertools.find_multiple_matches(html, '<meta name="og:url" content="([^"]+)">'))
|
|
||||||
|
|
||||||
itemlist = support.server(item, data)
|
|
||||||
|
|
||||||
if item.args == 'update':
|
|
||||||
|
|
||||||
data = httptools.downloadpage(item.url).data
|
|
||||||
patron = r'<div class="item"><a href="'+host+'/serietv/([^"\/]+)\/"><i class="icon-bars">'
|
|
||||||
series = support.match(data, patron=patron).matches
|
|
||||||
titles = support.typo(series.upper().replace('-', ' '), 'bold color kod')
|
|
||||||
goseries = support.typo("Vai alla Serie:", ' bold')
|
|
||||||
itemlist.append(
|
|
||||||
Item(channel=item.channel,
|
|
||||||
title=goseries + titles,
|
|
||||||
fulltitle=titles,
|
|
||||||
show=series,
|
|
||||||
contentType='tvshow',
|
|
||||||
contentSerieName=series,
|
|
||||||
url=host+"/serietv/"+series,
|
|
||||||
action='episodios',
|
|
||||||
contentTitle=titles,
|
|
||||||
plot = "Vai alla Serie :" + titles + " con tutte le puntate",
|
|
||||||
))
|
|
||||||
return itemlist
|
|
||||||
|
|||||||
+39
-30
@@ -57,38 +57,44 @@ def show_channels(item):
|
|||||||
|
|
||||||
for key, channel in json['channels'].items():
|
for key, channel in json['channels'].items():
|
||||||
# Find File Path
|
# Find File Path
|
||||||
if 'http' in channel['path']: file_path = httptools.downloadpage(channel['path'],follow_redirects=True).url
|
if 'http' in channel['path']:
|
||||||
|
try:
|
||||||
|
file_path = httptools.downloadpage(channel['path'], follow_redirects=True, timeout=5).url
|
||||||
|
except:
|
||||||
|
support.log('Offline')
|
||||||
|
file_path = None
|
||||||
else: file_path = channel['path']
|
else: file_path = channel['path']
|
||||||
|
|
||||||
# make relative path
|
if file_path:
|
||||||
path = os.path.dirname(os.path.abspath(file_path))
|
# make relative path
|
||||||
if 'http' in path: path = path[path.find('http'):].replace('\\','/').replace(':/','://')
|
path = os.path.dirname(os.path.abspath(file_path))
|
||||||
if file_path.startswith('http'): file_url = httptools.downloadpage(file_path, follow_redirects=True).data
|
if 'http' in path: path = path[path.find('http'):].replace('\\','/').replace(':/','://')
|
||||||
elif os.path.isfile(file_path): file_url = open(file_path, "r").read()
|
if file_path.startswith('http'): file_url = httptools.downloadpage(file_path, follow_redirects=True).data
|
||||||
else:
|
elif os.path.isfile(file_path): file_url = open(file_path, "r").read()
|
||||||
item.channel_id = key
|
else:
|
||||||
remove_channel(item)
|
item.channel_id = key
|
||||||
file_url=''
|
remove_channel(item)
|
||||||
|
file_url=''
|
||||||
|
|
||||||
# load json
|
# load json
|
||||||
if file_url:
|
if file_url:
|
||||||
json_url = jsontools.load(file_url)
|
json_url = jsontools.load(file_url)
|
||||||
|
|
||||||
thumbnail = relative('thumbnail', json_url, path)
|
thumbnail = relative('thumbnail', json_url, path)
|
||||||
if not thumbnail: thumbnail = item.thumbnail
|
if not thumbnail: thumbnail = item.thumbnail
|
||||||
fanart = relative('fanart', json_url, path)
|
fanart = relative('fanart', json_url, path)
|
||||||
plot = json_url['plot'] if json_url.has_key('plot') else ''
|
plot = json_url['plot'] if json_url.has_key('plot') else ''
|
||||||
|
|
||||||
itemlist.append(Item(channel=item.channel,
|
itemlist.append(Item(channel=item.channel,
|
||||||
title=typo(channel['channel_name'],'bold'),
|
title=typo(channel['channel_name'],'bold'),
|
||||||
url=file_path,
|
url=file_path,
|
||||||
thumbnail=thumbnail,
|
thumbnail=thumbnail,
|
||||||
fanart=fanart,
|
fanart=fanart,
|
||||||
plot=plot,
|
plot=plot,
|
||||||
action='show_menu',
|
action='show_menu',
|
||||||
channel_id = key,
|
channel_id = key,
|
||||||
context=context,
|
context=context,
|
||||||
path=path))
|
path=path))
|
||||||
|
|
||||||
autoplay.show_option(item.channel, itemlist)
|
autoplay.show_option(item.channel, itemlist)
|
||||||
support.channel_config(item, itemlist)
|
support.channel_config(item, itemlist)
|
||||||
@@ -490,6 +496,7 @@ def get_seasons(item):
|
|||||||
fulltitle=item.fulltitle,
|
fulltitle=item.fulltitle,
|
||||||
show=item.show,
|
show=item.show,
|
||||||
thumbnails=item.thumbnails,
|
thumbnails=item.thumbnails,
|
||||||
|
filterseason=str(season['season']),
|
||||||
url=url,
|
url=url,
|
||||||
action='episodios',
|
action='episodios',
|
||||||
contentSeason=season['season'],
|
contentSeason=season['season'],
|
||||||
@@ -528,9 +535,10 @@ def get_seasons(item):
|
|||||||
|
|
||||||
|
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
support.log()
|
support.log(item)
|
||||||
itm = item
|
itm = item
|
||||||
|
|
||||||
|
|
||||||
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']:
|
if inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']:
|
||||||
pagination = int(defp) if defp.isdigit() else ''
|
pagination = int(defp) if defp.isdigit() else ''
|
||||||
else: pagination = ''
|
else: pagination = ''
|
||||||
@@ -573,7 +581,8 @@ def episodios(item):
|
|||||||
|
|
||||||
title = ' - ' + episode['title'] if episode.has_key('title') else ''
|
title = ' - ' + episode['title'] if episode.has_key('title') else ''
|
||||||
title = '%sx%s%s' % (season_number, episode_number, title)
|
title = '%sx%s%s' % (season_number, episode_number, title)
|
||||||
if season_number == item.filter or not item.filterseason:
|
|
||||||
|
if season_number == item.filterseason or not item.filterseason:
|
||||||
itemlist.append(Item(channel= item.channel,
|
itemlist.append(Item(channel= item.channel,
|
||||||
title= format_title(title),
|
title= format_title(title),
|
||||||
fulltitle = item.fulltitle,
|
fulltitle = item.fulltitle,
|
||||||
@@ -606,7 +615,7 @@ def episodios(item):
|
|||||||
action='episodios',
|
action='episodios',
|
||||||
contentSeason=season,
|
contentSeason=season,
|
||||||
infoLabels=infoLabels,
|
infoLabels=infoLabels,
|
||||||
filterseason=season,
|
filterseason=str(season),
|
||||||
path=item.path))
|
path=item.path))
|
||||||
|
|
||||||
elif pagination and len(json_data['episodes_list']) >= pag * pagination:
|
elif pagination and len(json_data['episodes_list']) >= pag * pagination:
|
||||||
|
|||||||
Reference in New Issue
Block a user