diff --git a/channels/streamingaltadefinizione.py b/channels/streamingaltadefinizione.py
index 41b4b8e3..ffa7eaf9 100644
--- a/channels/streamingaltadefinizione.py
+++ b/channels/streamingaltadefinizione.py
@@ -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':
diff --git a/channels/vedohd.py b/channels/vedohd.py
index b5b30e7f..f5a43ca4 100644
--- a/channels/vedohd.py
+++ b/channels/vedohd.py
@@ -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):
diff --git a/core/support.py b/core/support.py
index b8550c67..1d79d976 100644
--- a/core/support.py
+++ b/core/support.py
@@ -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 = '(?P