filmpertutti: corretto scraper puntate (no 1x00)

tantilm: corretta aggiunta in videoteca dalla ricerca
This commit is contained in:
marco
2020-04-30 21:02:17 +02:00
parent 8dbd81bb4c
commit a1be422ad6
3 changed files with 7 additions and 3 deletions

View File

@@ -65,10 +65,11 @@ def peliculas(item):
@support.scrape
def episodios(item):
# debug = True
data = support.match(item.url, headers=headers).data
if 'accordion-item' in data:
patronBlock = r'<span class="season[^>]*>\d+[^>]+>[^>]+>[^>]+>[^>]+>\D*(?:STAGIONE|Stagione)[ -]+(?P<lang>[a-zA-Z\- ]+)[^<]*</span>(?P<block>.*?)<div id="(?:season|disqus)'
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<season>\d+)(?:&#215;|×|x)(?P<episode>\d+)[^<]+<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
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)'

View File

@@ -80,7 +80,10 @@ def episodios(item):
else:
data_check = item.data
patron_check = r'<iframe src="([^"]+)" scrolling="no" frameborder="0" width="626" height="550" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">'
item.url = scrapertools.find_single_match(data_check, patron_check)
data = httptools.downloadpage(scrapertools.find_single_match(data_check, patron_check), headers=headers).data
data = data.replace("'", '"')
data = re.sub('\n|\t', ' ', data)
data = re.sub(r'>\s+<', '> <', data)
patronBlock = r'Stagioni<\/a>.*?<ul class="nav navbar-nav">(?P<block>.*?)<\/ul>'
patron = r'<a href="(?P<url>[^"]+)"\s*>\s*<i[^>]+><\/i>\s*(?P<episode>\d+)<\/a>'

View File

@@ -1050,7 +1050,7 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
if (function == 'findvideos' and contentType == 'movie') \
or (function == 'episodios' and contentType != 'movie'):
if config.get_videolibrary_support() and len(itemlist) > 0:
from channelselector import get_thumb
from channelselector import get_thumb
itemlist.append(
Item(channel=item.channel,
title=title,