From a1be422ad61c527db0507e5ea9a6b57c0744f3bf Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 30 Apr 2020 21:02:17 +0200 Subject: [PATCH] filmpertutti: corretto scraper puntate (no 1x00) tantilm: corretta aggiunta in videoteca dalla ricerca --- channels/filmpertutti.py | 3 ++- channels/tantifilm.py | 5 ++++- core/support.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/channels/filmpertutti.py b/channels/filmpertutti.py index 8f8ffbe9..a5fc8c9f 100644 --- a/channels/filmpertutti.py +++ b/channels/filmpertutti.py @@ -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'.*?
  • (?P\d+)(?:×|×|x)(?P\d+)[^<]+<\/li>(?P.*?javascript:;">(?P[^<]+).*?</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: 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)' diff --git a/channels/tantifilm.py b/channels/tantifilm.py index e0cba0e1..9e6a3b7c 100644 --- a/channels/tantifilm.py +++ b/channels/tantifilm.py @@ -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>' diff --git a/core/support.py b/core/support.py index 2b8ac3d5..6d49baf8 100755 --- a/core/support.py +++ b/core/support.py @@ -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,