fix server VUP e vidtome

This commit is contained in:
mac12m99
2021-03-25 21:09:10 +01:00
parent 76a2637aa6
commit b0079b4d77
4 changed files with 38 additions and 34 deletions
+20 -18
View File
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from core import httptools, scrapertools
from core import httptools, scrapertools, support
from platformcode import logger, config
@@ -18,20 +18,22 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug("url=" + page_url)
video_urls = []
global data
patron = r'sources:\s*\[\{src:\s*"([^"]+)"'
matches = scrapertools.find_multiple_matches(data, patron)
if not matches:
data = scrapertools.find_single_match(data, r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
if data:
from lib import jsunpack
data = jsunpack.unpack(data)
matches = scrapertools.find_multiple_matches(data, patron)
for url in matches:
quality = 'm3u8'
video_url = url
if 'label' in url:
url = url.split(',')
video_url = url[0]
quality = url[1].replace('label:','')
video_urls.append(['VUP Player [%s]' % quality, video_url.replace(',','')])
return video_urls
return support.get_jwplayer_mediaurl(data, 'VUP')
# patron = r'sources:\s*\[\{src:\s*"([^"]+)"'
# matches = scrapertools.find_multiple_matches(data, patron)
# if not matches:
# data = scrapertools.find_single_match(data, r"<script type='text/javascript'>(eval.function.p,a,c,k,e,.*?)\s*</script>")
# if data:
# from lib import jsunpack
# data = jsunpack.unpack(data)
# matches = scrapertools.find_multiple_matches(data, patron)
# for url in matches:
# quality = 'm3u8'
# video_url = url
# if 'label' in url:
# url = url.split(',')
# video_url = url[0]
# quality = url[1].replace('label:','')
# video_urls.append(['VUP Player [%s]' % quality, video_url.replace(',','')])
# return video_urls