ennesimo fix wstream per cambio di struttura

This commit is contained in:
mac12m99
2019-11-07 20:54:16 +01:00
committed by marco
parent e641856118
commit 4e78da1b6d
2 changed files with 12 additions and 3 deletions

View File

@@ -6,10 +6,14 @@
"thumbnail": "http:\/\/media.tvalacarta.info\/servers\/server_wstream.png",
"find_videos": {
"patterns": [
{
"pattern":"wstream.video\/(api\/vcmod\/fastredirect\/streaming.php\\?id=[0-9a-zA-Z]+)",
{
"pattern": "https://wstream.video/stream/switch_embed.php\\?file_code=([a-z0-9A-Z]+)",
"url": "https://wstream.video/video.php?file_code=\\1"
},
{
"pattern":"wstream.video\/api\/vcmod\/fastredirect\/streaming.php\\?id=([0-9a-zA-Z]+)",
"url": "https://wstream.video/api/vcmod/fastredirect/streaming.php?id=\\1"
},
{
"pattern": "wstream\\.video/video\\.php\\?file_code=([a-z0-9A-Z]+)",
"url": "https://wstream.video/video.php?file_code=\\1"
@@ -19,7 +23,7 @@
"url": "https://wstream.video/video.php?file_code=\\1"
},
{
"pattern": "wstream\\.video\/(?!api/)([a-z0-9A-Z]+)",
"pattern": "wstream\\.video/(?!api/|stream/)([a-z0-9A-Z]+)",
"url": "https://wstream.video/video.php?file_code=\\1"
}
],

View File

@@ -22,6 +22,11 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("[wstream.py] 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]
page_url = 'https://wstream.video/video.php?file_code=' + code
code = page_url.split('=')[-1]
post = urllib.urlencode({
'videox': code