Merge pull request #565 from Intel11/master

Actualizados
This commit is contained in:
Alfa
2019-02-27 15:32:11 -05:00
committed by GitHub
43 changed files with 275 additions and 19 deletions

View File

@@ -144,10 +144,9 @@ def findvideos(data, skip=False):
for serverid in servers_list:
if not is_server_enabled(serverid):
continue
if config.get_setting("black_list", server=serverid):
if config.get_setting("filter_servers") == True and config.get_setting("black_list", server=serverid):
is_filter_servers = True
continue
devuelve.extend(findvideosbyserver(data, serverid))
if skip and len(devuelve) >= skip:
devuelve = devuelve[:skip]
@@ -166,7 +165,6 @@ def findvideosbyserver(data, serverid):
server_parameters = get_server_parameters(serverid)
devuelve = []
if "find_videos" in server_parameters:
# Recorre los patrones
for pattern in server_parameters["find_videos"].get("patterns", []):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "(https://(?:anonfile|bayfiles).com/\\w+)",
"url": "\\1"
}
]
},
"free": true,
"id": "anonfile",
"name": "anonfile",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "https://anonfile.com/img/logo/logo-anonfile.png"
}

View File

@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector anonfile By Alfa development Group
# --------------------------------------------------------
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)
response = httptools.downloadpage(page_url)
if not response.sucess or "Not Found" in response.data or "File was deleted" in response.data or "is no longer available" in response.data:
return False, "[anonfile] El fichero no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
patron = 'id="download-quality-(\w+).*?href="([^"]+)"'
match = scrapertools.find_multiple_matches(data, patron)
for calidad, media_url in match:
title = "%s [anonfile]" % (calidad)
video_urls.append([title, media_url, int(calidad.replace("p", ""))])
video_urls.sort(key=lambda x: x[2])
for video_url in video_urls:
video_url[2] = 0
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls

View File

@@ -4,7 +4,7 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "((?:fembed|divload).com/v/[A-z0-9]+)",
"pattern": "((?:fembed|divload).com/v/[A-z0-9_-]+)",
"url": "https://www.\\1"
}
]

View File

@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "(https://www.filepup.net/play/\\w+)",
"url": "\\1"
}
]
},
"free": true,
"id": "filepup",
"name": "filepup",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "http://static.filepup.net/fplogoV2s.png"
}

View File

@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector filepup By Alfa development Group
# --------------------------------------------------------
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)
response = httptools.downloadpage(page_url)
if "File was deleted" in response.data or "is no longer available" in response.data:
return False, "[filepup] El fichero no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
page_url = page_url.replace("https","http") + "?wmode=transparent"
data = httptools.downloadpage(page_url).data
media_url = scrapertools.find_single_match(data, 'src: "([^"]+)"')
qualities = scrapertools.find_single_match(data, 'qualities: (\[.*?\])')
qualities = scrapertools.find_multiple_matches(qualities, ' "([^"]+)')
for calidad in qualities:
media = media_url
title = "%s [filepup]" % (calidad)
if "480" not in calidad:
med = media_url.split(".mp4")
media = med[0] + "-%s.mp4" %calidad + med[1]
media += "|Referer=%s" %page_url
media += "&User-Agent=" + httptools.get_user_agent()
video_urls.append([title, media, int(calidad.replace("p", ""))])
video_urls.sort(key=lambda x: x[2])
for video_url in video_urls:
video_url[2] = 0
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls

View File

@@ -0,0 +1,42 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "(https://nofile.io/f/\\w+)",
"url": "\\1"
}
]
},
"free": true,
"id": "nofile",
"name": "nofile",
"settings": [
{
"default": false,
"enabled": true,
"id": "black_list",
"label": "@60654",
"type": "bool",
"visible": true
},
{
"default": 0,
"enabled": true,
"id": "favorites_servers_list",
"label": "@60655",
"lvalues": [
"No",
"1",
"2",
"3",
"4",
"5"
],
"type": "list",
"visible": false
}
],
"thumbnail": "https://nofile.io/img/icons/icon-128.png"
}

View File

@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector nofile By Alfa development Group
# --------------------------------------------------------
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)
response = httptools.downloadpage(page_url)
if not response.sucess or "Not Found" in response.data or "File was deleted" in response.data or "is no longer available" in response.data:
return False, "[nofile] El fichero no existe o ha sido borrado"
return True, ""
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
data = httptools.downloadpage(page_url).data
url = scrapertools.find_single_match(data, '<source src="([^"]+)')
url = httptools.downloadpage("https://nofile.io" + url, follow_redirects=False, only_headers=True).headers.get("location", "")
title = "mp4 [nofile]"
video_urls.append([title, url])
return video_urls

View File

@@ -4,12 +4,12 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "/video_ext.php\\?oid=([^&]+)(?:&||)id=([^&]+)(?:&||)hash=([a-z0-9]+)",
"url": "http://vk.com/video_ext.php?oid=\\1=\\2=\\3"
"pattern": "/video_ext.php\\?oid=([^&]+)(?:&|)id=([^&]+)(?:&|)hash=([a-z0-9]+)",
"url": "https://vk.com/video_ext.php?oid=\\1&id=\\2&hash=\\3"
},
{
"pattern": "(vk\\.[a-z]+\\/video[0-9]+_[0-9]+)",
"url": "http://\\1"
"url": "https://\\1"
}
]
},
@@ -17,6 +17,21 @@
"id": "vk",
"name": "vk",
"settings": [
{
"id": "vkemail",
"type": "text",
"label": "E-mail",
"enabled": true,
"visible": true
},
{
"id": "vkpassword",
"type": "text",
"hidden": true,
"label": "@30015",
"enabled": "!eq(-1,'')",
"visible": true
},
{
"default": false,
"enabled": true,

View File

@@ -1,15 +1,17 @@
# -*- coding: utf-8 -*-
import urllib
from core import httptools
from core import scrapertools
from platformcode import logger
from platformcode import config, logger
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
if not login():
return False, "Falta Ingresar/Actualizar las credenciales en el servidor vk. Configuracion - Preferencias - Ajustes de servidores - Configuración del servidor vk"
data = httptools.downloadpage(page_url).data
if "This video has been removed from public access" in data or "Video not found." in data:
return False, "El archivo ya no esta disponible<br/>en VK (ha sido borrado)"
return True, ""
@@ -19,17 +21,29 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("(page_url='%s')" % page_url)
video_urls = []
try:
oid, id = scrapertools.find_single_match(page_url, 'oid=([^&]+)&id=(\d+)')
except:
oid, id = scrapertools.find_single_match(page_url, 'video(\d+)_(\d+)')
headers = {'User-Agent': 'Mozilla/5.0'}
url = "http://vk.com/al_video.php?act=show_inline&al=1&video=%s_%s" % (oid, id)
data = httptools.downloadpage(url, headers=headers).data
data = httptools.downloadpage(page_url).data
matches = scrapertools.find_multiple_matches(data, '<source src="([^"]+)" type="video/(\w+)')
for media_url, ext in matches:
calidad = scrapertools.find_single_match(media_url, '(\d+)\.%s' % ext)
video_urls.append(["." + ext + " [vk:" + calidad + "]", media_url])
video_urls.append([calidad + "p ." + ext + " [vk]", media_url])
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))
return video_urls
def login():
data = httptools.downloadpage("https://vk.com").data
if "data-href" in data:
return True
ip_h = scrapertools.find_single_match(data, 'ip_h=(\w+)')
lg_h = scrapertools.find_single_match(data, 'lg_h=(\w+)')
vkemail = config.get_setting("vkemail",server="vk")
vkpassword = config.get_setting("vkpassword",server="vk")
post = {"act":"login","role":"al_frame","expire":"","recaptcha":"","captcha_sid":"","captcha_key":"","_origin":"https://vk.com","email":vkemail,"pass":vkpassword, "ip_h":ip_h, "lg_h":lg_h}
url = "https://login.vk.com/?act=login"
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True, post=urllib.urlencode(post)).headers.get("location", "")
data = httptools.downloadpage(url).data
if "name: " not in data:
return False
return True

View File

@@ -19,7 +19,8 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.info("url = " + page_url)
data = httptools.downloadpage(page_url).data
headers = {"Referer":page_url}
data = httptools.downloadpage(page_url, headers=headers).data
flowplayer = re.search("url: [\"']([^\"']+)", data)
if flowplayer:
return [["FLV", flowplayer.group(1)]]
@@ -37,6 +38,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug(strResult)
videoSources = re.findall("<source[\s]+src=[\"'](?P<url>[^\"']+)[^>]+label=[\"'](?P<label>[^\"']+)", strResult)
for url, label in videoSources:
url += "|Referer=%s" %page_url
video_urls.append([label, url])
video_urls.sort(key=lambda i: int(i[0].replace("p","")))
except: