Altro Fix Wstream

This commit is contained in:
Alhaziel01
2019-11-23 15:38:23 +01:00
parent d33fdfd4ba
commit 1ed7dfd34a
2 changed files with 8 additions and 4 deletions

View File

@@ -7,8 +7,12 @@
"find_videos": {
"patterns": [
{
"pattern": "wstream\\.video.*?(?<!api)(?:=|/)(?:embed-)?([a-z0-9A-Z]+)(?:[^/_.a-z0-9A-Z]|$|\\.)",
"pattern": "wstream\\.video.*?(?<!api)(?:=|/)(?:embed-)?([a-z0-9A-Z]+)(?:[^/_.a-z0-9A-Z]|$)",
"url": "https://wstream.video/video.php?file_code=\\1"
},
{
"pattern": "wstream\\.video/([a-zA-Z0-9/]+.html)",
"url": "https://wstream.video/\\1"
}
],
"ignore_urls": []

View File

@@ -22,11 +22,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.info("[Wstream] url=" + page_url)
video_urls = []
if '/streaming.php' in page_url:
code = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).headers['location'].split('/')[-1]
if '/streaming.php' in page_url or 'html' 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
code = page_url.split('=')[-1]
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=False).data
ID = scrapertools.find_single_match(data, r'''input\D*id=(?:'|")([^'"]+)(?:'|")''')