# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Canale per Eurostreaming
# by Greko
# ------------------------------------------------------------
"""
Problemi noti da non considerare come errori nel test:
- Alcune sezioni di anime-cartoni non vanno:
- alcune hanno solo la lista degli episodi, ma non hanno link!
Novità(globale):
- serie, anime
"""
import re
from core import scrapertoolsV2, httptools, support
from core.item import Item
from platformcode import config
#impostati dinamicamente da findhost()
host = ""
headers = ""
def findhost():
global host, headers
permUrl = httptools.downloadpage('https://eurostreaming.link/', follow_redirects=False).headers
host = 'https://www.'+permUrl['location'].replace('https://www.google.it/search?q=site:', '')
headers = [['Referer', host]]
list_servers = ['verystream', 'wstream', 'speedvideo', 'flashx', 'nowvideo', 'streamango', 'deltabit', 'openload']
list_quality = ['default']
@support.menu
def mainlist(item):
support.log()
findhost()
tvshow = [''
]
anime = ['/category/anime-cartoni-animati/'
]
mix = [
(support.typo('Aggiornamenti Serie-Anime', 'bullet bold'), ['/aggiornamento-episodi/', 'peliculas', 'newest']),
(support.typo('Archivio Serie-Anime', 'bullet bold'), ['/category/serie-tv-archive/', 'peliculas'])
]
search = ''
return locals()
@support.scrape
def peliculas(item):
support.log()
#findhost()
action = 'episodios'
if item.args == 'newest':
#patron = r'(?P]+>(?P
'
patron = r'(?:\s|\Wn)?(?:|)?(?P
'
def itemHook(item):
if not item.url:
item.title += ' [B][COLOR red]### NO LINK ###[/COLOR][/B]'
return item
#support.regexDbg(item, patronBlock, headers, data)
#debug = True
return locals()
def pagina(url):
support.log(url)
#findhost()
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
#support.log("DATA ----###----> ", data)
if 'clicca qui per aprire' in data.lower():
url = scrapertoolsV2.find_single_match(data, '"go_to":"([^"]+)"')
url = url.replace("\\","")
# Carica la pagina
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
elif 'clicca qui