From 986d6e63eab8f09842036bfcde438a9af574bd9c Mon Sep 17 00:00:00 2001
From: mac12m99 <10120390+mac12m99@users.noreply.github.com>
Date: Sat, 5 Jun 2021 17:13:00 +0200
Subject: [PATCH] =?UTF-8?q?fix=20buckler.link,=20novit=C3=A0=20tantifilm?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
channels/tantifilm.py | 2 +-
lib/unshortenit.py | 2 +-
servers/youdbox.py | 14 +++++++++++---
3 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/channels/tantifilm.py b/channels/tantifilm.py
index 75c03936..70b531ad 100644
--- a/channels/tantifilm.py
+++ b/channels/tantifilm.py
@@ -133,7 +133,7 @@ def search(item, texto):
@support.scrape
def newest(categoria):
if categoria == 'series':
- item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv-2')
+ item = Item(url=host + '/aggiornamenti-giornalieri-serie-tv')
data = support.match(item).data.replace('','').replace('','')
item.contentType = 'episode'
patronBlock = r'Aggiornamenti Giornalieri Serie TV.*?
(?P.*?)
'
diff --git a/lib/unshortenit.py b/lib/unshortenit.py
index fdd062e6..a748ed01 100644
--- a/lib/unshortenit.py
+++ b/lib/unshortenit.py
@@ -557,7 +557,7 @@ class UnshortenIt(object):
if not link:
link = re.findall('action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">', r.data)
if not link:
- link = scrapertools.find_single_match(r.data, r'a href="([^"]+)')
+ link = scrapertools.find_single_match(r.data, '\$\("a\.redirect"\)\.attr\("href",\s*"(http[^"]+)')
if link:
uri = link
short = re.findall('^https?://.*?(https?://.*)', uri)
diff --git a/servers/youdbox.py b/servers/youdbox.py
index 5cb09722..55e9c17b 100644
--- a/servers/youdbox.py
+++ b/servers/youdbox.py
@@ -2,20 +2,28 @@
# import re
from core import httptools
from core import scrapertools
-from platformcode import logger
+from platformcode import logger, config
import codecs
+def test_video_exists(page_url):
+ global data
+ data = httptools.downloadpage(page_url).data
+ if 'File was deleted' in data:
+ return False, config.get_localized_string(70449) % 'YouDbox'
+ return True
+
+
def get_video_url(page_url, video_password):
logger.info("(page_url='%s')" % page_url)
+ global data
video_urls = []
- data = httptools.downloadpage(page_url).data
list = scrapertools.find_single_match(data, 'var [a-zA-Z0-9]+ = ([^\]]+)').replace('[', '').replace('"', '').replace('\\x', '').replace(',', ' ')
list = list.split()[::-1]
url =""
for elem in list:
decoded = codecs.decode(elem, "hex")
url += decoded.decode("utf8")
- url= scrapertools.find_single_match(url, '