Aggiunto canale tapmovie(sperimentale) e server annessi (hxfile, playtube, fix altri)

This commit is contained in:
mac12m99
2021-06-02 17:14:02 +02:00
parent 1393e46eb2
commit 53807e3c3c
12 changed files with 274 additions and 21 deletions
+25
View File
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
from core import httptools, scrapertools, servertools, support
from platformcode import logger, config
from lib import jsunpack
def test_video_exists(page_url):
logger.debug("(page_url='%s')" % page_url)
global data
data = httptools.downloadpage(page_url).data
if "Can't create video code" in data:
return False, config.get_localized_string(70292) % 'HxFile'
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.debug("url=" + page_url)
global data
video_urls = []
packed = scrapertools.find_single_match(data, r'(eval\s?\(function\(p,a,c,k,e,d\).*?\n)')
data = jsunpack.unpack(packed)
video_urls.extend(support.get_jwplayer_mediaurl(data, 'HxFile'))
return video_urls