fix streamingaltadefinizione (popcorn stream) e vedohd
This commit is contained in:
@@ -1,37 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Canale per Streaming Altadefinizione
|
||||
# Canale per Popcorn Stream
|
||||
# ------------------------------------------------------------
|
||||
"""
|
||||
Trasformate le sole def per support.menu e support.scrape
|
||||
da non inviare nel test.
|
||||
Test solo a trasformazione completa
|
||||
|
||||
"""
|
||||
|
||||
from core import support
|
||||
from core import support, httptools
|
||||
from core.item import Item
|
||||
from platformcode import config
|
||||
|
||||
__channel__ = "streamingaltadefinizione"
|
||||
host = config.get_channel_url(__channel__)
|
||||
# __channel__ = "streamingaltadefinizione"
|
||||
# host = config.get_channel_url(__channel__)
|
||||
|
||||
host = headers = ''
|
||||
list_servers = ['verystream', 'openload', 'wstream']
|
||||
list_quality = ['1080p', 'HD', 'DVDRIP', 'SD', 'CAM']
|
||||
|
||||
def findhost():
|
||||
global host, headers
|
||||
permUrl = httptools.downloadpage('https://www.popcornstream.info', follow_redirects=False).headers
|
||||
if 'google' in permUrl['location']:
|
||||
if host[:4] != 'http':
|
||||
host = 'https://'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
else:
|
||||
host = permUrl['location'].replace('https://www.google.it/search?q=site:', '')
|
||||
else:
|
||||
host = permUrl['location']
|
||||
headers = [['Referer', host]]
|
||||
|
||||
@support.menu
|
||||
def mainlist(item):
|
||||
findhost()
|
||||
film = ["/film/"]
|
||||
anime = ["/genere/anime/",
|
||||
('Film Anime', ["/genere/anime/", 'peliculas']),
|
||||
('Film Anime per genere', ["/genere/anime/", 'generos'])
|
||||
]
|
||||
anime = ["/genere/anime/"]
|
||||
tvshow = ["/serietv/"]
|
||||
top = [('Generi',['', 'generos'])]
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
def search(item, text):
|
||||
findhost()
|
||||
support.log("[streamingaltadefinizione.py] " + item.url + " search " + text)
|
||||
item.url = item.url + "/?s=" + text
|
||||
|
||||
@@ -48,15 +55,17 @@ def generos(item):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
support.dbg()
|
||||
return support.dooplay_peliculas(item, True if "/genere/anime/" in item.url else False)
|
||||
findhost()
|
||||
return support.dooplay_peliculas(item, True if "/genere/" in item.url else False)
|
||||
|
||||
|
||||
def episodios(item):
|
||||
findhost()
|
||||
return support.dooplay_get_episodes(item)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
findhost()
|
||||
itemlist = []
|
||||
for link in support.dooplay_get_links(item, host):
|
||||
if link['title'] != 'Guarda il trailer':
|
||||
|
||||
@@ -40,7 +40,7 @@ def search(item, text):
|
||||
|
||||
|
||||
def peliculas(item):
|
||||
return support.dooplay_peliculas(item, blacklist)
|
||||
return support.dooplay_peliculas(item, False, blacklist)
|
||||
|
||||
|
||||
def findvideos(item):
|
||||
|
||||
@@ -362,8 +362,8 @@ def scrape(func):
|
||||
headers = ''
|
||||
patronNext = args['patronNext'] if 'patronNext' in args else ''
|
||||
patronBlock = args['patronBlock'] if 'patronBlock' in args else ''
|
||||
typeActionDict = args['type_action_dict'] if 'type_action_dict' in args else {}
|
||||
typeContentDict = args['type_content_dict'] if 'type_content_dict' in args else {}
|
||||
typeActionDict = args['typeActionDict'] if 'typeActionDict' in args else {}
|
||||
typeContentDict = args['typeContentDict'] if 'typeContentDict' in args else {}
|
||||
debug = args['debug'] if 'debug' in args else False
|
||||
log('STACK= ', inspect.stack()[1][3])
|
||||
if 'pagination' in args and inspect.stack()[1][3] not in ['add_tvshow', 'get_episodes', 'update', 'find_episodes']: pagination = args['pagination'] if args['pagination'] else 20
|
||||
@@ -510,13 +510,17 @@ def dooplay_peliculas(item, mixed=False, blacklist=""):
|
||||
else:
|
||||
if item.contentType == 'movie':
|
||||
action = 'findvideos'
|
||||
patron = '<article id="post-[0-9]+" class="item movies">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?<span class="quality">(?P<quality>[^<>]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>[^<>]*(?P<year>[0-9]{4})</span>|</article>).*?(?:<span>(?P<duration>[0-9]+) min</span>|</article>).*?(?:<div class="texto">(?P<plot>[^<>]+)|</article>).*?(?:genres">(?P<genre>.*?)</div>|</article>)'
|
||||
patron = '<article id="post-[0-9]+" class="item movies">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?<span class="quality">(?P<quality>[^<>]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>[^<>]*(?P<year>[0-9]{4})</span>|</article>)'
|
||||
else:
|
||||
action = 'episodios'
|
||||
patron = '<article id="post-[0-9]+" class="item ' + ('\w+' if mixed else 'tvshow') + '">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?(?:<span class="quality">(?P<quality>[^<>]+))?.*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>(?P<year>[0-9]{4})</span>|</article>).*?(?:<div class="texto">(?P<plot>[^<>]+)|</article>).*?(?:genres">(?P<genre>.*?)</div>|</article>)'
|
||||
patron = '<article id="post-[0-9]+" class="item (?P<type>' + ('\w+' if mixed else 'tvshows') + ')">.*?<img src="(?!data)(?P<thumb>[^"]+)".*?(?:<span class="quality">(?P<quality>[^<>]+))?.*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a></h3>.*?(?:<span>(?P<year>[0-9]{4})</span>|</article>).*?(?:<div class="texto">(?P<plot>[^<>]+)|</article>).*?(?:genres">(?P<genre>.*?)</div>|</article>)'
|
||||
patronNext = '<div class="pagination">.*?class="current".*?<a href="([^"]+)".*?<div class="resppages">'
|
||||
addVideolibrary = False
|
||||
|
||||
if mixed:
|
||||
typeActionDict={'findvideos': ['movies'], 'episodios': ['tvshows']}
|
||||
typeContentDict={'film': ['movies'], 'serie': ['tvshows']}
|
||||
|
||||
return locals()
|
||||
|
||||
|
||||
@@ -524,6 +528,7 @@ def dooplay_peliculas(item, mixed=False, blacklist=""):
|
||||
def dooplay_search(item, blacklist=""):
|
||||
return dooplay_search_vars(item, blacklist)
|
||||
|
||||
|
||||
def dooplay_search_vars(item, blacklist):
|
||||
if item.contentType == 'movie':
|
||||
type = 'movies'
|
||||
@@ -534,12 +539,12 @@ def dooplay_search_vars(item, blacklist):
|
||||
patron = '<div class="result-item">.*?<img src="(?P<thumb>[^"]+)".*?<span class="' + type + '">(?P<quality>[^<>]+).*?<a href="(?P<url>[^"]+)">(?P<title>[^<>]+)</a>.*?<span class="year">(?P<year>[0-9]{4}).*?<div class="contenido"><p>(?P<plot>[^<>]+)'
|
||||
patronNext = '<a class="arrow_pag" href="([^"]+)"><i id="nextpagination"'
|
||||
|
||||
def fullItemlistHook(itemlist):
|
||||
# se è una next page
|
||||
if itemlist[-1].title == typo(config.get_localized_string(30992), 'color kod bold'):
|
||||
itemlist[-1].action = 'peliculas'
|
||||
itemlist[-1].args = 'searchPage'
|
||||
return itemlist
|
||||
# def fullItemlistHook(itemlist):
|
||||
# # se è una next page
|
||||
# if itemlist[-1].title == typo(config.get_localized_string(30992), 'color kod bold'):
|
||||
# itemlist[-1].action = 'peliculas'
|
||||
# itemlist[-1].args = 'searchPage'
|
||||
# return itemlist
|
||||
return locals()
|
||||
|
||||
def swzz_get_url(item):
|
||||
|
||||
Reference in New Issue
Block a user