Fix Turbovid
This commit is contained in:
@@ -37,6 +37,7 @@ class UnshortenIt(object):
|
||||
_rapidcrypt_regex = r'rapidcrypt\.net'
|
||||
_cryptmango_regex = r'cryptmango|xshield\.net'
|
||||
_vcrypt_regex = r'vcrypt\.net'
|
||||
_linkup_regex = r'linkup\.pro'
|
||||
|
||||
_maxretries = 5
|
||||
|
||||
@@ -78,6 +79,8 @@ class UnshortenIt(object):
|
||||
return self._unshorten_cryptmango(uri)
|
||||
if re.search(self._vcrypt_regex, uri, re.IGNORECASE):
|
||||
return self._unshorten_vcrypt(uri)
|
||||
if re.search(self._linkup_regex, uri, re.IGNORECASE):
|
||||
return self._unshorten_linkup(uri)
|
||||
|
||||
return uri, 0
|
||||
|
||||
@@ -513,7 +516,15 @@ class UnshortenIt(object):
|
||||
return uri, r.code if r else 200
|
||||
except Exception as e:
|
||||
return uri, str(e)
|
||||
|
||||
|
||||
|
||||
def _unshorten_linkup(self, uri):
|
||||
try:
|
||||
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
||||
return r.url, r.code
|
||||
|
||||
except Exception as e:
|
||||
return uri, str(e)
|
||||
|
||||
def unwrap_30x_only(uri, timeout=10):
|
||||
unshortener = UnshortenIt()
|
||||
|
||||
@@ -49,7 +49,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
elif 'vcrypt.net' in url:
|
||||
if 'myfoldersakstream.php' in url or '/verys/' in url:
|
||||
continue
|
||||
else:
|
||||
else:
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
||||
@@ -63,9 +63,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
data = scrapertoolsV2.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
|
||||
# logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
|
||||
data = httptools.downloadpage(data, follow_redirect=True).url
|
||||
if '/speedx/' in data: # aggiunto per server speedvideo
|
||||
data = data.replace('http://linkup.pro/speedx', 'http://speedvideo.net')
|
||||
data = data.replace('http://linkup.pro/speedx', 'http://speedvideo.net')
|
||||
# fix by greko fine
|
||||
else:
|
||||
data = ""
|
||||
@@ -90,7 +91,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
for url in matches:
|
||||
if url not in encontrados:
|
||||
if 'https://rapidcrypt.net/open/' in url or 'https://rapidcrypt.net/verys/' in url:
|
||||
continue
|
||||
continue
|
||||
logger.info(" url=" + url)
|
||||
encontrados.add(url)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
},
|
||||
"free": true,
|
||||
"id": "turbovid",
|
||||
"name": "turbovid",
|
||||
"name": "Turbovid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
@@ -38,5 +38,5 @@
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://turbovid.me/img/logo.png"
|
||||
"thumbnail": "server_turbovid.png"
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@ def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Not Found" in data or "File Does not Exist" in data:
|
||||
return False, "[turbovid.me] El fichero no existe o ha sido borrado"
|
||||
return False, config.get_localized_string(70449) % "Turbovid"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password="", server='turbovid'):
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password="", server='Turbovid'):
|
||||
|
||||
logger.info("(turbovid page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
@@ -28,8 +28,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
time.sleep(6)
|
||||
data = httptools.downloadpage(page_url_post, post=post).data
|
||||
logger.info("(data page_url='%s')" % data)
|
||||
sources = scrapertools.find_single_match(data, 'sources: \[([^\]]+)\]')
|
||||
|
||||
sources = scrapertools.find_single_match(data, r'sources: \[([^\]]+)\]')
|
||||
|
||||
for media_url in scrapertools.find_multiple_matches(sources, '"([^"]+)"'):
|
||||
media_url = media_url.replace('https:', 'http:')
|
||||
ext = scrapertools.get_filename_from_url(media_url)[-4:]
|
||||
|
||||
Reference in New Issue
Block a user