filmpertutti: corretto scraper puntate (no 1x00)
tantilm: corretta aggiunta in videoteca dalla ricerca
This commit is contained in:
@@ -65,10 +65,11 @@ def peliculas(item):
|
|||||||
|
|
||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
|
# debug = True
|
||||||
data = support.match(item.url, headers=headers).data
|
data = support.match(item.url, headers=headers).data
|
||||||
if 'accordion-item' in 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)'
|
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+)(?:×|×|x)(?P<episode>\d+)[^<]+<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
|
patron = r'<img src="(?P<thumb>[^"]+)">.*?<li class="season-no">(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<0-9]*<\/li>(?P<url>.*?javascript:;">(?P<title>[^<]+).*?</tbody>)'
|
||||||
else:
|
else:
|
||||||
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?: |<strong>|<div class="addtoany)'
|
patronBlock = r'(?:STAGIONE|Stagione)(?:<[^>]+>)?\s*(?:(?P<lang>[A-Za-z- ]+))?(?P<block>.*?)(?: |<strong>|<div class="addtoany)'
|
||||||
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
|
patron = r'(?:/>|p>)\s*(?P<season>\d+)(?:×|×|x)(?P<episode>\d+)[^<]+(?P<url>.*?)(?:<br|</p)'
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ def episodios(item):
|
|||||||
else:
|
else:
|
||||||
data_check = item.data
|
data_check = item.data
|
||||||
patron_check = r'<iframe src="([^"]+)" scrolling="no" frameborder="0" width="626" height="550" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true">'
|
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>'
|
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>'
|
patron = r'<a href="(?P<url>[^"]+)"\s*>\s*<i[^>]+><\/i>\s*(?P<episode>\d+)<\/a>'
|
||||||
|
|||||||
+1
-1
@@ -1050,7 +1050,7 @@ def videolibrary(itemlist, item, typography='', function_level=1, function=''):
|
|||||||
if (function == 'findvideos' and contentType == 'movie') \
|
if (function == 'findvideos' and contentType == 'movie') \
|
||||||
or (function == 'episodios' and contentType != 'movie'):
|
or (function == 'episodios' and contentType != 'movie'):
|
||||||
if config.get_videolibrary_support() and len(itemlist) > 0:
|
if config.get_videolibrary_support() and len(itemlist) > 0:
|
||||||
from channelselector import get_thumb
|
from channelselector import get_thumb
|
||||||
itemlist.append(
|
itemlist.append(
|
||||||
Item(channel=item.channel,
|
Item(channel=item.channel,
|
||||||
title=title,
|
title=title,
|
||||||
|
|||||||
Reference in New Issue
Block a user