ottimizzazione vcrypt e wstream
This commit is contained in:
@@ -51,7 +51,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
from lib import unshortenit
|
from lib import unshortenit
|
||||||
data, status = unshortenit.unshorten(url)
|
sh = unshortenit.UnshortenIt()
|
||||||
|
data, status = sh.unshorten(url)
|
||||||
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
logger.info("Data - Status zcrypt vcrypt.net: [%s] [%s] " %(data, status))
|
||||||
elif 'linkup' in url or 'bit.ly' in url:
|
elif 'linkup' in url or 'bit.ly' in url:
|
||||||
logger.info("DATA LINK {}".format(url))
|
logger.info("DATA LINK {}".format(url))
|
||||||
|
|||||||
+12
-13
@@ -13,6 +13,18 @@ def test_video_exists(page_url):
|
|||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
global data
|
global data
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
|
if '/streaming.php' in page_url in page_url:
|
||||||
|
code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1].replace('.html','')
|
||||||
|
logger.info('WCODE='+code)
|
||||||
|
page_url = 'https://wstream.video/video.php?file_code=' + code
|
||||||
|
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data
|
||||||
|
|
||||||
|
code = page_url.split('=')[-1]
|
||||||
|
ID = scrapertools.find_single_match(data, r'''input\D*id=(?:'|")([^'"]+)(?:'|")''')
|
||||||
|
post = urllib.urlencode({ID: code})
|
||||||
|
|
||||||
|
data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data
|
||||||
|
|
||||||
if "Not Found" in data or "File was deleted" in data:
|
if "Not Found" in data or "File was deleted" in data:
|
||||||
return False, config.get_localized_string(70449) % 'Wstream'
|
return False, config.get_localized_string(70449) % 'Wstream'
|
||||||
return True, ""
|
return True, ""
|
||||||
@@ -24,20 +36,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
video_urls = []
|
video_urls = []
|
||||||
global data
|
global data
|
||||||
|
|
||||||
if '/streaming.php' in page_url or 'html' in page_url:
|
|
||||||
try:
|
|
||||||
code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1].replace('.html','')
|
|
||||||
logger.info('WCODE='+code)
|
|
||||||
page_url = 'https://wstream.video/video.php?file_code=' + code
|
|
||||||
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True).data
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
|
|
||||||
code = page_url.split('=')[-1]
|
|
||||||
ID = scrapertools.find_single_match(data, r'''input\D*id=(?:'|")([^'"]+)(?:'|")''')
|
|
||||||
post = urllib.urlencode({ID: code})
|
|
||||||
|
|
||||||
data = httptools.downloadpage(page_url, headers=headers, post=post, follow_redirects=True).data
|
|
||||||
headers.append(['Referer', page_url])
|
headers.append(['Referer', page_url])
|
||||||
_headers = urllib.urlencode(dict(headers))
|
_headers = urllib.urlencode(dict(headers))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user