risoluzioni in ordine per download a qualità massima

This commit is contained in:
Alhaziel
2019-11-20 21:16:15 +01:00
committed by marco
parent 87122f99c4
commit de759e2310
22 changed files with 87 additions and 48 deletions

View File

@@ -2,13 +2,13 @@
from core import httptools
from core import jsontools
from platformcode import logger
from platformcode import logger, config
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
if "Sorry 404 not found" in data:
return False, "[fembed] El fichero ha sido borrado"
return False, config.get_localized_string(70292) % "Fembed"
return True, ""
@@ -22,5 +22,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
for videos in data["data"]:
v = videos["file"]
if not v.startswith("http"): v = "https://www.fembed.com" + videos["file"]
video_urls.append([videos["label"] + " [fembed]", v])
video_urls.append([videos["label"] + " [Fembed]", v])
video_urls.sort(key=lambda x: x[0].split()[1])
return video_urls