playview + servidores nuevos + fixes

This commit is contained in:
Unknown
2018-06-27 16:38:27 -03:00
parent 5945011c2f
commit cbc2804651
15 changed files with 845 additions and 3 deletions
+4 -1
View File
@@ -3,6 +3,7 @@
from core import httptools
from core import scrapertools
from platformcode import logger
from lib import jsunpack
def test_video_exists(page_url):
@@ -16,8 +17,10 @@ def test_video_exists(page_url):
def get_video_url(page_url, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
packed = scrapertools.find_single_match(data, "text/javascript'>(.*?)\s*</script>")
unpacked = jsunpack.unpack(packed)
video_urls = []
videos = scrapertools.find_multiple_matches(data, 'file:"([^"]+).*?label:"([^"]+)')
videos = scrapertools.find_multiple_matches(unpacked, 'file:"([^"]+).*?label:"([^"]+)')
for video, label in videos:
video_urls.append([label + " [clipwatching]", video])
logger.info("Url: %s" %videos)