updates
This commit is contained in:
Executable
+12
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Appends the main plugin dir to the PYTHONPATH if an internal package cannot be imported.
|
||||
# Examples: In Plex Media Server all modules are under "Code.*" package, and in Enigma2 under "Plugins.Extensions.*"
|
||||
try:
|
||||
# from core import logger
|
||||
import core
|
||||
except:
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "adnstream.com/video/([a-zA-Z]+)",
|
||||
"url": "http://www.adnstream.com/video/\\1/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "adnstream",
|
||||
"name": "adnstream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Saca el código del vídeo
|
||||
if page_url.startswith("http://"):
|
||||
try:
|
||||
code = scrapertools.get_match(page_url, "http\://www.adnstream.com/video/([a-zA-Z]+)/")
|
||||
except:
|
||||
code = scrapertools.get_match(page_url, "http\://www.adnstream.tv/video/([a-zA-Z]+)/")
|
||||
else:
|
||||
code = page_url
|
||||
|
||||
# Lee la playlist
|
||||
url = "http://www.adnstream.com/get_playlist.php?lista=video¶m=" + code + "&c=463"
|
||||
data = scrapertools.cache_page(url)
|
||||
|
||||
# Extrae la URL
|
||||
media_url = scrapertools.get_match(data, "<jwplayer:file>([^<]+)</jwplayer:file>")
|
||||
video_urls = [[scrapertools.get_filename_from_url(media_url)[-4:] + ' [adnstream]', media_url]]
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+80
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "04/06/2016",
|
||||
"description": "Reparado, utiliza proxy en caso que salte el geobloqueo"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [
|
||||
"http://allmyvideos.net/embed-theme.html",
|
||||
"http://allmyvideos.net/embed-jquery.html",
|
||||
"http://allmyvideos.net/embed-s.html",
|
||||
"http://allmyvideos.net/embed-images.html",
|
||||
"http://allmyvideos.net/embed-faq.html",
|
||||
"http://allmyvideos.net/embed-embed.html",
|
||||
"http://allmyvideos.net/embed-ri.html",
|
||||
"http://allmyvideos.net/embed-d.html",
|
||||
"http://allmyvideos.net/embed-css.html",
|
||||
"http://allmyvideos.net/embed-js.html",
|
||||
"http://allmyvideos.net/embed-player.html",
|
||||
"http://allmyvideos.net/embed-cgi.html",
|
||||
"http://allmyvideos.net/embed-i.html",
|
||||
"http://allmyvideos.net/images",
|
||||
"http://allmyvideos.net/theme",
|
||||
"http://allmyvideos.net/xupload",
|
||||
"http://allmyvideos.net/s",
|
||||
"http://allmyvideos.net/js",
|
||||
"http://allmyvideos.net/jquery",
|
||||
"http://allmyvideos.net/login",
|
||||
"http://allmyvideos.net/make",
|
||||
"http://allmyvideos.net/i",
|
||||
"http://allmyvideos.net/faq",
|
||||
"http://allmyvideos.net/tos",
|
||||
"http://allmyvideos.net/premium",
|
||||
"http://allmyvideos.net/checkfiles",
|
||||
"http://allmyvideos.net/privacy",
|
||||
"http://allmyvideos.net/refund",
|
||||
"http://allmyvideos.net/links",
|
||||
"http://allmyvideos.net/contact"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "allmyvideos.net/(?:embed-)?([a-z0-9]+)",
|
||||
"url": "http://allmyvideos.net/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "allmyvideos",
|
||||
"name": "allmyvideos",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_allmyvideos.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# No existe / borrado: http://allmyvideos.net/8jcgbrzhujri
|
||||
data = scrapertools.cache_page("http://anonymouse.org/cgi-bin/anon-www.cgi/" + page_url)
|
||||
if "<b>File Not Found</b>" in data or "<b>Archivo no encontrado</b>" in data or '<b class="err">Deleted' in data \
|
||||
or '<b class="err">Removed' in data or '<font class="err">No such' in data:
|
||||
return False, "No existe o ha sido borrado de allmyvideos"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=%s" % page_url)
|
||||
|
||||
# Normaliza la URL
|
||||
videoid = scrapertools.get_match(page_url, "http://allmyvideos.net/([a-z0-9A-Z]+)")
|
||||
page_url = "http://amvtv.net/embed-" + videoid + "-728x400.html"
|
||||
data = scrapertools.cachePage(page_url)
|
||||
if "Access denied" in data:
|
||||
geobloqueo = True
|
||||
else:
|
||||
geobloqueo = False
|
||||
|
||||
if geobloqueo:
|
||||
# url = "http://www.anonymousbrowser.xyz/hide.php"
|
||||
# post = "go=%s" % page_url
|
||||
url = "http://www.videoproxy.co/hide.php"
|
||||
post = "go=%s" % page_url
|
||||
location = scrapertools.get_header_from_response(url, post=post, header_to_get="location")
|
||||
# url = "http://www.anonymousbrowser.xyz/" + location
|
||||
url = "http://www.videoproxy.co/" + location
|
||||
data = scrapertools.cachePage(url)
|
||||
|
||||
# Extrae la URL
|
||||
media_url = scrapertools.find_single_match(data, '"file" : "([^"]+)",')
|
||||
|
||||
video_urls = []
|
||||
|
||||
if media_url != "":
|
||||
if geobloqueo:
|
||||
# url = "http://www.anonymousbrowser.xyz/hide.php"
|
||||
url = "http://www.videoproxy.co/hide.php"
|
||||
post = "go=%s" % media_url
|
||||
location = scrapertools.get_header_from_response(url, post=post, header_to_get="location")
|
||||
# media_url = "http://www.anonymousbrowser.xyz/" + location + "&direct=false"
|
||||
media_url = "http://www.videoproxy.co/" + location + "&direct=false"
|
||||
else:
|
||||
media_url += "&direct=false"
|
||||
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [allmyvideos]", media_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "21/03/2017",
|
||||
"description": "Conector corregido"
|
||||
},
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:embed.|)auroravid.to/(?:video/|embed/\\?v=)([A-z0-9]{13})",
|
||||
"url": "http://www.auroravid.to/embed/?v=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "auroravid",
|
||||
"name": "auroravid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "This file no longer exists on our servers" in data:
|
||||
return False, "[Auroravid] El fichero ha sido borrado"
|
||||
|
||||
elif "is being converted" in data:
|
||||
return False, "[Auroravid] El fichero está en proceso todavía"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
video_urls = []
|
||||
videourls = scrapertools.find_multiple_matches(data, 'src\s*:\s*[\'"]([^\'"]+)[\'"]')
|
||||
if not videourls:
|
||||
videourls = scrapertools.find_multiple_matches(data, '<source src=[\'"]([^\'"]+)[\'"]')
|
||||
for videourl in videourls:
|
||||
if videourl.endswith(".mpd"):
|
||||
id = scrapertools.find_single_match(videourl, '/dash/(.*?)/')
|
||||
videourl = "http://www.auroravid.to/download.php%3Ffile=mm" + "%s.mp4" % id
|
||||
|
||||
videourl = re.sub(r'/dl(\d)*/', '/dl/', videourl)
|
||||
ext = scrapertools.get_filename_from_url(videourl)[-4:]
|
||||
videourl = videourl.replace("%3F", "?") + \
|
||||
"|User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
|
||||
video_urls.append([ext + " [auroravid]", videourl])
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:backin).net/([A-Z0-9]+)",
|
||||
"url": "http://backin.net/s/generating.php?code=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "backin",
|
||||
"name": "backin",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
# if '<meta property="og:title" content=""/>' in data:
|
||||
# return False,"The video has been cancelled from Backin.net"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
headers = []
|
||||
headers.append(["User-Agent",
|
||||
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17"])
|
||||
|
||||
# First access
|
||||
data = scrapertools.cache_page(page_url, headers=headers)
|
||||
logger.info("data=" + data)
|
||||
|
||||
# URL
|
||||
url = scrapertools.find_single_match(data, 'type="video/mp4" src="([^"]+)"')
|
||||
logger.info("url=" + url)
|
||||
|
||||
# URL del vídeo
|
||||
video_urls.append([".mp4" + " [backin]", url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "bigfile.to/((?:list|file)/[\\w]+)",
|
||||
"url": "https://www.bigfile.to/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "bigfile",
|
||||
"name": "bigfile",
|
||||
"premium": [
|
||||
"realdebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
return video_urls
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(bitshare.com/files/[^/]+/[\\w.+\\-_]+)",
|
||||
"url": "http://\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(bitshare.com/files/[a-z0-9]+)[^/a-z0-9]",
|
||||
"url": "http://\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(bitshare.com/\\?f=[\\w+]+)",
|
||||
"url": "http://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "bitshare",
|
||||
"name": "bitshare",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+37
@@ -0,0 +1,37 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
ogger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Existe: http://bitshare.com/files/v1ehsvu3/Nikita.S02E15.HDTV.XviD-ASAP.avi.html
|
||||
# No existe: http://bitshare.com/files/tn74w9tm/Rio.2011.DVDRip.LATiNO.XviD.by.Glad31.avi.html
|
||||
data = scrapertools.cache_page(page_url)
|
||||
patron = '<h1>Descargando([^<]+)</h1>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
return True, ""
|
||||
|
||||
patron = '<h1>(Error - Archivo no disponible)</h1>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
return False, "File not found"
|
||||
|
||||
patron = '<b>(Por favor seleccione el archivo a cargar)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
return False, "Enlace no válido"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
return video_urls
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "21/03/2017",
|
||||
"description": "Conector corregido"
|
||||
},
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(http://www.(?:videoweed|bitvid)\\.[a-z]+/file/[a-zA-Z0-9]+)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(http://embed.(?:videoweed|bitvid)\\.[a-z]+/embed.php?v=[a-zA-Z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "bitvidsx",
|
||||
"name": "bitvidsx",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "This video is not yet ready" in data:
|
||||
return False, "[Bitvid] El fichero está en proceso todavía o ha sido eliminado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
video_urls = []
|
||||
videourls = scrapertools.find_multiple_matches(data, 'src\s*:\s*[\'"]([^\'"]+)[\'"]')
|
||||
if not videourls:
|
||||
videourls = scrapertools.find_multiple_matches(data, '<source src=[\'"]([^\'"]+)[\'"]')
|
||||
for videourl in videourls:
|
||||
if videourl.endswith(".mpd"):
|
||||
id = scrapertools.find_single_match(videourl, '/dash/(.*?)/')
|
||||
videourl = "http://www.bitvid.sx/download.php%3Ffile=mm" + "%s.mp4" % id
|
||||
|
||||
videourl = re.sub(r'/dl(\d)*/', '/dl/', videourl)
|
||||
ext = scrapertools.get_filename_from_url(videourl)[-4:]
|
||||
videourl = videourl.replace("%3F", "?") + \
|
||||
"|User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
|
||||
video_urls.append([ext + " [bitvid]", videourl])
|
||||
|
||||
return video_urls
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "clicknupload.(?:me|com|org)/([a-z0-9]+)",
|
||||
"url": "https://clicknupload.org/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "clicknupload",
|
||||
"name": "clicknupload",
|
||||
"premium": [
|
||||
"realdebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
token = ""
|
||||
excption = False
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = get_data(page_url.replace(".org", ".me"))
|
||||
if "File Not Found" in data: return False, "[Clicknupload] El archivo no existe o ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
data = get_data(page_url.replace(".org", ".me"))
|
||||
|
||||
post = ""
|
||||
block = scrapertools.find_single_match(data, '(?i)<Form method="POST"(.*?)</Form>')
|
||||
matches = scrapertools.find_multiple_matches(block, 'input.*?name="([^"]+)".*?value="([^"]*)"')
|
||||
for inputname, inputvalue in matches:
|
||||
post += inputname + "=" + inputvalue + "&"
|
||||
post = post.replace("download1", "download2")
|
||||
|
||||
data = get_data(page_url, post)
|
||||
|
||||
video_urls = []
|
||||
media = scrapertools.find_single_match(data, "onClick=\"window.open\('([^']+)'")
|
||||
# Solo es necesario codificar la ultima parte de la url
|
||||
url_strip = urllib.quote(media.rsplit('/', 1)[1])
|
||||
media_url = media.rsplit('/', 1)[0] + "/" + url_strip
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [clicknupload]", media_url])
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
|
||||
|
||||
def get_data(url_orig, req_post=""):
|
||||
try:
|
||||
if not excption:
|
||||
response = httptools.downloadpage(url_orig, req_post)
|
||||
if not response.data or "urlopen error [Errno 1]" in str(response.code):
|
||||
global excption
|
||||
excption = True
|
||||
raise Exception
|
||||
return response.data
|
||||
else:
|
||||
raise Exception
|
||||
except:
|
||||
import urllib
|
||||
post = {"address": url_orig.replace(".me", ".org")}
|
||||
if req_post:
|
||||
post["options"] = [{"man": "--data", "attribute": req_post}]
|
||||
else:
|
||||
post["options"] = []
|
||||
from core import jsontools
|
||||
global token
|
||||
if not token:
|
||||
data = httptools.downloadpage("http://onlinecurl.com/").data
|
||||
token = scrapertools.find_single_match(data, '<meta name="csrf-token" content="([^"]+)"')
|
||||
|
||||
headers = {'X-Requested-With': 'XMLHttpRequest', 'X-CSRF-Token': token, 'Referer': 'http://onlinecurl.com/'}
|
||||
post = "curl_request=" + urllib.quote(jsontools.dump(post)) + "&email="
|
||||
response = httptools.downloadpage("http://onlinecurl.com/onlinecurl", post=post, headers=headers).data
|
||||
data = jsontools.load(response).get("body", "")
|
||||
|
||||
return data
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "05/03/2017",
|
||||
"description": "Corregido por cambios en el servidor"
|
||||
},
|
||||
{
|
||||
"date": "03/04/2016",
|
||||
"description": "Versión inicial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "cloudy.ec/(?:embed.php\\?id=|v/)([A-z0-9]+)",
|
||||
"url": "https://www.cloudy.ec/embed.php?id=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "cloudy",
|
||||
"name": "cloudy",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "This video is being prepared" in data:
|
||||
return False, "[Cloudy] El archivo 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
|
||||
|
||||
media_urls = scrapertools.find_multiple_matches(data, '<source src="([^"]+)"')
|
||||
for mediaurl in media_urls:
|
||||
title = "%s [cloudy]" % scrapertools.get_filename_from_url(mediaurl)[-4:]
|
||||
mediaurl += "|User-Agent=Mozilla/5.0"
|
||||
video_urls.append([title, mediaurl])
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "cnubis.com/plugins/mediaplayer/([^/]+/[^.]+.php\\?u\\=[A-Za-z0-9]+)",
|
||||
"url": "http://cnubis.com/plugins/mediaplayer/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "cnubis",
|
||||
"name": "cnubis",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+23
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("page_url=" + page_url)
|
||||
video_urls = []
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
media_url = scrapertools.find_single_match(data, 'file: "([^"]+)",.*?type: "([^"]+)"')
|
||||
logger.info("media_url=" + media_url[0])
|
||||
|
||||
# URL del vídeo
|
||||
video_urls.append(["." + media_url[1] + " [cnubis]", media_url[0].replace("https", "http")])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "16/02/2017",
|
||||
"description": "Primera versión"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "((?:copiapop.com|diskokosmiko.mx)/[^\\s'\"]+)",
|
||||
"url": "http://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "copiapop",
|
||||
"name": "copiapop",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/EjbfM7p.png?1",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
if "copiapop.com" in page_url:
|
||||
from channels import copiapop
|
||||
logueado, error_message = copiapop.login("copiapop.com")
|
||||
if not logueado:
|
||||
return False, error_message
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if ("File was deleted" or "Not Found" or "File was locked by administrator") in data:
|
||||
return False, "[Copiapop] El archivo 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
|
||||
host = "http://copiapop.com"
|
||||
host_string = "copiapop"
|
||||
if "diskokosmiko.mx" in page_url:
|
||||
host = "http://diskokosmiko.mx"
|
||||
host_string = "diskokosmiko"
|
||||
|
||||
url = scrapertools.find_single_match(data, '<form action="([^"]+)" class="download_form"')
|
||||
if url:
|
||||
url = host + url
|
||||
fileid = url.rsplit("f=", 1)[1]
|
||||
token = scrapertools.find_single_match(data,
|
||||
'<div class="download_container">.*?name="__RequestVerificationToken".*?value="([^"]+)"')
|
||||
post = "fileId=%s&__RequestVerificationToken=%s" % (fileid, token)
|
||||
headers = {'X-Requested-With': 'XMLHttpRequest'}
|
||||
data = httptools.downloadpage(url, post, headers).data
|
||||
data = jsontools.load(data)
|
||||
mediaurl = data.get("DownloadUrl")
|
||||
extension = data.get("Extension")
|
||||
|
||||
video_urls.append([".%s [%s]" % (extension, host_string), mediaurl])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info(" %s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+95
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "12/05/2017",
|
||||
"description": "Se añade libreria jscrypto para que funcione en cualquier sistema y deteccion enlaces rtmpe"
|
||||
},
|
||||
{
|
||||
"date": "11/01/2017",
|
||||
"description": "Versión inicial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(crunchyroll.com/[^/]+/[^-].*-\\d+).*$",
|
||||
"url": "http://www.\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "crunchyroll",
|
||||
"name": "crunchyroll",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "premium",
|
||||
"label": "Activar cuenta premium",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
"enabled": "eq(-1,true)",
|
||||
"id": "user",
|
||||
"label": "@30014",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
"enabled": "eq(-2,true)+!eq(-1,'')",
|
||||
"hidden": true,
|
||||
"id": "password",
|
||||
"label": "@30015",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": "eq(-3,true)",
|
||||
"id": "sub",
|
||||
"label": "Idioma de subtítulos preferido",
|
||||
"lvalues": [
|
||||
"Español España",
|
||||
"Español Latino",
|
||||
"Inglés",
|
||||
"Italiano",
|
||||
"Francés",
|
||||
"Portugués",
|
||||
"Alemán"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/SglkLAb.png?1",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+232
@@ -0,0 +1,232 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import base64
|
||||
import re
|
||||
import struct
|
||||
import zlib
|
||||
from hashlib import sha1
|
||||
|
||||
from core import config
|
||||
from core import filetools
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
GLOBAL_HEADER = {'User-Agent': 'Mozilla/5.0', 'Accept-Language': '*'}
|
||||
proxy = "http://anonymouse.org/cgi-bin/anon-www.cgi/"
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
premium = config.get_setting("premium", server="crunchyroll")
|
||||
if premium:
|
||||
return login(page_url)
|
||||
data = httptools.downloadpage(page_url, headers=GLOBAL_HEADER, replace_headers=True).data
|
||||
if "Este es un clip de muestra" in data:
|
||||
disp = scrapertools.find_single_match(data, '<a href="/freetrial".*?</span>.*?<span>\s*(.*?)</span>')
|
||||
disp = disp.strip()
|
||||
if disp:
|
||||
disp = "Disponible gratuitamente: %s" % disp
|
||||
return False, "[Crunchyroll] Error, se necesita cuenta premium. %s" % disp
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
video_urls = []
|
||||
|
||||
if "crunchyroll.com" in page_url:
|
||||
media_id = page_url.rsplit("-", 1)[1]
|
||||
else:
|
||||
media_id = scrapertools.find_single_match(page_url, 'media_id=(\d+)')
|
||||
|
||||
url = "http://www.crunchyroll.com/xml/?req=RpcApiVideoPlayer_GetStandardConfig&media_id=%s" \
|
||||
"&video_format=0&video_quality=0&auto_play=0&aff=af-12299-plwa" % media_id
|
||||
post = "current_page=%s" % page_url
|
||||
data = httptools.downloadpage(url, post, headers=GLOBAL_HEADER, replace_headers=True).data
|
||||
|
||||
if "<msg>Media not available</msg>" in data or "flash_block.png" in data:
|
||||
data = httptools.downloadpage(proxy + url, post, headers=GLOBAL_HEADER, replace_headers=True,
|
||||
cookies=False).data
|
||||
|
||||
media_url = scrapertools.find_single_match(data, '<file>(.*?)</file>').replace("&", "&")
|
||||
if not media_url:
|
||||
return video_urls
|
||||
elif not media_url.startswith("http"):
|
||||
rtmp = scrapertools.find_single_match(data, '<host>(.*?)</host>').replace("&", "&")
|
||||
media_url = rtmp + " playpath=%s" % media_url
|
||||
filename = "RTMP"
|
||||
else:
|
||||
filename = scrapertools.get_filename_from_url(media_url)[-4:]
|
||||
quality = scrapertools.find_single_match(data, '<height>(.*?)</height>')
|
||||
|
||||
try:
|
||||
idiomas = ['Español \(España\)', 'Español\]', 'English', 'Italiano', 'Français', 'Português', 'Deutsch']
|
||||
index_sub = int(config.get_setting("sub", server="crunchyroll"))
|
||||
idioma_sub = idiomas[index_sub]
|
||||
link_sub = scrapertools.find_single_match(data, "link='([^']+)' title='\[%s" % idioma_sub)
|
||||
if not link_sub and index_sub == 0:
|
||||
link_sub = scrapertools.find_single_match(data, "link='([^']+)' title='\[Español\]")
|
||||
elif not link_sub and index_sub == 1:
|
||||
link_sub = scrapertools.find_single_match(data, "link='([^']+)' title='\[Español \(España\)")
|
||||
|
||||
if not link_sub:
|
||||
link_sub = scrapertools.find_single_match(data, "link='([^']+)' title='\[English")
|
||||
data_sub = httptools.downloadpage(link_sub.replace("&", "&"), headers=GLOBAL_HEADER,
|
||||
replace_headers=True).data
|
||||
|
||||
id_sub = scrapertools.find_single_match(data_sub, "subtitle id='([^']+)'")
|
||||
iv = scrapertools.find_single_match(data_sub, '<iv>(.*?)</iv>')
|
||||
data_sub = scrapertools.find_single_match(data_sub, '<data>(.*?)</data>')
|
||||
file_sub = decrypt_subs(iv, data_sub, id_sub)
|
||||
except:
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
file_sub = ""
|
||||
|
||||
video_urls.append(["%s %sp [crunchyroll]" % (filename, quality), media_url, 0, file_sub])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
|
||||
|
||||
def login(page_url):
|
||||
login_page = "https://www.crunchyroll.com/login"
|
||||
user = config.get_setting("user", server="crunchyroll")
|
||||
password = config.get_setting("password", server="crunchyroll")
|
||||
data = httptools.downloadpage(login_page, headers=GLOBAL_HEADER, replace_headers=True).data
|
||||
|
||||
if not "<title>Redirecting" in data:
|
||||
token = scrapertools.find_single_match(data, 'name="login_form\[_token\]" value="([^"]+)"')
|
||||
redirect_url = scrapertools.find_single_match(data, 'name="login_form\[redirect_url\]" value="([^"]+)"')
|
||||
post = "login_form%5Bname%5D=" + user + "&login_form%5Bpassword%5D=" + password + \
|
||||
"&login_form%5Bredirect_url%5D=" + redirect_url + "&login_form%5B_token%5D=" + token
|
||||
|
||||
data = httptools.downloadpage(login_page, post, headers=GLOBAL_HEADER, replace_headers=True).data
|
||||
if "<title>Redirecting" in data:
|
||||
return True, ""
|
||||
else:
|
||||
if "Usuario %s no disponible" % user in data:
|
||||
return False, "El usuario de crunchyroll no existe. Corrígelo o desactiva la opción premium para ver enlaces free"
|
||||
elif '<li class="error">Captcha' in data:
|
||||
return False, "Es necesario resolver un captcha. Loguéate desde un navegador y vuelve a intentarlo"
|
||||
else:
|
||||
return False, "Error en la contraseña de crunchyroll. Corrígelo o desactiva la opción premium para ver enlaces free"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def decrypt_subs(iv, data, id):
|
||||
import jscrypto
|
||||
data = base64.b64decode(data.encode('utf-8'))
|
||||
iv = base64.b64decode(iv.encode('utf-8'))
|
||||
id = int(id)
|
||||
|
||||
def obfuscate_key_aux(count, modulo, start):
|
||||
output = list(start)
|
||||
for _ in range(count):
|
||||
output.append(output[-1] + output[-2])
|
||||
# cut off start values
|
||||
output = output[2:]
|
||||
output = list(map(lambda x: x % modulo + 33, output))
|
||||
return output
|
||||
|
||||
def obfuscate_key(key):
|
||||
from math import pow, sqrt, floor
|
||||
num1 = int(floor(pow(2, 25) * sqrt(6.9)))
|
||||
num2 = (num1 ^ key) << 5
|
||||
num3 = key ^ num1
|
||||
num4 = num3 ^ (num3 >> 3) ^ num2
|
||||
prefix = obfuscate_key_aux(20, 97, (1, 2))
|
||||
prefix = struct.pack('B' * len(prefix), *prefix)
|
||||
shaHash = sha1(prefix + str(num4).encode('ascii')).digest()
|
||||
decshaHash = []
|
||||
for char in shaHash:
|
||||
decshaHash.append(ord(char))
|
||||
# Extend 160 Bit hash to 256 Bit
|
||||
return decshaHash + [0] * 12
|
||||
|
||||
key = obfuscate_key(id)
|
||||
key = struct.pack('B' * len(key), *key)
|
||||
|
||||
decryptor = jscrypto.new(key, 2, iv)
|
||||
decrypted_data = decryptor.decrypt(data)
|
||||
data = zlib.decompress(decrypted_data)
|
||||
|
||||
import xml.etree.ElementTree as ET
|
||||
raiz = ET.fromstring(data)
|
||||
|
||||
ass_sub = convert_to_ass(raiz)
|
||||
file_sub = filetools.join(config.get_data_path(), 'crunchyroll_sub.ass')
|
||||
filetools.write(file_sub, ass_sub)
|
||||
return file_sub
|
||||
|
||||
|
||||
def convert_to_ass(raiz):
|
||||
output = ''
|
||||
|
||||
def ass_bool(strvalue):
|
||||
assvalue = '0'
|
||||
if strvalue == '1':
|
||||
assvalue = '-1'
|
||||
return assvalue
|
||||
|
||||
output = '[Script Info]\n'
|
||||
output += 'Title: %s\n' % raiz.attrib['title']
|
||||
output += 'ScriptType: v4.00+\n'
|
||||
output += 'WrapStyle: %s\n' % raiz.attrib['wrap_style']
|
||||
output += 'PlayResX: %s\n' % raiz.attrib['play_res_x']
|
||||
output += 'PlayResY: %s\n' % raiz.attrib['play_res_y']
|
||||
output += """ScaledBorderAndShadow: yes
|
||||
[V4+ Styles]
|
||||
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
|
||||
"""
|
||||
for style in raiz.findall('./styles/style'):
|
||||
output += 'Style: ' + style.attrib['name']
|
||||
output += ',' + style.attrib['font_name']
|
||||
output += ',' + style.attrib['font_size']
|
||||
output += ',' + style.attrib['primary_colour']
|
||||
output += ',' + style.attrib['secondary_colour']
|
||||
output += ',' + style.attrib['outline_colour']
|
||||
output += ',' + style.attrib['back_colour']
|
||||
output += ',' + ass_bool(style.attrib['bold'])
|
||||
output += ',' + ass_bool(style.attrib['italic'])
|
||||
output += ',' + ass_bool(style.attrib['underline'])
|
||||
output += ',' + ass_bool(style.attrib['strikeout'])
|
||||
output += ',' + style.attrib['scale_x']
|
||||
output += ',' + style.attrib['scale_y']
|
||||
output += ',' + style.attrib['spacing']
|
||||
output += ',' + style.attrib['angle']
|
||||
output += ',' + style.attrib['border_style']
|
||||
output += ',' + style.attrib['outline']
|
||||
output += ',' + style.attrib['shadow']
|
||||
output += ',' + style.attrib['alignment']
|
||||
output += ',' + style.attrib['margin_l']
|
||||
output += ',' + style.attrib['margin_r']
|
||||
output += ',' + style.attrib['margin_v']
|
||||
output += ',' + style.attrib['encoding']
|
||||
output += '\n'
|
||||
|
||||
output += """
|
||||
[Events]
|
||||
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
||||
"""
|
||||
for event in raiz.findall('./events/event'):
|
||||
output += 'Dialogue: 0'
|
||||
output += ',' + event.attrib['start']
|
||||
output += ',' + event.attrib['end']
|
||||
output += ',' + event.attrib['style']
|
||||
output += ',' + event.attrib['name']
|
||||
output += ',' + event.attrib['margin_l']
|
||||
output += ',' + event.attrib['margin_r']
|
||||
output += ',' + event.attrib['margin_v']
|
||||
output += ',' + event.attrib['effect']
|
||||
output += ',' + event.attrib['text']
|
||||
output += '\n'
|
||||
|
||||
return output.encode('utf-8')
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://es.cumlouder.com/embed/([a-z0-9A-Z]+)/",
|
||||
"url": "http://es.cumlouder.com/embed/\\1/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "cumlouder",
|
||||
"name": "cumlouder",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
data = scrapertools.cache_page(page_url)
|
||||
media_url = scrapertools.get_match(data, "var urlVideo = \'([^']+)\';")
|
||||
video_urls = []
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [cumlouder]", media_url])
|
||||
|
||||
return video_urls
|
||||
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "07/04/2017",
|
||||
"description": "Corregido para adaptarlo al uso de httptools ya que fallaba"
|
||||
},
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "dailymotion.com/(?:video/|swf/(?:video/|)|)(?:embed/video/|)([A-z0-9]+)",
|
||||
"url": "http://www.dailymotion.com/embed/video/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "dailymotion",
|
||||
"name": "dailymotion",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
response = httptools.downloadpage(page_url)
|
||||
if response.code == 404:
|
||||
return False, "[Dailymotion] El archivo 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 = []
|
||||
|
||||
response = httptools.downloadpage(page_url, cookies=False)
|
||||
cookie = {'Cookie': response.headers["set-cookie"]}
|
||||
data = response.data.replace("\\", "")
|
||||
|
||||
'''
|
||||
"240":[{"type":"video/mp4","url":"http://www.dailymotion.com/cdn/H264-320x240/video/x33mvht.mp4?auth=1441130963-2562-u49z9kdc-84796332ccab3c7ce84e01c67a18b689"}]
|
||||
'''
|
||||
|
||||
subtitle = scrapertools.find_single_match(data, '"subtitles":.*?"es":.*?urls":\["([^"]+)"')
|
||||
qualities = scrapertools.find_multiple_matches(data, '"([^"]+)":(\[\{"type":".*?\}\])')
|
||||
for calidad, urls in qualities:
|
||||
if calidad == "auto":
|
||||
continue
|
||||
patron = '"type":"(?:video|application)/([^"]+)","url":"([^"]+)"'
|
||||
matches = scrapertools.find_multiple_matches(urls, patron)
|
||||
for stream_type, stream_url in matches:
|
||||
stream_type = stream_type.replace('x-mpegURL', 'm3u8')
|
||||
if stream_type == "mp4":
|
||||
stream_url = httptools.downloadpage(stream_url, headers=cookie, only_headers=True,
|
||||
follow_redirects=False).headers.get("location", stream_url)
|
||||
else:
|
||||
data_m3u8 = httptools.downloadpage(stream_url).data
|
||||
stream_url = scrapertools.find_single_match(data_m3u8, '(http:.*?\.m3u8)')
|
||||
video_urls.append(["%sp .%s [dailymotion]" % (calidad, stream_type), stream_url, 0, subtitle])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+57
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "13/05/2017",
|
||||
"description": "Corregido orden y calidades"
|
||||
},
|
||||
{
|
||||
"date": "21/02/2017",
|
||||
"description": "Corregido y añadida opcion m3u8"
|
||||
},
|
||||
{
|
||||
"date": "28/07/2016",
|
||||
"description": "Versión inicial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:datoporn.com|dato.porn)/(?:embed-|)([A-z0-9]+)",
|
||||
"url": "http://dato.porn/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "datoporn",
|
||||
"name": "datoporn",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/tBSWudd.png?1",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if 'File Not Found' in data or '404 Not Found' in data:
|
||||
return False, "[Datoporn] El archivo no existe o ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
||||
if not media_urls:
|
||||
match = scrapertools.find_single_match(data, "<script type='text/javascript'>(.*?)</script>")
|
||||
data = jsunpack.unpack(match)
|
||||
media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
||||
|
||||
# Extrae la URL
|
||||
calidades = []
|
||||
video_urls = []
|
||||
for media_url in sorted(media_urls, key=lambda x: int(x[1][-3:])):
|
||||
calidades.append(int(media_url[1][-3:]))
|
||||
try:
|
||||
title = ".%s %sp [datoporn]" % (media_url[0].rsplit('.', 1)[1], media_url[1][-3:])
|
||||
except:
|
||||
title = ".%s %sp [datoporn]" % (media_url[-4:], media_url[1][-3:])
|
||||
video_urls.append([title, media_url[0]])
|
||||
|
||||
sorted(calidades)
|
||||
m3u8 = scrapertools.find_single_match(data, 'file\:"([^"]+\.m3u8)"')
|
||||
if m3u8:
|
||||
video_urls.insert(0, [".m3u8 %s [datoporn]" % calidades[-1], m3u8])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
+1
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"free": false,
|
||||
"id": "alldebrid",
|
||||
"name": "All-Debrid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "premium",
|
||||
"label": "Activar cuenta premium",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"enabled": "eq(-1,true)",
|
||||
"id": "user",
|
||||
"label": "@30014",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"enabled": "eq(-2,true)+!eq(-1,'')",
|
||||
"hidden": true,
|
||||
"id": "password",
|
||||
"label": "@30015",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import jsontools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s' , user='%s' , password='%s', video_password=%s)" % (
|
||||
page_url, user, "**************************"[0:len(password)], video_password))
|
||||
page_url = correct_url(page_url)
|
||||
|
||||
url = 'http://www.alldebrid.com/service.php?pseudo=%s&password=%s&link=%s&nb=0&json=true&pw=' % (
|
||||
user, password, page_url)
|
||||
|
||||
data = jsontools.load(scrapertools.downloadpage(url))
|
||||
|
||||
video_urls = []
|
||||
if data and data["link"] and not data["error"]:
|
||||
extension = ".%s [alldebrid]" % data["filename"].rsplit(".", 1)[1]
|
||||
video_urls.append([extension, data["link"]])
|
||||
|
||||
else:
|
||||
try:
|
||||
server_error = "Alldebrid: " + data["error"].decode("utf-8", "ignore")
|
||||
server_error = server_error.replace("This link isn't available on the hoster website.",
|
||||
"Enlace no disponible en el servidor de descarga") \
|
||||
.replace("Hoster unsupported or under maintenance.",
|
||||
"Servidor no soportado o en mantenimiento")
|
||||
except:
|
||||
server_error = "Alldebrid: Error en el usuario/password o en la web"
|
||||
|
||||
video_urls.append([server_error, ''])
|
||||
|
||||
return video_urls
|
||||
|
||||
|
||||
def correct_url(url):
|
||||
if "userporn.com" in url:
|
||||
url = url.replace("/e/", "/video/")
|
||||
|
||||
if "putlocker" in url:
|
||||
url = url.replace("/embed/", "/file/")
|
||||
return url
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "14/06/2016",
|
||||
"description": "Corregido al haberse desactivado la api que se usaba"
|
||||
}
|
||||
],
|
||||
"free": false,
|
||||
"id": "realdebrid",
|
||||
"name": "Real-Debrid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "premium",
|
||||
"label": "Activar cuenta premium",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
+147
@@ -0,0 +1,147 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from core import config
|
||||
from core import jsontools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from platformcode import platformtools
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'}
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s' , video_password=%s)" % (page_url, video_password))
|
||||
|
||||
# Se comprueba si existe un token guardado y sino se ejecuta el proceso de autentificación
|
||||
token_auth = config.get_setting("token", server="realdebrid")
|
||||
if token_auth is None or token_auth == "":
|
||||
if config.is_xbmc():
|
||||
token_auth = authentication()
|
||||
if token_auth == "":
|
||||
return [["REAL-DEBRID: No se ha completado el proceso de autentificación", ""]]
|
||||
else:
|
||||
return [["Es necesario activar la cuenta. Accede al menú de ayuda", ""]]
|
||||
|
||||
post_link = urllib.urlencode([("link", page_url), ("password", video_password)])
|
||||
headers["Authorization"] = "Bearer %s" % token_auth
|
||||
url = "https://api.real-debrid.com/rest/1.0/unrestrict/link"
|
||||
data = scrapertools.downloadpage(url, post=post_link, headers=headers.items())
|
||||
data = jsontools.load(data)
|
||||
|
||||
# Si el token es erróneo o ha caducado, se solicita uno nuevo
|
||||
if "error" in data and data["error"] == "bad_token":
|
||||
debrid_id = config.get_setting("id", server="realdebrid")
|
||||
secret = config.get_setting("secret", server="realdebrid")
|
||||
refresh = config.get_setting("refresh", server="realdebrid")
|
||||
|
||||
post_token = urllib.urlencode({"client_id": debrid_id, "client_secret": secret, "code": refresh,
|
||||
"grant_type": "http://oauth.net/grant_type/device/1.0"})
|
||||
renew_token = scrapertools.downloadpage("https://api.real-debrid.com/oauth/v2/token", post=post_token,
|
||||
headers=headers.items())
|
||||
renew_token = jsontools.load(renew_token)
|
||||
if not "error" in renew_token:
|
||||
token_auth = renew_token["access_token"]
|
||||
config.set_setting("token", token_auth, server="realdebrid")
|
||||
headers["Authorization"] = "Bearer %s" % token_auth
|
||||
data = scrapertools.downloadpage(url, post=post_link, headers=headers.items())
|
||||
data = jsontools.load(data)
|
||||
|
||||
if "download" in data:
|
||||
return get_enlaces(data)
|
||||
else:
|
||||
if "error" in data:
|
||||
msg = data["error"].decode("utf-8", "ignore")
|
||||
msg = msg.replace("hoster_unavailable", "Servidor no disponible") \
|
||||
.replace("unavailable_file", "Archivo no disponible") \
|
||||
.replace("hoster_not_free", "Servidor no gratuito") \
|
||||
.replace("bad_token", "Error en el token")
|
||||
return [["REAL-DEBRID: " + msg, ""]]
|
||||
else:
|
||||
return [["REAL-DEBRID: No se ha generado ningún enlace", ""]]
|
||||
|
||||
|
||||
def get_enlaces(data):
|
||||
itemlist = []
|
||||
if "alternative" in data:
|
||||
for link in data["alternative"]:
|
||||
video_url = link["download"].encode("utf-8")
|
||||
title = video_url.rsplit(".", 1)[1]
|
||||
if "quality" in link:
|
||||
title += " (" + link["quality"] + ") [realdebrid]"
|
||||
itemlist.append([title, video_url])
|
||||
else:
|
||||
video_url = data["download"].encode("utf-8")
|
||||
title = video_url.rsplit(".", 1)[1] + " [realdebrid]"
|
||||
itemlist.append([title, video_url])
|
||||
|
||||
return itemlist
|
||||
|
||||
|
||||
def authentication():
|
||||
logger.info()
|
||||
try:
|
||||
client_id = "YTWNFBIJEEBP6"
|
||||
|
||||
# Se solicita url y código de verificación para conceder permiso a la app
|
||||
url = "http://api.real-debrid.com/oauth/v2/device/code?client_id=%s&new_credentials=yes" % (client_id)
|
||||
data = scrapertools.downloadpage(url, headers=headers.items())
|
||||
data = jsontools.load(data)
|
||||
verify_url = data["verification_url"]
|
||||
user_code = data["user_code"]
|
||||
device_code = data["device_code"]
|
||||
intervalo = data["interval"]
|
||||
|
||||
dialog_auth = platformtools.dialog_progress("Autentificación. No cierres esta ventana!!",
|
||||
"1. Entra en la siguiente url: %s" % verify_url,
|
||||
"2. Ingresa este código en la página y presiona Allow: %s" % user_code,
|
||||
"3. Espera a que se cierre esta ventana")
|
||||
|
||||
# Generalmente cada 5 segundos se intenta comprobar si el usuario ha introducido el código
|
||||
while True:
|
||||
time.sleep(intervalo)
|
||||
try:
|
||||
if dialog_auth.iscanceled():
|
||||
return ""
|
||||
|
||||
url = "https://api.real-debrid.com/oauth/v2/device/credentials?client_id=%s&code=%s" \
|
||||
% (client_id, device_code)
|
||||
data = scrapertools.downloadpage(url, headers=headers.items())
|
||||
data = jsontools.load(data)
|
||||
if "client_secret" in data:
|
||||
# Código introducido, salimos del bucle
|
||||
break
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
dialog_auth.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
debrid_id = data["client_id"]
|
||||
secret = data["client_secret"]
|
||||
|
||||
# Se solicita el token de acceso y el de actualización para cuando el primero caduque
|
||||
post = urllib.urlencode({"client_id": debrid_id, "client_secret": secret, "code": device_code,
|
||||
"grant_type": "http://oauth.net/grant_type/device/1.0"})
|
||||
data = scrapertools.downloadpage("https://api.real-debrid.com/oauth/v2/token", post=post,
|
||||
headers=headers.items())
|
||||
data = jsontools.load(data)
|
||||
|
||||
token = data["access_token"]
|
||||
refresh = data["refresh_token"]
|
||||
|
||||
config.set_setting("id", debrid_id, server="realdebrid")
|
||||
config.set_setting("secret", secret, server="realdebrid")
|
||||
config.set_setting("token", token, server="realdebrid")
|
||||
config.set_setting("refresh", refresh, server="realdebrid")
|
||||
|
||||
return token
|
||||
except:
|
||||
import traceback
|
||||
logger.error(traceback.format_exc())
|
||||
return ""
|
||||
+1
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from base64 import b64decode
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_long_url(short_url):
|
||||
logger.info("short_url = '%s'" % short_url)
|
||||
|
||||
data = scrapertools.downloadpage(short_url)
|
||||
ysmm = scrapertools.find_single_match(data, "var ysmm = '([^']+)';")
|
||||
b64 = ""
|
||||
for i in reversed(range(len(ysmm))):
|
||||
if i % 2:
|
||||
b64 = b64 + ysmm[i]
|
||||
else:
|
||||
b64 = ysmm[i] + b64
|
||||
|
||||
decoded_uri = b64decode(b64)[2:]
|
||||
|
||||
if "adf.ly/redirecting" in decoded_uri:
|
||||
data = scrapertools.downloadpage(decoded_uri)
|
||||
decoded_uri = scrapertools.find_single_match(data, "window.location = '([^']+)'")
|
||||
|
||||
return decoded_uri
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urlparse
|
||||
|
||||
from lib import unshortenit
|
||||
|
||||
SERVICES_SHORT = ["adf.ly", "sh.st", "bit.ly", "ul.to"]
|
||||
|
||||
|
||||
def expand_url(url):
|
||||
e = unshortenit.UnshortenIt()
|
||||
|
||||
while Es_Corto(url):
|
||||
long_url, estado = e.unshorten(url)
|
||||
url = long_url
|
||||
|
||||
return long_url
|
||||
|
||||
|
||||
def Es_Corto(url):
|
||||
server = urlparse.urlsplit(url).netloc
|
||||
Corto = (server in SERVICES_SHORT)
|
||||
return Corto
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
# Obtiene la URL que hay detrás de un enlace a linkbucks
|
||||
def get_long_url(short_url):
|
||||
logger.info("(short_url='%s')" % short_url)
|
||||
|
||||
request_headers = []
|
||||
request_headers.append(["User-Agent",
|
||||
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; es-ES; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"])
|
||||
request_headers.append(["Referer", "http://linkdecrypter.com"])
|
||||
post = urllib.urlencode({"pro_links": short_url, "modo_links": "text", "modo_recursivo": "on", "link_cache": "on"})
|
||||
url = "http://linkdecrypter.com/"
|
||||
|
||||
# Parche porque python no parece reconocer bien la cabecera phpsessid
|
||||
body, response_headers = scrapertools.read_body_and_headers(url, post=post, headers=request_headers)
|
||||
location = ""
|
||||
n = 1
|
||||
while True:
|
||||
for name, value in response_headers:
|
||||
if name == "set-cookie":
|
||||
logger.info("Set-Cookie: " + value)
|
||||
cookie_name = scrapertools.get_match(value, '(.*?)\=.*?\;')
|
||||
cookie_value = scrapertools.get_match(value, '.*?\=(.*?)\;')
|
||||
request_headers.append(["Cookie", cookie_name + "=" + cookie_value])
|
||||
|
||||
body, response_headers = scrapertools.read_body_and_headers(url, headers=request_headers)
|
||||
logger.info("body=" + body)
|
||||
|
||||
try:
|
||||
location = scrapertools.get_match(body, '<textarea.*?class="caja_des">([^<]+)</textarea>')
|
||||
logger.info("location=" + location)
|
||||
break
|
||||
except:
|
||||
n = n + 1
|
||||
if n > 3:
|
||||
break
|
||||
|
||||
return location
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_server_list():
|
||||
servers = []
|
||||
data = scrapertools.downloadpage("http://longurl.org/services")
|
||||
data = scrapertools.unescape(data)
|
||||
data = scrapertools.get_match(data, '<ol>(.*?)</ol>')
|
||||
patron = '<li>(.*?)</li>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
# añadiendo algunos manualmente que no salen en la web
|
||||
servers.append("sh.st")
|
||||
|
||||
for server in matches:
|
||||
servers.append(server)
|
||||
return servers
|
||||
|
||||
|
||||
servers = get_server_list()
|
||||
|
||||
|
||||
def get_long_urls(data):
|
||||
logger.info()
|
||||
patron = '<a href="http://([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
for short_url in matches:
|
||||
if short_url.startswith(tuple(servers)):
|
||||
logger.info(": " + short_url)
|
||||
longurl_data = scrapertools.downloadpage(
|
||||
"http://api.longurl.org/v2/expand?url=" + urllib.quote_plus(short_url))
|
||||
logger.info(longurl_data)
|
||||
try:
|
||||
long_url = scrapertools.get_match(longurl_data, '<long-url><!\[CDATA\[(.*?)\]\]></long-url>')
|
||||
except:
|
||||
long_url = ""
|
||||
if (long_url <> ""): data = data.replace(short_url, long_url)
|
||||
return data
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_long_url(short_url):
|
||||
logger.info("(short_url='%s')" % short_url)
|
||||
|
||||
location = scrapertools.get_header_from_response(short_url, header_to_get="location")
|
||||
logger.info("location=" + location)
|
||||
|
||||
return location
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": false,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(depositfiles.com/files/[a-z0-9]+)",
|
||||
"url": "http://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "depositfiles",
|
||||
"name": "depositfiles",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Existe: http://depositfiles.com/files/vmhjug6t7
|
||||
# No existe:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
patron = 'Nombre del Archivo: <b title="([^"]+)">([^<]+)</b>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
return True, ""
|
||||
else:
|
||||
patron = '<div class="no_download_msg">([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
return False, "El archivo ya no está disponible<br/>en depositfiles 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 = []
|
||||
return video_urls
|
||||
Executable
+72
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(http://[a-zA-Z0-9]+\\.mysites\\.com\\/get_file\\/.*?\\.mp4)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "flashvars=\"file=(http://[^\\.]+.myspacecdn[^\\&]+)&",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(http://[^\\.]+\\.myspacecdn.*?\\.flv)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(http://api.ning.com.*?\\.flv)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "file\\=(http\\:\\/\\/es.video.netlogstatic[^\\&]+)\\&",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "file=http.*?mangaid.com(.*?)backcolor=",
|
||||
"url": "http://mangaid.com\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "so\\.addVariable\\(\\’file\\’,\\’(http\\://peliculasid[^\\']+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "directo",
|
||||
"name": "directo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
video_urls = [["%s [directo]" % page_url[-4:], page_url]]
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "21/03/2017",
|
||||
"description": "Conector corregido"
|
||||
},
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:divxstage|cloudtime).[^/]+/video/([^\"' ]+)",
|
||||
"url": "http://www.cloudtime.to/embed/?v=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "divxstage",
|
||||
"name": "divxstage",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_divxstage.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
host = "http://www.cloudtime.to"
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url.replace('/embed/?v=', '/video/')).data
|
||||
|
||||
if "This file no longer exists" in data:
|
||||
return False, "El archivo no existe<br/>en divxstage 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)
|
||||
|
||||
if "divxstage.net" in page_url:
|
||||
page_url = page_url.replace("divxstage.net", "cloudtime.to")
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
video_urls = []
|
||||
videourls = scrapertools.find_multiple_matches(data, 'src\s*:\s*[\'"]([^\'"]+)[\'"]')
|
||||
if not videourls:
|
||||
videourls = scrapertools.find_multiple_matches(data, '<source src=[\'"]([^\'"]+)[\'"]')
|
||||
for videourl in videourls:
|
||||
if videourl.endswith(".mpd"):
|
||||
id = scrapertools.find_single_match(videourl, '/dash/(.*?)/')
|
||||
videourl = "http://www.cloudtime.to/download.php%3Ffile=mm" + "%s.mp4" % id
|
||||
|
||||
videourl = re.sub(r'/dl(\d)*/', '/dl/', videourl)
|
||||
ext = scrapertools.get_filename_from_url(videourl)[-4:]
|
||||
videourl = videourl.replace("%3F", "?") + \
|
||||
"|User-Agent=Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0"
|
||||
video_urls.append([ext + " [cloudtime]", videourl])
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://documentary.es/(\\d+[a-z0-9\\-]+)",
|
||||
"url": "http://documentary.es/\\1?embed"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "documentary",
|
||||
"name": "documentary",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
try:
|
||||
# var videoVars = {"videoNonceVar":"94767795ce","post_id":"2835"};
|
||||
videoNonceVar = scrapertools.get_match(data,
|
||||
'var\s*videoVars\s*\=\s*\{"videoNonceVar"\:"([^"]+)","post_id"\:"\d+"')
|
||||
post_id = scrapertools.get_match(data, 'var\s*videoVars\s*\=\s*\{"videoNonceVar"\:"[^"]+","post_id"\:"(\d+)"')
|
||||
|
||||
# http://documentary.es/wp-admin/admin-ajax.php?postId=2835&videoNonce=94767795ce&action=getVideo&_=1385893877929
|
||||
import random
|
||||
url = "http://documentary.es/wp-admin/admin-ajax.php?postId=" + post_id + "&videoNonce=" + videoNonceVar + "&action=getVideo&_=" + str(
|
||||
random.randint(10000000000, 9999999999999))
|
||||
data = scrapertools.cache_page(url)
|
||||
|
||||
# {"videoUrl":"http:\/\/www.dailymotion.com\/embed\/video\/xioggh?autoplay=1&defaultSubtitle=es"}
|
||||
data = data.replace("\\", "")
|
||||
except:
|
||||
pass
|
||||
|
||||
from core import servertools
|
||||
real_urls = servertools.find_video_items(data=data)
|
||||
if len(real_urls) > 0:
|
||||
item = real_urls[len(real_urls) - 1]
|
||||
servermodule = __import__('servers.%s' % item.server, None, None, ["servers.%s" % item.server])
|
||||
# exec "import " + item.server
|
||||
# exec "servermodule = " + item.server
|
||||
video_urls = servermodule.get_video_url(item.url)
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "27/02/2017",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://eroshare.com/embed/[a-zA-Z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "eroshare",
|
||||
"name": "eroshare",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s31.postimg.org/cewftt397/eroshare.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
# def test_video_exists(page_url):
|
||||
# logger.info("(page_url='%s')" % page_url)
|
||||
# data = httptools.downloadpage(page_url).data
|
||||
|
||||
# if "File was deleted" in data:
|
||||
# return False, "[eroshare] El archivo no existe o ha sido borrado"
|
||||
|
||||
# return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
url = scrapertools.find_single_match(data, '"url_mp4":"(.*?)"')
|
||||
video_urls.append(['eroshare', url])
|
||||
|
||||
# for video_url in video_urls:
|
||||
# logger.info("%s - %s" % (video_url[0],video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://www.facebook.com/v/([\\d]+)",
|
||||
"url": "http://www.facebook.com/video/external_video.php?v=\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(http://video.ak.facebook.com/.*?\\.mp4)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "facebook",
|
||||
"name": "facebook",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
page_url = page_url.replace("amp;", "")
|
||||
data = scrapertools.cache_page(page_url)
|
||||
logger.info("data=" + data)
|
||||
|
||||
video_urls = []
|
||||
|
||||
patron = "video_src.*?(http.*?)%22%2C%22video_timestamp"
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
scrapertools.printMatches(matches)
|
||||
for match in matches:
|
||||
videourl = match
|
||||
logger.info(match)
|
||||
videourl = videourl.replace('%5C', '')
|
||||
videourl = urllib.unquote(videourl)
|
||||
video_urls.append(["[facebook]", videourl])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://tv.fakings.com/embed/([a-z0-9A-Z]+)/",
|
||||
"url": "http://tv.fakings.com/embed/\\1/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fakingstv",
|
||||
"name": "fakingstv",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
data = scrapertools.cache_page(page_url)
|
||||
media_url = scrapertools.get_match(data, '\'file\': \'([^"]+)\',')
|
||||
video_urls = []
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [fakingstv]", media_url])
|
||||
|
||||
return video_urls
|
||||
Executable
+65
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "14/06/2017",
|
||||
"description": "Patrón reparado"
|
||||
},
|
||||
{
|
||||
"date": "07/06/2017",
|
||||
"description": "Reparado detección de subtitulos"
|
||||
},
|
||||
{
|
||||
"date": "05/06/2017",
|
||||
"description": "Enlaces a videos encriptados"
|
||||
},
|
||||
{
|
||||
"date": "29/05/2017",
|
||||
"description": "Detección de subtítulos y reparado detección de resolución de videos"
|
||||
},
|
||||
{
|
||||
"date": "16/02/2017",
|
||||
"description": "Primera versión"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "fastplay.(?:to|cc|sx)/(?:flash-|embed-|)([A-z0-9]+)",
|
||||
"url": "http://fastplay.cc/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fastplay",
|
||||
"name": "fastplay",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/vHDcd6Y.png?1",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "Object not found" in data:
|
||||
return False, "[Fastplay] El archivo 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)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "p,a,c,k,e,d" in data:
|
||||
data = jsunpack.unpack(data).replace("\\", "")
|
||||
video_urls = []
|
||||
videos = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)",label:"(.*?)"')
|
||||
##Detección de subtítulos
|
||||
subtitulo = scrapertools.find_single_match(data, 'tracks:\s*\[{file:"(.*?)"')
|
||||
if "http" not in subtitulo:
|
||||
subtitulo = "http://fastplay.cc" + subtitulo
|
||||
for video_url, video_calidad in videos:
|
||||
extension = scrapertools.get_filename_from_url(video_url)[-4:]
|
||||
if extension not in [".vtt", ".srt"]:
|
||||
video_urls.append(["%s %s [fastplay]" % (extension, video_calidad), video_url, 0, subtitulo])
|
||||
try:
|
||||
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0].rsplit(" ")[1]))
|
||||
except:
|
||||
pass
|
||||
for video_url in video_urls:
|
||||
logger.info(" %s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": false,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "filebox.com/(?:embed-)?([0-9a-zA-Z]+)",
|
||||
"url": "http://www.filebox.com/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "filebox",
|
||||
"name": "filebox",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(url=page_url)
|
||||
if "<b>File Not Found</b>" in data:
|
||||
return False, "El archivo no existe<br/>en filebox o ha sido borrado."
|
||||
else:
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
'''
|
||||
<input type="hidden" name="op" value="download2">
|
||||
<input type="hidden" name="id" value="235812b1j9w1">
|
||||
<input type="hidden" name="rand" value="na73zeeooqyfkndsv4uxzzpbajwi6mhbmixtogi">
|
||||
<input type="hidden" name="referer" value="http://www.seriesyonkis.com/s/ngo/2/5/1/8/773">
|
||||
'''
|
||||
logger.info("URL")
|
||||
data = scrapertools.cache_page(page_url)
|
||||
import time
|
||||
time.sleep(5)
|
||||
|
||||
codigo = scrapertools.get_match(data, '<input type="hidden" name="id" value="([^"]+)">[^<]+')
|
||||
rand = scrapertools.get_match(data, '<input type="hidden" name="rand" value="([^"]+)">')
|
||||
|
||||
# op=download2&id=xuquejiv6xdf&rand=r6dq7hn7so2ygpnxv2zg2i3cu3sbdsunf57gtni&referer=&method_free=&method_premium=&down_direct=1
|
||||
post = "op=download2&id=" + codigo + "&rand=" + rand + "&referer=&method_free=&method_premium=&down_direct=1"
|
||||
|
||||
data = scrapertools.cache_page(page_url, post=post, headers=[
|
||||
['User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'],
|
||||
['Referer', page_url]])
|
||||
logger.info("data=" + data)
|
||||
media_url = scrapertools.get_match(data, "this.play\('([^']+)'")
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [filebox]", media_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(filefactory.com/file/[a-z0-9]+(?:/n/.*?\\.(?:avi|mp4|rar|mkv))?)",
|
||||
"url": "http://www.\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "filefactory",
|
||||
"name": "filefactory",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_filefactory.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(fileflyer.com/view/[a-zA-Z0-9]+)",
|
||||
"url": "http://www.\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fileflyer",
|
||||
"name": "fileflyer",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Vídeo borrado: http://www.fileflyer.com/view/fioZRBu
|
||||
# Video erróneo:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
if '<a href="/RemoveDetail.aspx">' in data:
|
||||
return False, "El archivo ya no está disponible<br/>en fileflyer (ha sido borrado)"
|
||||
else:
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
location = scrapertools.get_match(data,
|
||||
'<td class="dwnlbtn"[^<]+<a id="[^"]+" title="[^"]+" class="[^"]+" href="([^"]+)"')
|
||||
|
||||
video_urls.append([scrapertools.get_filename_from_url(location)[-4:] + " [fileflyer]", location])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "13/06/2017",
|
||||
"description": "Actualizado patrón del get_video()"
|
||||
},
|
||||
{
|
||||
"date": "15/02/2017",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "((?:(?:http:\\/\\/|https:\\/\\/)filescdn\\.com\\/(?:embed-.*?\\.html|[a-zA-Z0-9]+)))",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filescdn",
|
||||
"name": "filescdn",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s31.postimg.org/ijne6piij/filescdn.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "File was deleted" in data:
|
||||
return False, "[FilesCDN] El archivo no existe o ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
url = scrapertools.find_single_match(data, '(?i)link:\s*"(https://.*?filescdn\.com.*?mp4)"')
|
||||
url = url.replace(':443', '')
|
||||
video_urls.append(['filescdn', url])
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": false,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://www.fileserve.com/file/([A-Z0-9a-z]{7}])",
|
||||
"url": "http://www.fileserve.com/file/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "fileserve",
|
||||
"name": "fileserve",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Existe: http://www.fileserve.com/file/E5Y5R5E
|
||||
# No existe:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
patron = '<div class="panel file_download">[^<]+<img src="/images/down_arrow.gif"[^<]+<h1>([^<]+)<'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
return True, ""
|
||||
else:
|
||||
patron = '<li class="title"><h1>(File not available)</h1>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
return False, "El archivo ya no está disponible<br/>en fileserve 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 = []
|
||||
|
||||
if premium:
|
||||
# Accede a la home para precargar la cookie
|
||||
data = scrapertools.cache_page("http://fileserve.com/index.php")
|
||||
|
||||
# Hace el login
|
||||
url = "http://fileserve.com/login.php"
|
||||
post = "loginUserName=%s&loginUserPassword=%s&autoLogin=on&ppp=102&loginFormSubmit=Login" % (user, password)
|
||||
data = scrapertools.cache_page(url, post=post)
|
||||
|
||||
location = scrapertools.get_header_from_response(page_url, header_to_get="location")
|
||||
logger.info("location=" + location)
|
||||
|
||||
if location.startswith("http"):
|
||||
extension = location[-4:]
|
||||
video_urls.append(["%s (Premium) [fileserve]" % extension, location])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+76
@@ -0,0 +1,76 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Version incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "filesmonster.com/download(.*?)",
|
||||
"url": "http://filesmonster.com/download\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "filesmonster",
|
||||
"name": "filesmonster",
|
||||
"premium": [
|
||||
"filesmonster"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "premium",
|
||||
"label": "Activar cuenta premium",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
"enabled": "eq(-1,true)",
|
||||
"id": "user",
|
||||
"label": "@30014",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": "",
|
||||
"enabled": "eq(-2,true)+!eq(-1,'')",
|
||||
"hidden": true,
|
||||
"id": "password",
|
||||
"label": "@30015",
|
||||
"type": "text",
|
||||
"visible": true
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("( page_url='%s')")
|
||||
video_urls = []
|
||||
itemlist = []
|
||||
data1 = ''
|
||||
data2 = ''
|
||||
url = ''
|
||||
alerta = '[filesmonster premium]'
|
||||
enlace = "no"
|
||||
post2 = "username=" + user + "&password=" + password
|
||||
login_url = "http://filesmonster.com/api/public/login"
|
||||
data1 = scrapertools.cache_page(login_url, post=post2)
|
||||
partes1 = data1.split('"')
|
||||
estado = partes1[3]
|
||||
if estado != 'success': alerta = "[error de filesmonster premium]: " + estado
|
||||
|
||||
id = page_url
|
||||
id = id.replace("http://filesmonster.com/download.php", "")
|
||||
post = id.replace("?", "")
|
||||
url = 'http://filesmonster.com/api/public/premiumDownload'
|
||||
data2 = scrapertools.cache_page(url, post=post)
|
||||
|
||||
partes = data2.split('"')
|
||||
|
||||
url = partes[7]
|
||||
filename = scrapertools.get_filename_from_url(url)[-4:]
|
||||
alerta = filename + " " + alerta
|
||||
if "http" not in url: alerta = "[error de filesmonster premium]: " + url
|
||||
|
||||
video_urls.append([alerta, url])
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "12/04/2017",
|
||||
"description": "Corregido por cambios"
|
||||
},
|
||||
{
|
||||
"date": "27/02/2017",
|
||||
"description": "Primera versión"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "filez.tv/(?:embed/u=)?([A-z0-9]+)",
|
||||
"url": "http://filez.tv/embed/u=\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filez",
|
||||
"name": "filez",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/HasfjUH.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url, follow_redirects=False)
|
||||
|
||||
if data.headers.get("location"):
|
||||
return False, "[filez] El archivo ha sido eliminado o no existe"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
video_urls = []
|
||||
media_urls = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)",\s*type\s*:\s*"([^"]+)"')
|
||||
for media_url, ext in media_urls:
|
||||
video_urls.append([".%s [filez]" % ext, media_url])
|
||||
|
||||
if not video_urls:
|
||||
media_urls = scrapertools.find_multiple_matches(data, '<embed.*?src="([^"]+)"')
|
||||
for media_url in media_urls:
|
||||
media_url = media_url.replace("https:", "http:")
|
||||
ext = httptools.downloadpage(media_url, only_headers=True).headers.get("content-disposition", "")
|
||||
ext = scrapertools.find_single_match(ext, 'filename="([^"]+)"')
|
||||
if ext:
|
||||
ext = ext[-4:]
|
||||
video_urls.append(["%s [filez]" % ext, media_url])
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "21/03/2017",
|
||||
"description": "Mejorado el test de video y uso de httptools"
|
||||
},
|
||||
{
|
||||
"date": "04/06/2016",
|
||||
"description": "Reparado por cambio en la url embebida"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "flashx.(?:tv|pw)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)",
|
||||
"url": "https://www.flashx.tv/playvid-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "flashx",
|
||||
"name": "flashx",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_flashx.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+137
@@ -0,0 +1,137 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import base64
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from core import config
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
|
||||
if 'File Not Found' in data or 'file was deleted' in data:
|
||||
return False, "[FlashX] El archivo no existe o ha sido borrado"
|
||||
elif 'Video is processing now' in data:
|
||||
return False, "[FlashX] El archivo se está procesando"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
# Lo pide una vez
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
# Si salta aviso, se carga la pagina de comprobacion y luego la inicial
|
||||
if "You try to access this video with Kodi" in data:
|
||||
url_reload = scrapertools.find_single_match(data, 'try to reload the page.*?href="([^"]+)"')
|
||||
url_reload = "http://www.flashx.tv" + url_reload[1:]
|
||||
try:
|
||||
data = httptools.downloadpage(url_reload, cookies=False).data
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
except:
|
||||
pass
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, "<script type='text/javascript'>(.*?)</script>")
|
||||
for n, m in enumerate(matches):
|
||||
if m.startswith("eval"):
|
||||
try:
|
||||
m = jsunpack.unpack(m)
|
||||
fake = (scrapertools.find_single_match(m, "(\w{40,})") == "")
|
||||
if fake:
|
||||
m = ""
|
||||
else:
|
||||
break
|
||||
except:
|
||||
m = ""
|
||||
match = m
|
||||
if "sources:[{file:" not in match:
|
||||
page_url = page_url.replace("playvid-", "")
|
||||
|
||||
headers = {'Host': 'www.flashx.tv',
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
'Accept-Encoding': 'gzip, deflate, br', 'Connection': 'keep-alive', 'Upgrade-Insecure-Requests': '1',
|
||||
'Cookie': ''}
|
||||
data = httptools.downloadpage(page_url, headers=headers, replace_headers=True).data
|
||||
flashx_id = scrapertools.find_single_match(data, 'name="id" value="([^"]+)"')
|
||||
fname = scrapertools.find_single_match(data, 'name="fname" value="([^"]+)"')
|
||||
hash_f = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)"')
|
||||
post = 'op=download1&usr_login=&id=%s&fname=%s&referer=&hash=%s&imhuman=Proceed+to+video' % (
|
||||
flashx_id, urllib.quote(fname), hash_f)
|
||||
wait_time = scrapertools.find_single_match(data, "<span id='xxc2'>(\d+)")
|
||||
|
||||
file_id = scrapertools.find_single_match(data, "'file_id', '([^']+)'")
|
||||
coding_url = 'https://files.fx.fastcontentdelivery.com/jquery2.js?fx=%s' % base64.encodestring(file_id)
|
||||
headers['Host'] = "files.fx.fastcontentdelivery.com"
|
||||
headers['Referer'] = "https://www.flashx.tv/"
|
||||
headers['Accept'] = "*/*"
|
||||
coding = httptools.downloadpage(coding_url, headers=headers, replace_headers=True).data
|
||||
|
||||
coding_url = 'https://www.flashx.tv/counter.cgi?fx=%s' % base64.encodestring(file_id)
|
||||
headers['Host'] = "www.flashx.tv"
|
||||
coding = httptools.downloadpage(coding_url, headers=headers, replace_headers=True).data
|
||||
|
||||
coding_url = 'https://www.flashx.tv/flashx.php?fxfx=3'
|
||||
headers['X-Requested-With'] = 'XMLHttpRequest'
|
||||
coding = httptools.downloadpage(coding_url, headers=headers, replace_headers=True).data
|
||||
|
||||
try:
|
||||
time.sleep(int(wait_time) + 1)
|
||||
except:
|
||||
time.sleep(6)
|
||||
|
||||
headers.pop('X-Requested-With')
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
||||
data = httptools.downloadpage('https://www.flashx.tv/dl?playthis', post, headers, replace_headers=True).data
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+</script>")
|
||||
for match in matches:
|
||||
if match.startswith("eval"):
|
||||
try:
|
||||
match = jsunpack.unpack(match)
|
||||
fake = (scrapertools.find_single_match(match, "(\w{40,})") == "")
|
||||
if fake:
|
||||
match = ""
|
||||
else:
|
||||
break
|
||||
except:
|
||||
match = ""
|
||||
|
||||
if not match:
|
||||
match = data
|
||||
|
||||
# Extrae la URL
|
||||
# {file:"http://f11-play.flashx.tv/luq4gfc7gxixexzw6v4lhz4xqslgqmqku7gxjf4bk43u4qvwzsadrjsozxoa/video1.mp4"}
|
||||
video_urls = []
|
||||
media_urls = scrapertools.find_multiple_matches(match, '\{file\:"([^"]+)",label:"([^"]+)"')
|
||||
subtitle = ""
|
||||
for media_url, label in media_urls:
|
||||
if media_url.endswith(".srt") and label == "Spanish":
|
||||
try:
|
||||
from core import filetools
|
||||
data = scrapertools.downloadpage(media_url)
|
||||
subtitle = os.path.join(config.get_data_path(), 'sub_flashx.srt')
|
||||
filetools.write(subtitle, data)
|
||||
except:
|
||||
import traceback
|
||||
logger.info("Error al descargar el subtítulo: " + traceback.format_exc())
|
||||
|
||||
for media_url, label in media_urls:
|
||||
if not media_url.endswith("png") and not media_url.endswith(".srt"):
|
||||
video_urls.append(["." + media_url.rsplit('.', 1)[1] + " [flashx]", media_url, 0, subtitle])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": {
|
||||
"value": "http://www.4shared.com/flash/player.swf"
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(http://www.4shared.com/embed/[A-Z0-9a-z]+/[A-Z0-9a-z]+)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "file=(http\\://[a-z0-9]+.4shared.com/img/.*?\\.flv)",
|
||||
"url": "\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(http://www.4shared.com.*?)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fourshared",
|
||||
"name": "fourshared",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
video_urls = []
|
||||
|
||||
if page_url.startswith("http://www.4shared"):
|
||||
# http://www.4shared.com/embed/392975628/ff297d3f
|
||||
page_url = scrapertools.get_header_from_response(page_url, header_to_get="location")
|
||||
|
||||
# http://www.4shared.com/flash/player.swf?file=http://dc237.4shared.com/img/392975628/ff297d3f/dlink__2Fdownload_2Flj9Qu-tF_3Ftsid_3D20101030-200423-87e3ba9b/preview.flv&d
|
||||
logger.info("redirect a '%s'" % page_url)
|
||||
patron = "file\=([^\&]+)\&"
|
||||
matches = re.compile(patron, re.DOTALL).findall(page_url)
|
||||
|
||||
try:
|
||||
video_urls.append(["[fourshared]", matches[0]])
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
video_urls.append(["[fourshared]", page_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(freakshare.com/files/[^/]+/[^\"'\\n ]+)",
|
||||
"url": "http://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "freakshare",
|
||||
"name": "freakshare",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Existe: http://freakshare.com/files/wy6vs8zu/4x01-mundo-primitivo.avi.html
|
||||
# No existe:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
patron = '<h1 class="box_heading" style="text-align:center;">([^<]+)</h1>'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
if len(matches) > 0:
|
||||
return True, ""
|
||||
else:
|
||||
patron = '<div style="text-align:center;"> (Este archivo no existe)'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
return False, matches[0]
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
return video_urls
|
||||
Executable
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "09/05/17",
|
||||
"description": "Arreglado con el cambio de user agent"
|
||||
},
|
||||
{
|
||||
"date": "24/04/17",
|
||||
"description": "Detectado mensaje:video se está procesando"
|
||||
},
|
||||
{
|
||||
"date": "23/03/17",
|
||||
"description": "Arreglado con el cambio de user agent"
|
||||
},
|
||||
{
|
||||
"date": "07/11/16",
|
||||
"description": "Modificado orden de los videos"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [{
|
||||
"pattern": "gamovideo.com/(?:embed-|)([a-z0-9]+)",
|
||||
"url": "http://gamovideo.com/embed-\\1.html"
|
||||
}]
|
||||
},
|
||||
"free": true,
|
||||
"id": "gamovideo",
|
||||
"name": "gamovideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_gamovideo.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0'}
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url, headers=headers).data
|
||||
|
||||
if "File was deleted" in data or "Not Found" in data or "File was locked by administrator" in data:
|
||||
return False, "[Gamovideo] El archivo no existe o ha sido borrado"
|
||||
if "Video is processing now" in data:
|
||||
return False, "[Gamovideo] El video está procesándose en estos momentos. Inténtelo mas tarde."
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url, headers=headers).data
|
||||
|
||||
packer = scrapertools.find_single_match(data,
|
||||
"<script type='text/javascript'>(eval.function.p,a,c,k,e,d..*?)</script>")
|
||||
if packer != "":
|
||||
data = jsunpack.unpack(packer)
|
||||
|
||||
data = re.sub(r'\n|\t|\s+', '', data)
|
||||
|
||||
host = scrapertools.find_single_match(data, '\[\{image:"(http://[^/]+/)')
|
||||
mediaurl = scrapertools.find_single_match(data, ',\{file:"([^"]+)"')
|
||||
if not mediaurl.startswith(host):
|
||||
mediaurl = host + mediaurl
|
||||
|
||||
rtmp_url = scrapertools.find_single_match(data, 'file:"(rtmp[^"]+)"')
|
||||
playpath = scrapertools.find_single_match(rtmp_url, 'mp4:.*$')
|
||||
rtmp_url = rtmp_url.split(playpath)[
|
||||
0] + " playpath=" + playpath + " swfUrl=http://gamovideo.com/player61/jwplayer.flash.swf"
|
||||
|
||||
video_urls = []
|
||||
video_urls.append(["RTMP [gamovideo]", rtmp_url])
|
||||
video_urls.append([scrapertools.get_filename_from_url(mediaurl)[-4:] + " [gamovideo]", mediaurl])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(gigasize.com/get/[a-z0-9]+)",
|
||||
"url": "http://www.\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "gigasize.com/get.php\\?d\\=([a-z0-9]+)",
|
||||
"url": "http://www.gigasize.com/get/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "gigasize",
|
||||
"name": "gigasize",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
# Vídeo borrado: http://www.gigasize.com/get/097fadecgh7pf
|
||||
# Video erróneo:
|
||||
data = scrapertools.cache_page(page_url)
|
||||
if '<h2 class="error">Download error</h2>' in data:
|
||||
return False, "El enlace no es válido<br/>o ha sido borrado de gigasize"
|
||||
else:
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "http://video.google.com/googleplayer.swf.*?docid=([0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "googlevideo",
|
||||
"name": "googlevideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+32
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
video_urls = []
|
||||
|
||||
# Lo extrae a partir de flashvideodownloader.org
|
||||
if page_url.startswith("http://"):
|
||||
url = 'http://www.flashvideodownloader.org/download.php?u=' + page_url
|
||||
else:
|
||||
url = 'http://www.flashvideodownloader.org/download.php?u=http://video.google.com/videoplay?docid=' + page_url
|
||||
logger.info("url=" + url)
|
||||
data = scrapertools.cache_page(url)
|
||||
|
||||
# Extrae el vídeo
|
||||
newpatron = '</script>.*?<a href="(.*?)" title="Click to Download">'
|
||||
newmatches = re.compile(newpatron, re.DOTALL).findall(data)
|
||||
if len(newmatches) > 0:
|
||||
video_urls.append(["[googlevideo]", newmatches[0]])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "hugefiles.net/([a-z0-9]+)",
|
||||
"url": "http://www.hugefiles.net/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": false,
|
||||
"id": "hugefiles",
|
||||
"name": "hugefiles",
|
||||
"premium": [
|
||||
"realdebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_hugefiles.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
# Submit
|
||||
post = {}
|
||||
r = re.findall(r'type="hidden" name="(.+?)"\s* value="?(.+?)">', data)
|
||||
for name, value in r:
|
||||
post[name] = value
|
||||
post.update({'method_free': 'Free Download'})
|
||||
data = scrapertools.cache_page(page_url, post=urllib.urlencode(post))
|
||||
|
||||
# Get link
|
||||
sPattern = '''<div id="player_code">.*?<script type='text/javascript'>(eval.+?)</script>'''
|
||||
r = re.findall(sPattern, data, re.DOTALL | re.I)
|
||||
mediaurl = ""
|
||||
if r:
|
||||
sUnpacked = jsunpack.unpack(r[0])
|
||||
sUnpacked = sUnpacked.replace("\\'", "")
|
||||
r = re.findall('file,(.+?)\)\;s1', sUnpacked)
|
||||
if not r:
|
||||
r = re.findall('"src"value="(.+?)"/><embed', sUnpacked)
|
||||
|
||||
mediaurl = r[0]
|
||||
|
||||
video_urls = []
|
||||
video_urls.append([scrapertools.get_filename_from_url(mediaurl)[-4:] + " [hugefiles]", mediaurl])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "idowatch.net/(?:embed-)?([a-z0-9]+)",
|
||||
"url": "http://idowatch.net/\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "idowatch",
|
||||
"name": "idowatch",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_idowatch.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = scrapertools.cache_page(page_url)
|
||||
if "File Not Found" in data:
|
||||
return False, "[Idowatch] El archivo 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)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
mediaurl = scrapertools.find_single_match(data, ',{file:(?:\s+|)"([^"]+)"')
|
||||
if not mediaurl:
|
||||
matches = scrapertools.find_single_match(data,
|
||||
"<script type='text/javascript'>(eval\(function\(p,a,c,k,e,d.*?)</script>")
|
||||
matchjs = jsunpack.unpack(matches).replace("\\", "")
|
||||
mediaurl = scrapertools.find_single_match(matchjs, ',{file:(?:\s+|)"([^"]+)"')
|
||||
|
||||
video_urls = []
|
||||
video_urls.append([scrapertools.get_filename_from_url(mediaurl)[-4:] + " [idowatch]", mediaurl])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+49
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "28/04/2017",
|
||||
"description": "Version inicial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "kingvid.tv/(?:embed-|)([A-z0-9]+)",
|
||||
"url": "http://kingvid.tv/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "kingvid",
|
||||
"name": "kingvid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/oq0tPhY.png?1",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "<title>watch </title>" in data.lower():
|
||||
return False, "[kingvid] El archivo 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)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
match = scrapertools.find_single_match(data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
|
||||
data = jsunpack.unpack(match)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, 'file\s*:\s*"([^"]+)"\}')
|
||||
video_urls = []
|
||||
for video_url in matches:
|
||||
filename = scrapertools.get_filename_from_url(video_url)[-4:]
|
||||
if video_url.endswith("smil"):
|
||||
playpath = video_url.rsplit("/", 1)[1].replace(".smil", "")
|
||||
rtmp = scrapertools.find_single_match(data, 'image\s*:\s*"([^"]+)"')
|
||||
rtmp = scrapertools.find_single_match(rtmp, 'i/(.*?)_')
|
||||
video_url = "rtmp://kingvid.tv:1935/vod/ playpath=mp4:%s_n?h=%s " \
|
||||
"swfUrl=http://kingvid.tv/player7/jwplayer.flash.swf pageUrl=%s" % \
|
||||
(rtmp, playpath, page_url)
|
||||
filename = "RTMP"
|
||||
video_urls.append([filename + " [kingvid]", video_url])
|
||||
elif video_url[-4:] in ['.mp4', 'm3u8']:
|
||||
video_urls.append([filename + " [kingvid]", video_url])
|
||||
|
||||
video_urls.sort(key=lambda x: x[0], reverse=True)
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "04/06/2016",
|
||||
"description": "Reparado porque a veces devuelve enlace directo al video y no ofuscado"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "letwatch.(?:us|to)/(?:embed-|)([a-z0-9A-Z]+)(?:.html|)",
|
||||
"url": "http://letwatch.to/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "letwatch",
|
||||
"name": "letwatch",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+45
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
if ("File was deleted" or "Not Found") in data:
|
||||
return False, "[Letwatch] El archivo no existe o ha sido borrado"
|
||||
if "Video is processing now" in data:
|
||||
return False, "El vídeo está siendo procesado todavía"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
video_urls = []
|
||||
media_urls = scrapertools.find_multiple_matches(data, '\{file\:"([^"]+)",label\:"([^"]+)"\}')
|
||||
if len(media_urls) > 0:
|
||||
for media_url, label in media_urls:
|
||||
video_urls.append(
|
||||
[scrapertools.get_filename_from_url(media_url)[-4:] + " (" + label + ") [letwatch]", media_url])
|
||||
else:
|
||||
matches = scrapertools.find_single_match(data, "<script type='text/javascript'>(eval\(function\(p,a,c,k,e,d.*?)"
|
||||
"</script>")
|
||||
matchjs = jsunpack.unpack(matches).replace("\\", "")
|
||||
media_urls = scrapertools.find_multiple_matches(matchjs, '\{file\:"([^"]+)",label\:"([^"]+)"\}')
|
||||
for media_url, label in media_urls:
|
||||
video_urls.append(
|
||||
[scrapertools.get_filename_from_url(media_url)[-4:] + " (" + label + ") [letwatch]", media_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+56
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "05/03/2017",
|
||||
"description": "Reparado por cambios y corregidas expresiones regulares"
|
||||
},
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión inicial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:videoapi|api.video).my.mail.ru/(?:videos|video)/embed/(mail|inbox)/([^/]+)/.*?/(\\d+).html",
|
||||
"url": "http://videoapi.my.mail.ru/videos/embed/\\1/\\2/_myvideo/\\3.html"
|
||||
},
|
||||
{
|
||||
"pattern": "my.mail.ru/(?:videos|video)/embed/(?!mail|inbox)([\\w]+)",
|
||||
"url": "http://my.mail.ru/+/video/meta/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "mailru",
|
||||
"name": "mailru",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
page_url = page_url.replace("embed/", "").replace(".html", ".json")
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if '"error":"video_not_found"' in data or '"error":"Can\'t find VideoInstance"' in data:
|
||||
return False, "[Mail.ru] El archivo 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 = []
|
||||
# Carga la página para coger las cookies
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
# Nueva url
|
||||
url = page_url.replace("embed/", "").replace(".html", ".json")
|
||||
# Carga los datos y los headers
|
||||
response = httptools.downloadpage(url)
|
||||
data = jsontools.load(response.data)
|
||||
|
||||
# La cookie video_key necesaria para poder visonar el video
|
||||
cookie_video_key = scrapertools.find_single_match(response.headers["set-cookie"], '(video_key=[a-f0-9]+)')
|
||||
|
||||
# Formar url del video + cookie video_key
|
||||
for videos in data['videos']:
|
||||
media_url = videos['url'] + "|Referer=https://my1.imgsmail.ru/r/video2/uvpv3.swf?75&Cookie=" + cookie_video_key
|
||||
if not media_url.startswith("http"):
|
||||
media_url = "http:" + media_url
|
||||
quality = " %s" % videos['key']
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + quality + " [mail.ru]", media_url])
|
||||
try:
|
||||
video_urls.sort(key=lambda video_urls: int(video_urls[0].rsplit(" ", 2)[1][:-1]))
|
||||
except:
|
||||
pass
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+52
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "mediafire.com(?:/download.php\\?|/download/|/file/|/\\?|\\%2F\\%3F)([a-z0-9]+)",
|
||||
"url": "http://www.mediafire.com/?\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "mediafire",
|
||||
"name": "mediafire",
|
||||
"premium": [
|
||||
"realdebrid",
|
||||
"alldebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "Invalid or Deleted File" in data:
|
||||
return False, "[Mediafire] El archivo no existe o ha sido borrado"
|
||||
elif "File Removed for Violation" in data:
|
||||
return False, "[Mediafire] Archivo eliminado por infracción"
|
||||
|
||||
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 = 'kNO \= "([^"]+)"'
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
if len(matches) > 0:
|
||||
video_urls.append([matches[0][-4:] + " [mediafire]", matches[0]])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Executable
+64
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(mega.co.nz/\\#\\![A-Za-z0-9\\-\\_]+\\![A-Za-z0-9\\-\\_]+)",
|
||||
"url": "https://\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(mega.co.nz/\\#F\\![A-Za-z0-9\\-\\_]+\\![A-Za-z0-9\\-\\_]+)",
|
||||
"url": "https://\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(mega.nz/\\#\\![A-Za-z0-9\\-\\_]+\\![A-Za-z0-9\\-\\_]+)",
|
||||
"url": "https://\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(mega.nz/\\#F\\![A-Za-z0-9\\-\\_]+\\![A-Za-z0-9\\-\\_]+)",
|
||||
"url": "https://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "mega",
|
||||
"name": "mega",
|
||||
"premium": [
|
||||
"realdebrid"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_mega.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
from platformcode import platformtools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
from megaserver import Client
|
||||
|
||||
c = Client(url=page_url, is_playing_fnc=platformtools.is_playing)
|
||||
|
||||
files = c.get_files()
|
||||
|
||||
# si hay mas de 5 archivos crea un playlist con todos
|
||||
if len(files) > 5:
|
||||
media_url = c.get_play_list()
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [mega]", media_url])
|
||||
else:
|
||||
for f in files:
|
||||
media_url = f["url"]
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [mega]", media_url])
|
||||
|
||||
return video_urls
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"changes": [
|
||||
{
|
||||
"date": "25/03/2016",
|
||||
"description": "Versión incial"
|
||||
}
|
||||
],
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "movshare.net/(?:embed|video)/([a-z0-9]+)",
|
||||
"url": "http://www.movshare.net/video/\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "movshare.net/embed.php\\?v\\=([a-z0-9]+)",
|
||||
"url": "http://www.movshare.net/video/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "movshare",
|
||||
"name": "movshare",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "Incluir en lista negra",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "Incluir en lista de favoritos",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_movshare.png",
|
||||
"version": 1
|
||||
}
|
||||
Executable
+51
@@ -0,0 +1,51 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import logger
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.cache_page(page_url)
|
||||
|
||||
if "This file no longer exists on our servers" in data:
|
||||
return False, "El fichero ha sido borrado de movshare"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
# Returns an array of possible video url's from the page_url
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
videoid = scrapertools.get_match(page_url, "http://www.movshare.net/video/([a-z0-9]+)")
|
||||
video_urls = []
|
||||
|
||||
# Descarga la página
|
||||
headers = []
|
||||
headers.append(
|
||||
['User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'])
|
||||
html = scrapertools.cache_page(page_url, headers=headers)
|
||||
|
||||
# La vuelve a descargar, como si hubieras hecho click en el botón
|
||||
# html = scrapertools.cache_page(page_url , headers = headers)
|
||||
filekey = scrapertools.find_single_match(html, 'flashvars.filekey="([^"]+)"')
|
||||
|
||||
# get stream url from api
|
||||
api = 'http://www.movshare.net/api/player.api.php?key=%s&file=%s' % (filekey, videoid)
|
||||
headers.append(['Referer', page_url])
|
||||
|
||||
html = scrapertools.cache_page(api, headers=headers)
|
||||
logger.info("html=" + html)
|
||||
stream_url = scrapertools.find_single_match(html, 'url=(.+?)&title')
|
||||
|
||||
if stream_url != "":
|
||||
video_urls.append([scrapertools.get_filename_from_url(stream_url)[-4:] + " [movshare]", stream_url])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user