Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -32,19 +32,20 @@ list_quality = ['default']
|
||||
def mainlist(item):
|
||||
|
||||
Tvshow = [
|
||||
('Aggiornamenti', ['', 'peliculas', '', 'tvshow']),
|
||||
('Per Lettera', ['/elenco-serie-tv/', 'genres', 'genres'])
|
||||
('Aggiornamenti', ['', 'peliculas', '', 'update']),
|
||||
('Per Lettera {TV}', ['/elenco-serie-tv/', 'genres', 'genres']),
|
||||
('Cerca... {TV} bold', ['','search'])
|
||||
]
|
||||
|
||||
search = ''
|
||||
|
||||
# search = ''
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@support.scrape
|
||||
def peliculas(item):
|
||||
support.log(item)
|
||||
#support.dbg()
|
||||
# support.dbg()
|
||||
deflang = 'Sub-ITA'
|
||||
|
||||
action = 'findvideos'
|
||||
@@ -55,10 +56,10 @@ def peliculas(item):
|
||||
action = 'episodios'
|
||||
elif item.args == 'search':
|
||||
patronBlock = r'</h1> </header>(?P<block>.*?)</main>'
|
||||
patron = r'(?:<img src="(?P<thumb>[^"]+)"[^>]+>)?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"[^>]+>(?:(?P<title>.+?)[ ](?P<episode>[\d&#;\d]+\d+|\d+..\d+)(?: \([a-zA-Z\s]+\) )(?:s\d+e\d+)?[ ]?(?:[&#\d;|.{3}]+)(?P<title2>[^&#\d;|^.{3}]+)(?:|.+?))<'
|
||||
patronMenu = r'(?:<img src="(?P<thumb>[^"]+)"[^>]+>)?[^>]+>[^>]+>[^>]+>[^>]+>[^>]+><a href="(?P<url>[^"]+)"[^>]+>(?:(?P<title>.+?)[ ](?P<episode>[\d&#;\d]+\d+|\d+..\d+)(?: \([a-zA-Z\s]+\) )(?:s\d+e\d+)?[ ]?(?:[&#\d;|.{3}]+)(?P<title2>[^&#\d;|^.{3}]+)(?:|.+?))<'
|
||||
else:
|
||||
patron = r'<div class="featured-thumb"> <a href="(?P<url>[^"]+)" title="(?:(?P<title>.+?)[ ]?(?P<episode>\d+×\d+).+?“(?P<title2>.+?)”).+?">'
|
||||
patronBlock = r'<main id="main" class="site-main" role="main">(?P<block>.*?)<nav class="navigation pagination" role="navigation">'
|
||||
patronBlock = r'<main id="main"[^>]+>(?P<block>.*?)<div id="secondary'
|
||||
|
||||
patronNext = '<a class="next page-numbers" href="(.*?)">Successivi'
|
||||
|
||||
|
||||
@@ -402,16 +402,16 @@ def thumb(itemlist=[], genre=False, thumb=''):
|
||||
if genre == False:
|
||||
|
||||
for thumb, titles in icon_dict.items():
|
||||
if any( word in item.title.lower().split() for word in search):
|
||||
if any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in search):
|
||||
thumb = 'search'
|
||||
for suffix, titles in search_suffix.items():
|
||||
if any( word in item.title.lower().split() for word in titles ):
|
||||
if any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
thumb = thumb + suffix
|
||||
item.thumbnail = get_thumb(thumb + '.png')
|
||||
elif any( word in item.title.lower().split() for word in titles ):
|
||||
elif any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
if thumb == 'channels_movie' or thumb == 'channels_tvshow':
|
||||
for suffix, titles in suffix_dict.items():
|
||||
if any( word in item.title.lower().split() for word in titles ):
|
||||
if any( word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
thumb = thumb + suffix
|
||||
item.thumbnail = get_thumb(thumb + '.png')
|
||||
else: item.thumbnail = get_thumb(thumb + '.png')
|
||||
@@ -420,7 +420,7 @@ def thumb(itemlist=[], genre=False, thumb=''):
|
||||
|
||||
else:
|
||||
for thumb, titles in icon_dict.items():
|
||||
if any(word in item.title.lower().split() for word in titles ):
|
||||
if any(word in re.split(r'\.|\{|\}|\[|\]|\(|\)| ',item.title.lower()) for word in titles ):
|
||||
item.thumbnail = get_thumb(thumb + '.png')
|
||||
else:
|
||||
thumb = item.thumbnails
|
||||
|
||||
@@ -713,42 +713,42 @@ def typo(string, typography=''):
|
||||
# If there are no attributes, it applies the default ones
|
||||
attribute = ['[]','()','{}','submenu','color','bold','italic','_','--','[B]','[I]','[COLOR]']
|
||||
|
||||
movie_word_list = ['film', 'serie', 'tv', 'anime', 'cinema', 'sala']
|
||||
search_word_list = ['cerca']
|
||||
categories_word_list = ['genere', 'categoria', 'categorie', 'ordine', 'lettera', 'anno', 'alfabetico', 'a-z', 'menu']
|
||||
# movie_word_list = ['film', 'serie', 'tv', 'anime', 'cinema', 'sala']
|
||||
# search_word_list = ['cerca']
|
||||
# categories_word_list = ['genere', 'categoria', 'categorie', 'ordine', 'lettera', 'anno', 'alfabetico', 'a-z', 'menu']
|
||||
|
||||
if not any(word in string for word in attribute):
|
||||
if any(word in string.lower() for word in search_word_list):
|
||||
string = '[COLOR '+ kod_color +']' + string + '[/COLOR]'
|
||||
elif any(word in string.lower() for word in categories_word_list):
|
||||
string = ' > ' + string
|
||||
elif any(word in string.lower() for word in movie_word_list):
|
||||
string = '[B]' + string + '[/B]'
|
||||
# if not any(word in string for word in attribute):
|
||||
# if any(word in string.lower() for word in search_word_list):
|
||||
# string = '[COLOR '+ kod_color +']' + string + '[/COLOR]'
|
||||
# elif any(word in string.lower() for word in categories_word_list):
|
||||
# string = ' > ' + string
|
||||
# elif any(word in string.lower() for word in movie_word_list):
|
||||
# string = '[B]' + string + '[/B]'
|
||||
|
||||
# Otherwise it uses the typographical attributes of the string
|
||||
else:
|
||||
if '[]' in string:
|
||||
string = '[' + re.sub(r'\s\[\]','',string) + ']'
|
||||
if '()' in string:
|
||||
string = '(' + re.sub(r'\s\(\)','',string) + ')'
|
||||
if '{}' in string:
|
||||
string = '{' + re.sub(r'\s\{\}','',string) + '}'
|
||||
if 'submenu' in string:
|
||||
string = u"\u2022\u2022 ".encode('utf-8') + re.sub(r'\ssubmenu','',string)
|
||||
if 'color' in string:
|
||||
color = scrapertoolsV2.find_single_match(string,'color ([a-z]+)')
|
||||
if color == 'kod' or '': color = kod_color
|
||||
string = '[COLOR '+ color +']' + re.sub(r'\scolor\s([a-z]+)','',string) + '[/COLOR]'
|
||||
if 'bold' in string:
|
||||
string = '[B]' + re.sub(r'\sbold','',string) + '[/B]'
|
||||
if 'italic' in string:
|
||||
string = '[I]' + re.sub(r'\sitalic','',string) + '[/I]'
|
||||
if '_' in string:
|
||||
string = ' ' + re.sub(r'\s_','',string)
|
||||
if '--' in string:
|
||||
string = ' - ' + re.sub(r'\s--','',string)
|
||||
if 'bullet' in string:
|
||||
string = '[B]' + u"\u2022".encode('utf-8') + '[/B] ' + re.sub(r'\sbullet','',string)
|
||||
# else:
|
||||
if '[]' in string:
|
||||
string = '[' + re.sub(r'\s\[\]','',string) + ']'
|
||||
if '()' in string:
|
||||
string = '(' + re.sub(r'\s\(\)','',string) + ')'
|
||||
if '{}' in string:
|
||||
string = '{' + re.sub(r'\s\{\}','',string) + '}'
|
||||
if 'submenu' in string:
|
||||
string = u"\u2022\u2022 ".encode('utf-8') + re.sub(r'\ssubmenu','',string)
|
||||
if 'color' in string:
|
||||
color = scrapertoolsV2.find_single_match(string,'color ([a-z]+)')
|
||||
if color == 'kod' or '': color = kod_color
|
||||
string = '[COLOR '+ color +']' + re.sub(r'\scolor\s([a-z]+)','',string) + '[/COLOR]'
|
||||
if 'bold' in string:
|
||||
string = '[B]' + re.sub(r'\sbold','',string) + '[/B]'
|
||||
if 'italic' in string:
|
||||
string = '[I]' + re.sub(r'\sitalic','',string) + '[/I]'
|
||||
if '_' in string:
|
||||
string = ' ' + re.sub(r'\s_','',string)
|
||||
if '--' in string:
|
||||
string = ' - ' + re.sub(r'\s--','',string)
|
||||
if 'bullet' in string:
|
||||
string = '[B]' + u"\u2022".encode('utf-8') + '[/B] ' + re.sub(r'\sbullet','',string)
|
||||
|
||||
return string
|
||||
|
||||
|
||||
@@ -24,10 +24,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
|
||||
if '/streaming.php' in page_url:
|
||||
code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1]
|
||||
logger.info('WCODE='+code)
|
||||
page_url = 'https://wstream.video/video.php?file_code=' + code
|
||||
|
||||
code = page_url.split('=')[-1]
|
||||
post = urllib.urlencode({'videox': code})
|
||||
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).data
|
||||
ID = scrapertools.find_single_match(data, r'''input\D*id=(?:'|")([^'"]+)(?:'|")''')
|
||||
post = urllib.urlencode({ID: code})
|
||||
|
||||
data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data
|
||||
headers.append(['Referer', page_url])
|
||||
|
||||
@@ -28,7 +28,6 @@ FOLDER_TVSHOWS = config.get_setting("folder_tvshows")
|
||||
TITLE_FILE = "[COLOR %s][%i%%][/COLOR] %s"
|
||||
TITLE_TVSHOW = "[COLOR %s][%i%%][/COLOR] %s [%s]"
|
||||
|
||||
|
||||
def mainlist(item):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
@@ -626,7 +625,7 @@ def download_from_best_server(item):
|
||||
|
||||
progreso.update(100, config.get_localized_string(70183), config.get_localized_string(70181) % len(play_items),
|
||||
config.get_localized_string(70182))
|
||||
|
||||
|
||||
if config.get_setting("server_reorder", "downloads") == 1:
|
||||
play_items.sort(key=sort_method)
|
||||
|
||||
@@ -634,7 +633,18 @@ def download_from_best_server(item):
|
||||
return {"downloadStatus": STATUS_CODES.canceled}
|
||||
|
||||
progreso.close()
|
||||
# if not config.get_setting("server_speed", "downloads"):
|
||||
# select = platformtools.dialog_select(config.get_localized_string(70192), [s.title for s in play_items])
|
||||
|
||||
# play_items[select] = item.clone(**play_items[select].__dict__)
|
||||
# play_items[select].contentAction = play_items[select].action
|
||||
# play_items[select].infoLabels = item.infoLabels
|
||||
# result = download_from_server(play_items[select])
|
||||
|
||||
# if progreso.iscanceled():
|
||||
# result["downloadStatus"] = STATUS_CODES.canceled
|
||||
|
||||
# else:
|
||||
# Recorremos el listado de servers, hasta encontrar uno que funcione
|
||||
for play_item in play_items:
|
||||
play_item = item.clone(**play_item.__dict__)
|
||||
@@ -710,7 +720,6 @@ def start_download(item):
|
||||
# No tenemos server, necesitamos buscar el mejor
|
||||
else:
|
||||
ret = download_from_best_server(item)
|
||||
update_json(item.path, ret)
|
||||
return ret["downloadStatus"]
|
||||
|
||||
|
||||
@@ -830,7 +839,7 @@ def save_download(item):
|
||||
item.contentAction = item.from_action if item.from_action else item.action
|
||||
|
||||
if item.contentType in ["tvshow", "episode", "season"]:
|
||||
if 'download' in item and config.get_setting('show_seasons',item.channel) == False:
|
||||
if ('download' in item and item.channel != 'community') or (item.channel == 'community' and config.get_setting('show_seasons',item.channel) == False):
|
||||
heading = config.get_localized_string(70594) # <- Enter the season number
|
||||
item.dlseason = platformtools.dialog_numeric(0, heading, '')
|
||||
if item.dlseason:
|
||||
|
||||
Reference in New Issue
Block a user