diff --git a/channels/eurostreaming_actor.py b/channels/eurostreaming_actor.py index d7caf826..2023b85b 100644 --- a/channels/eurostreaming_actor.py +++ b/channels/eurostreaming_actor.py @@ -31,9 +31,9 @@ def peliculas(item): patronNext = r'class="next".*?"(.+?)"' else: - patron = r'
.*?]+>(?P.+?)[\<]?[/(](?P<year>.*?)[\)|a]' + patron = r'<div class="post-thumb">.*?<img src="(?P<thumb>[^"]+)".*?><a href="(?P<url>[^"]+)"[^>]+>(?P<title>.+?)[\<]' patronNext = r'next.*?href="(.*?)"' - + # debug = True return locals() diff --git a/channels/filmpertutti.py b/channels/filmpertutti.py index c86b3823..1a2350b7 100644 --- a/channels/filmpertutti.py +++ b/channels/filmpertutti.py @@ -45,7 +45,7 @@ def peliculas(item): patronNext = r'<a href="([^"]+)[^>]+>Pagina' else: patronBlock = r'<ul class="posts">(?P<block>.*)<div class="clear[^"]*">' - patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>.+?)(?:\s\[(?P<quality>HD)\])?<\/div>\s*<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?' + patron = r'<li>\s?<a href="(?P<url>[^"]+)" data-thumbnail="(?P<thumb>[^"]+)">.*?<div class="title[^"]*">(?P<title>[^<]+?)(?:\s\[(?P<quality>HD)\])?(?:\s\((?P<year>[0-9]{4})\))?<\/div>.*?<div class="episode[^"]*"[^>]+>(?P<episode>[^<(]+)(?:\((?P<lang>[a-zA-Z\-]+)\))?' if item.args == 'search': action = 'check' diff --git a/channels/filmstreaming.json b/channels/filmstreaming.json index 54030798..33c72e49 100644 --- a/channels/filmstreaming.json +++ b/channels/filmstreaming.json @@ -2,7 +2,7 @@ "id": "filmstreaming", "name": "Film Streaming", "language": ["ita"], - "active": true, + "active": false, "thumbnail": "filmstreaming.png", "banner": "filmstreaming.png", "categories": ["movie"], diff --git a/lib/unshortenit.py b/lib/unshortenit.py index fcea078c..95885783 100644 --- a/lib/unshortenit.py +++ b/lib/unshortenit.py @@ -121,7 +121,7 @@ class UnshortenIt(object): logger.info(uri) - if originalUri == uri and logger.testMode: + if originalUri == uri and logger.testMode and code != 404: raise Exception('Not un-shortened link: ' + uri) return uri, code @@ -507,6 +507,8 @@ class UnshortenIt(object): html = r.data uri = re.findall(r'<iframe\s+src="([^"]+)', html)[0] + if not uri and 'Questo video รจ in conversione' in html: + return uri, 404 return uri, r.code diff --git a/servers/dropload.py b/servers/dropload.py index ae32b0e1..dea86c64 100644 --- a/servers/dropload.py +++ b/servers/dropload.py @@ -22,11 +22,10 @@ def test_video_exists(page_url): def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.debug(" url=" + page_url) - video_urls = [] global data - vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)') - if not vres: vres = scrapertools.find_multiple_matches(data, '<td>(\d+x\d+)') + # vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)') + # if not vres: vres = scrapertools.find_multiple_matches(data, '<td>(\d+x\d+)') data_pack = scrapertools.find_single_match(data, "</div>\n\s*<script[^>]+>(eval.function.p,a,c,k,e,.*?)\s*</script>") if data_pack != "": @@ -36,4 +35,4 @@ def get_video_url(page_url, premium=False, user="", password="", video_password= _headers = urllib.urlencode(httptools.default_headers) video_urls = support.get_jwplayer_mediaurl(data, 'dropload') - return sorted(video_urls, key=lambda x: int(x[0].split('x')[0])) if vres else video_urls + return video_urls diff --git a/tests/test_generic.py b/tests/test_generic.py index da6afc26..86c8178a 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -146,7 +146,8 @@ chNumRis = { def wait(): - time.sleep(random.randint(1, 3)) + pass + # time.sleep(random.randint(1, 3)) servers = [] @@ -202,7 +203,7 @@ for chItem in channel_list: for it2 in itemlist: # some sites refuse to search if the search term is too short title = it2.fulltitle if it2.contentType == 'movie' else it2.contentSerieName - if title > 5: + if len(title) > 5: firstContent = re.match('[ \w]*', title).group(0) break