Revert "Created branch develop"

This commit is contained in:
Alfa
2017-08-13 11:21:50 +02:00
committed by GitHub
parent 8000a6fd25
commit e549d644a9
395 changed files with 1849 additions and 10246 deletions
+7 -6
View File
@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
from core import httptools
from core import scrapertools
from platformcode import logger
import re
from core import logger
from core import scrapertools
from core import httptools
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
@@ -15,14 +16,14 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if not page_url.endswith("/config"):
page_url = scrapertools.find_single_match(page_url, ".*?video/[0-9]+")
data = httptools.downloadpage(page_url, headers=headers).data
patron = 'mime":"([^"]+)"'
data = httptools.downloadpage(page_url, headers = headers).data
patron = 'mime":"([^"]+)"'
patron += '.*?url":"([^"]+)"'
patron += '.*?quality":"([^"]+)"'
match = scrapertools.find_multiple_matches(data, patron)
for mime, media_url, calidad in match:
title = "%s (%s) [vimeo]" % (mime.replace("video/", "."), calidad)
video_urls.append([title, media_url, int(calidad.replace("p", ""))])
video_urls.append([title, media_url, int(calidad.replace("p",""))])
video_urls.sort(key=lambda x: x[2])
for video_url in video_urls: