fix apri nel browser su alcuni canali

This commit is contained in:
marco
2020-10-24 13:17:59 +02:00
parent 11c943f917
commit c70aabdb33
3 changed files with 21 additions and 18 deletions

View File

@@ -42,16 +42,16 @@ def peliculas(item):
@support.scrape
def episodios(item):
# debug = True
data = support.match(item, headers=headers).data
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
patronBlock = r'</span>(?P<block>[a-zA-Z\s]+\d+(.+?)?(?:\()?(?P<lang>ITA|SUB ITA)(?:\))?.*?)</div></div>'
patron = r'(?P<season>\d+)&#\d+;(?P<episode>\d+(?:-\d+)?)\s*(?:</strong>|<em>)?\s*(?P<title>.+?)(?:–|-.+?-|–.+?–|–|em|.)?(?:/em.*?)?(?:<a (?P<url>.*?))?<br />'
patron = r'(?P<season>\d+)&#\d+;(?P<episode>\d+(?:-\d+)?)\s*(?:</strong>|<em>)?\s*(?P<title>.*?)(?:–|-.+?-|–.+?–|–|em|.)?(?:/em.*?)?(?:<a (?P<other>.*?))?<br />'
def itemHook(item):
if not item.url:
item.url = ''
return item
def itemHook(i):
i.url = item.url
return i
return locals()
@@ -96,4 +96,4 @@ def newest(categoria):
def findvideos(item):
support.info()
return support.server(item, item.url)
return support.server(item, item.other)

View File

@@ -71,12 +71,14 @@ def episodios(item):
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<0-9]*<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
else:
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?:&nbsp;|<strong>|<div class="addtoany)'
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
def itemHook(item):
item.title.replace('&#215;','x')
if not item.contentLanguage:
item.contentLanguage = 'ITA'
return item
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<]+(?P<other>.*?)(?:<br|</p)'
def itemHook(i):
i.url = item.url
i.title.replace('&#215;','x')
if not i.contentLanguage:
i.contentLanguage = 'ITA'
return i
return locals()
@@ -157,4 +159,4 @@ def findvideos(item):
data = httptools.downloadpage(item.url).data
return support.server(item, data=data, patronTag='Versione: <[^>]+>([^<]+)')
else:
return support.server(item, item.url)
return support.server(item, item.other)

View File

@@ -52,13 +52,14 @@ def episodios(item):
seasons = support.match(item, patron=r'<option value="(\d+)"[^>]*>\D+(\d+)').matches
patronBlock = r'</select><div style="clear:both"></div></h2>(?P<block>.*?)<div id="trailer" class="tab">'
patron = r'(?:<div class="list (?:active)?")?\s*<a data-id="\d+(?:[ ](?P<lang>[SuUbBiItTaA\-]+))?"(?P<other>[^>]+)>.*?Episodio [0-9]+\s?(?:<br>(?P<title>[^<]+))?.*?Stagione (?P<season>[0-9]+) , Episodio - (?P<episode>[0-9]+).*?<(?P<url>.*?<iframe)'
def itemHook(item):
def itemHook(i):
for value, season in seasons:
info(value)
info(season)
item.title = item.title.replace(value+'x',season+'x')
item.url += '\n' + item.other
return item
i.title = i.title.replace(value+'x',season+'x')
i.other += '\n' + i.url
i.url = item.url
return i
return locals()
@@ -110,7 +111,7 @@ def newest(categoria):
def findvideos(item):
info(item)
if item.args != 'update':
return support.server(item, data=item.url)
return support.server(item, data=item.other)
else:
itemlist = []
item.infoLabels['mediatype'] = 'episode'