Fix Eurostreaming
This commit is contained in:
+13
-59
@@ -3,16 +3,8 @@
|
|||||||
# Canale per Eurostreaming
|
# Canale per Eurostreaming
|
||||||
# by Greko
|
# 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):
|
from core import httptools, support
|
||||||
- serie, anime
|
|
||||||
"""
|
|
||||||
import re
|
|
||||||
from core import scrapertools, httptools, support
|
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
|
|
||||||
def findhost():
|
def findhost():
|
||||||
@@ -24,7 +16,6 @@ host = support.config.get_channel_url(findhost)
|
|||||||
headers = [['Referer', host]]
|
headers = [['Referer', host]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
list_servers = ['akstream', 'wstream', 'mixdrop', 'vidtome', 'turbovid', 'speedvideo', 'flashx', 'nowvideo', 'deltabit']
|
list_servers = ['akstream', 'wstream', 'mixdrop', 'vidtome', 'turbovid', 'speedvideo', 'flashx', 'nowvideo', 'deltabit']
|
||||||
list_quality = ['default']
|
list_quality = ['default']
|
||||||
|
|
||||||
@@ -33,14 +24,10 @@ def mainlist(item):
|
|||||||
support.log()
|
support.log()
|
||||||
|
|
||||||
|
|
||||||
tvshow = [''
|
tvshow = []
|
||||||
]
|
anime = ['/category/anime-cartoni-animati/']
|
||||||
anime = ['/category/anime-cartoni-animati/'
|
mix = [('Aggiornamenti bullet bold {TV}', ['/aggiornamento-episodi/', 'peliculas', 'newest']),
|
||||||
]
|
('Archivio bullet bold {TV}', ['/category/serie-tv-archive/', 'peliculas'])]
|
||||||
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 = ''
|
search = ''
|
||||||
|
|
||||||
return locals()
|
return locals()
|
||||||
@@ -48,64 +35,32 @@ def mainlist(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def peliculas(item):
|
def peliculas(item):
|
||||||
support.log()
|
|
||||||
#findhost()
|
|
||||||
action = 'episodios'
|
action = 'episodios'
|
||||||
if item.args == 'newest':
|
if item.args == 'newest':
|
||||||
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?)[^âÂÂâ][\s]*<a href="(?P<url>[^"]+)"[^>]*> ?(?P<episode>\d+x\d+-\d+|\d+x\d+) .*?[ ]?\(?(?P<lang>SUB ITA)?\)?</a>'
|
patron = r'<span class="serieTitle" style="font-size:20px">(?P<title>.*?)[^âÂÂâ][\s]*<a href="(?P<url>[^"]+)"[^>]*> ?(?P<episode>\d+x\d+-\d+|\d+x\d+) .*?[ ]?\(?(?P<lang>SUB ITA)?\)?</a>'
|
||||||
pagination = ''
|
pagination = ''
|
||||||
else:
|
else:
|
||||||
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
patron = r'<div class="post-thumb">.*?\s<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)\s?(?: Serie Tv)?\s?\(?(?P<year>\d{4})?\)?<\/a><\/h2>'
|
||||||
patronNext='a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
patronNext=r'a class="next page-numbers" href="?([^>"]+)">Avanti »</a>'
|
||||||
|
|
||||||
# debug = True
|
|
||||||
return locals()
|
return locals()
|
||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
support.log("episodios: %s" % item)
|
data = support.match(item, headers=headers).data
|
||||||
#findhost()
|
if 'clicca qui per aprire' in data.lower(): data = support.match(support.match(data, patron=r'"go_to":"([^"]+)"').match.replace('\\',''), headers=headers).data
|
||||||
|
elif 'clicca qui</span>' in data.lower(): data = support.match(support.match(data, patron=r'<h2 style="text-align: center;"><a href="([^"]+)">').match, headers=headers).data
|
||||||
action = 'findvideos'
|
|
||||||
item.contentType = 'tvshow'
|
|
||||||
# Carica la pagina
|
|
||||||
data1 = pagina(item.url)
|
|
||||||
data1 = re.sub('\n|\t', ' ', data1)
|
|
||||||
data = re.sub(r'>\s+<', '> <', data1)
|
|
||||||
#patronBlock = r'(?P<block>STAGIONE\s\d+ (.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
|
||||||
patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
|
||||||
#patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:–|-.+?-|â.+?â|â|.)?<a (?P<url>.*?)<br />'
|
patron = r'(?P<season>\d+)&#\d+;(?P<episode>\d+(?:-\d+)?)\s*(?:</strong>|<em>)?\s*(?P<title>.+?)(?:â|-.+?-|âÂÂ.+?âÂÂ|âÂÂ|em|.)?(?:/em.*?)?(?:<a (?P<url>.*?))?<br />'
|
||||||
patron = r'(?:\s|\Wn)?(?:<strong>|)?(?P<episode>\d+&#\d+;\d+-\d+|\d+&#\d+;\d+)(?:</strong>|)?(?P<title>.+?)(?:â|-.+?-|âÂÂ.+?âÂÂ|âÂÂ|.)?(?:<a (?P<url>.*?))?<br />'
|
|
||||||
|
|
||||||
def itemHook(item):
|
def itemHook(item):
|
||||||
if not item.url:
|
if not item.url:
|
||||||
item.title += ' [B][COLOR red]### NO LINK ###[/COLOR][/B]'
|
item.url =''
|
||||||
return item
|
return item
|
||||||
|
|
||||||
#support.regexDbg(item, patronBlock, headers, data)
|
|
||||||
#debug = True
|
|
||||||
return locals()
|
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 = scrapertools.find_single_match(data, '"go_to":"([^"]+)"')
|
|
||||||
url = url.replace("\\","")
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
|
|
||||||
|
|
||||||
elif 'clicca qui</span>' in data.lower():
|
|
||||||
url = scrapertools.find_single_match(data, '<h2 style="text-align: center;"><a href="([^"]+)">')
|
|
||||||
# Carica la pagina
|
|
||||||
data = httptools.downloadpage(url, headers=headers).data.replace("'", '"')
|
|
||||||
|
|
||||||
return data
|
|
||||||
|
|
||||||
# =========== def ricerca =============
|
|
||||||
def search(item, texto):
|
def search(item, texto):
|
||||||
support.log()
|
support.log()
|
||||||
|
|
||||||
@@ -122,7 +77,6 @@ def search(item, texto):
|
|||||||
support.log(line)
|
support.log(line)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# =========== def novità in ricerca globale =============
|
|
||||||
|
|
||||||
def newest(categoria):
|
def newest(categoria):
|
||||||
support.log()
|
support.log()
|
||||||
@@ -144,7 +98,7 @@ def newest(categoria):
|
|||||||
|
|
||||||
return itemlist
|
return itemlist
|
||||||
|
|
||||||
# =========== def findvideos =============
|
|
||||||
def findvideos(item):
|
def findvideos(item):
|
||||||
support.log('findvideos', item)
|
support.log()
|
||||||
return support.server(item, item.url)
|
return support.server(item, item.url)
|
||||||
|
|||||||
Reference in New Issue
Block a user