Varios 2
danimados: agregado buscador del canal sipeliculas: fix play megadrive: nuevo server
This commit is contained in:
Executable → Regular
+7
-10
@@ -4,18 +4,14 @@
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://tusfiles.org/\\?([A-z0-9]+)",
|
||||
"url": "http://tusfiles.org/?\\1/"
|
||||
},
|
||||
{
|
||||
"pattern": "tusfiles.net/(?:embed-|)([A-z0-9]+)",
|
||||
"url": "http://tusfiles.net/\\1"
|
||||
"pattern": "megadrive.co/embed/([A-z0-9]+)",
|
||||
"url": "https://megadrive.co/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "tusfiles",
|
||||
"name": "tusfiles",
|
||||
"id": "megadrive",
|
||||
"name": "megadrive",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
@@ -41,5 +37,6 @@
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s8.postimg.cc/kr5olxmad/megadrive1.png"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "no longer exists" in data or "to copyright issues" in data:
|
||||
return False, "[Megadrive] El video ha sido borrado"
|
||||
if "please+try+again+later." in data:
|
||||
return False, "[Megadrive] Error de Megadrive, no se puede generar el enlace al video"
|
||||
if "File has been removed due to inactivity" in data:
|
||||
return False, "[Megadrive] El archivo ha sido removido por inactividad"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
video_urls = []
|
||||
videourl = scrapertools.find_single_match(data, "<source.*?src='([^']+)")
|
||||
video_urls.append([".MP4 [megadrive]", videourl])
|
||||
|
||||
return video_urls
|
||||
Reference in New Issue
Block a user