@@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
from core import httptools
|
from core import httptools
|
||||||
from core import scrapertools
|
from core import scrapertools
|
||||||
from platformcode import logger
|
|
||||||
from lib import jsunpack
|
from lib import jsunpack
|
||||||
|
from platformcode import logger, config
|
||||||
|
|
||||||
|
|
||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
data = httptools.downloadpage(page_url).data
|
data = httptools.downloadpage(page_url).data
|
||||||
if "File Not Found" in data or "File was deleted" in data:
|
if "File Not Found" in data:
|
||||||
return False, "[clipwatching] El video ha sido borrado"
|
return False, config.get_localized_string(70292) % "ClipWatching"
|
||||||
return True, ""
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
@@ -23,6 +23,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
|
|||||||
videos = scrapertools.find_multiple_matches(unpacked, 'file:"([^"]+).*?label:"([^"]+)')
|
videos = scrapertools.find_multiple_matches(unpacked, 'file:"([^"]+).*?label:"([^"]+)')
|
||||||
for video, label in videos:
|
for video, label in videos:
|
||||||
video_urls.append([label + " [clipwatching]", video])
|
video_urls.append([label + " [clipwatching]", video])
|
||||||
logger.info("Url: %s" %videos)
|
logger.info("Url: %s" % videos)
|
||||||
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
|
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|||||||
Reference in New Issue
Block a user