folder reorganization
This commit is contained in:
@@ -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__), "..")))
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": ["http://akvideo.stream/video"],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "akvideo.stream\/video\/(?:embed-)?([a-zA-Z0-9]+)",
|
||||
"url": "http://akvideo.stream\/video\/\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "akvideo.stream/(?:embed-)?([a-zA-Z0-9]+)",
|
||||
"url": "http://akvideo.stream/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "akstream",
|
||||
"name": "akstream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "$ADDON[plugin.video.kod 60654]",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "$ADDON[plugin.video.kod 60655]",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# by DrZ3r0
|
||||
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
return True, ""
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "File was deleted" in data or "Page Cannot Be Found" in data:
|
||||
return False, config.get_localized_string(70449) % "Akstream"
|
||||
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.replace('https','http')
|
||||
|
||||
vres = scrapertools.find_multiple_matches(data, 'nowrap[^>]+>([^,]+)')
|
||||
data_pack = scrapertools.find_single_match(data, "(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||
if data_pack != "":
|
||||
from lib import jsunpack
|
||||
data = jsunpack.unpack(data_pack)
|
||||
|
||||
# URL
|
||||
matches = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)')
|
||||
_headers = urllib.urlencode(httptools.default_headers)
|
||||
|
||||
i = 0
|
||||
for media_url in matches:
|
||||
# URL del vídeo
|
||||
video_urls.append([vres[i] + " mp4 [Akstream] ", media_url + '|' + _headers])
|
||||
i = i + 1
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info(" %s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(s[0-9]+\\.animeid.tv/\\?vid=[A-z0-9-_]+)",
|
||||
"url": "https://\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "animeid",
|
||||
"name": "animeid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": ""
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "no longer exists" in data or "to copyright issues" in data:
|
||||
return False, "[animeid] El video ha sido borrado"
|
||||
if "please+try+again+later." in data:
|
||||
return False, "[animeid] Error de animeid, no se puede generar el enlace al video"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
video_urls = []
|
||||
label, videourl = scrapertools.find_single_match(data, 'label":"([^"]+)".*?file":"([^"]+)')
|
||||
if "animeid.tv" in videourl:
|
||||
videourl = httptools.downloadpage(videourl, follow_redirects=False, only_headers=True).headers.get("location", "")
|
||||
video_urls.append([".MP4 " + label + " [animeid]", videourl])
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://(?:anonfile|bayfiles).com/\\w+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "anonfile",
|
||||
"name": "anonfile",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://anonfile.com/img/logo/logo-anonfile.png"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector anonfile By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
response = httptools.downloadpage(page_url)
|
||||
if not response.sucess or "Not Found" in response.data or "File was deleted" in response.data or "is no longer available" in response.data:
|
||||
return False, "[anonfile] El fichero no existe o ha sido borrado"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
patron = 'id="download-quality-(\w+).*?href="([^"]+)"'
|
||||
match = scrapertools.find_multiple_matches(data, patron)
|
||||
for calidad, media_url in match:
|
||||
title = "%s [anonfile]" % (calidad)
|
||||
video_urls.append([title, media_url, int(calidad.replace("p", ""))])
|
||||
|
||||
video_urls.sort(key=lambda x: x[2])
|
||||
for video_url in video_urls:
|
||||
video_url[2] = 0
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://archive.org/embed/(.*)",
|
||||
"url": "https://archive.org/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "ArchiveOrg",
|
||||
"name": "archiveorg",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://i.postimg.cc/P5ZYJM4L/archiveorg.png"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector ArchiveOrg By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[ArchiveOrg] 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
|
||||
patron = '<meta property="og:video" content="([^"]+)">'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url in matches:
|
||||
video_urls.append(['.MP4 [ArchiveOrg]', url])
|
||||
return video_urls
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "backin.net/([a-zA-Z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "backin",
|
||||
"name": "backin",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
|
||||
import xbmc
|
||||
|
||||
from platformcode import logger
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = scrapertools.downloadpage(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("page_url=" + page_url)
|
||||
|
||||
video_urls = []
|
||||
|
||||
headers = [["User-Agent", "Mozilla/5.0 (Windows NT 6.1; rv:54.0) Gecko/20100101 Firefox/54.0"]]
|
||||
|
||||
|
||||
|
||||
# First access
|
||||
httptools.downloadpage("http://backin.net/s/streams.php?s=%s" % page_url, headers=headers)
|
||||
|
||||
# xbmc.sleep(10000)
|
||||
headers.append(["Referer", "http://backin.net/%s" % page_url])
|
||||
#xbmc.sleep(10000)
|
||||
data = httptools.downloadpage("http://backin.net/stream-%s-500x400.html" % page_url, headers=headers).data
|
||||
|
||||
data_pack = scrapertools.find_single_match(data, r"(eval.function.p,a,c,k,e,.*?)\s*</script>")
|
||||
if data_pack:
|
||||
from lib import jsunpack
|
||||
data = jsunpack.unpack(data_pack)
|
||||
logger.info("page_url=" + data)
|
||||
|
||||
# URL
|
||||
url = scrapertools.find_single_match(data, r'"src"value="([^"]+)"')
|
||||
if not url:
|
||||
url = scrapertools.find_single_match(data, r'file\s*:\s*"([^"]+)"')
|
||||
logger.info("URL=" + str(url))
|
||||
|
||||
# URL del vídeo
|
||||
video_urls.append([".mp4" + " [backin]", url + '|' + urllib.urlencode(dict(headers))])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://bdupload.info/[A-z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "bdupload",
|
||||
"name": "bdupload",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s18.postimg.cc/68colqvyx/logo-bdupload.png",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import time
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'}
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Archive no Encontrado" in data:
|
||||
return False, "[bdupload] El fichero ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
post = ""
|
||||
patron = '(?s)type="hidden" name="([^"]+)".*?value="([^"]*)"'
|
||||
match = scrapertools.find_multiple_matches(data, patron)
|
||||
for nombre, valor in match:
|
||||
post += nombre + "=" + valor + "&"
|
||||
time.sleep(1)
|
||||
data1 = httptools.downloadpage(page_url, post = post, headers = headers).data
|
||||
patron = "window.open\('([^']+)"
|
||||
file = scrapertools.find_single_match(data1, patron).replace(" ","%20")
|
||||
file += "|User-Agent=" + headers['User-Agent']
|
||||
video_urls = []
|
||||
videourl = file
|
||||
video_urls.append([".MP4 [bdupload]", videourl])
|
||||
return video_urls
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(http://b.ter.tv/v/[A-z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "bitertv",
|
||||
"name": "Bitertv",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s18.postimg.cc/f56rayqq1/logo-bitertv.png",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36'}
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Archive no Encontrado" in data or "File has been removed" in data:
|
||||
return False, "[bitertv] El fichero ha sido borrado"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
patron = "(?s)file: '([^']+)"
|
||||
file = scrapertools.find_single_match(data, patron)
|
||||
video_urls.append([".MP4 [bitertv]", file])
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://www.bitporno.com/(?:e|embed)/([A-z0-9]+)",
|
||||
"url": "https://www.bitporno.com/e/\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "raptu.com/(?:\\?v=|embed/|e/|v/)([A-z0-9]+)",
|
||||
"url": "https://www.bitporno.com/e/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "bitp",
|
||||
"name": "bitp",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s26.postimg.cc/maiur9tmx/bitp1.png"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# ------------------------------------------------------------
|
||||
# Alfa addon - KODI Plugin
|
||||
# Conector para bitporno
|
||||
# https://github.com/alfa-addon
|
||||
# ------------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Object not found" in data or "no longer exists" in data or '"sources": [false]' in data:
|
||||
return False, "[bitp] El archivo no existe o ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
videourl = scrapertools.find_multiple_matches(data, '<source src="(http[^"]+).*?title="([^"]+)')
|
||||
scrapertools.printMatches(videourl)
|
||||
for scrapedurl, scrapedquality in videourl:
|
||||
if "loadthumb" in scrapedurl:
|
||||
continue
|
||||
scrapedurl = scrapedurl.replace("\\","")
|
||||
video_urls.append([scrapedquality + " [bitp]", scrapedurl])
|
||||
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
|
||||
return video_urls
|
||||
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Error - Archivo no disponible" in data or "Por favor seleccione el archivo a cargar" in data:
|
||||
return False, "Archivo no encontrado"
|
||||
patron = '<b>()'
|
||||
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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://cinemaupload.com/embed/([a-zA-Z0-9]+)",
|
||||
"url": "https://cinemaupload.com/embed/\\1/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "cinemaupload",
|
||||
"name": "cinemaupload",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://cinemaupload.com/static/img/logo1.png"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector Cinemaupload By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[CinemaUpload] 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
|
||||
data = re.sub(r'\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
patron = "source: '([^']+)',"
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for url in matches:
|
||||
video_urls.append(['.m3u8 [CinemaUpload]', url])
|
||||
return video_urls
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
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
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "clipwatching.com/(e.*?.html)",
|
||||
"url": "http://clipwatching.com/\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "clipwatching.com/(\\w+)",
|
||||
"url": "http://clipwatching.com/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "clipwatching",
|
||||
"name": "clipwatching",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s17.postimg.cc/e6kcan0vj/clipwatching1.png"
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger, config
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "File Not Found" in data or "File was deleted" in data:
|
||||
return False, config.get_localized_string(70292) % "ClipWatching"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
packed = scrapertools.find_single_match(data, "text/javascript'>(.*?)\s*</script>")
|
||||
unpacked = jsunpack.unpack(packed)
|
||||
video_urls = []
|
||||
videos = scrapertools.find_multiple_matches(unpacked, 'file:"([^"]+).*?label:"([^"]+)')
|
||||
for video, label in videos:
|
||||
if ".jpg" not in video:
|
||||
video_urls.append([label + " [clipwatching]", video])
|
||||
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://cloudvideo.tv/embed-([a-z0-9]+).html",
|
||||
"url": "https://cloudvideo.tv/embed-\\1.html"
|
||||
},
|
||||
{
|
||||
"pattern": "https://cloudvideo.tv/([a-z0-9]+)",
|
||||
"url": "https://cloudvideo.tv/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "cloudvideo",
|
||||
"name": "cloudvideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://cloudvideo.tv/static/img/logo5.png"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
# Conector Cloudvideo By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[Cloud] 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
|
||||
enc_data = scrapertools.find_single_match(data, "type='text/javascript'>(.*?)</script>")
|
||||
dec_data = jsunpack.unpack(enc_data)
|
||||
sources = scrapertools.find_single_match(data, "<source(.*?)</source")
|
||||
patron = 'src="([^"]+)'
|
||||
matches = scrapertools.find_multiple_matches(sources, patron)
|
||||
for url in matches:
|
||||
quality = 'm3u8'
|
||||
video_url = url
|
||||
if 'label' in url:
|
||||
url = url.split(',')
|
||||
video_url = url[0]
|
||||
quality = url[1].replace('label:','')
|
||||
video_urls.append(['cloudvideo [%s]' % quality, video_url])
|
||||
return video_urls
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import base64
|
||||
import struct
|
||||
import zlib
|
||||
from hashlib import sha1
|
||||
|
||||
from core import filetools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config, logger
|
||||
|
||||
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 = "https://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')
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
response = httptools.downloadpage(page_url)
|
||||
if "Contenido rechazado" in response.data:
|
||||
return False, "[Dailymotion] El archivo no existe o ha sido borrado"
|
||||
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("\\", "")
|
||||
subtitle = scrapertools.find_single_match(data, '"subtitles":.*?"es":.*?urls":\["([^"]+)"')
|
||||
qualities = scrapertools.find_multiple_matches(data, '"([^"]+)":(\[\{"type":".*?\}\])')
|
||||
for calidad, urls in qualities:
|
||||
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_http = scrapertools.find_single_match(data_m3u8, '(http:.*?\.m3u8)')
|
||||
if stream_url_http:
|
||||
stream_url = stream_url_http
|
||||
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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?:datoporn.com|dato.porn|datoporn.co)/(?: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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/tBSWudd.png?1"
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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, 'src: "([^"]+)",.*?label: "([^"]+)"')
|
||||
#media_urls = scrapertools.find_multiple_matches(data, 'file\:"([^"]+\.mp4)",label:"([^"]+)"')
|
||||
# if not media_urls:
|
||||
# match = scrapertools.find_single_match(data, "p,a,c,k(.*?)</script>")
|
||||
# try:
|
||||
# data = jsunpack.unpack(match)
|
||||
# except:
|
||||
# pass
|
||||
# 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 not m3u8:
|
||||
m3u8 = str(scrapertools.find_multiple_matches(data, 'player.updateSrc\({src:.?"([^"]+\.m3u8)"')).replace("['", "").replace("']", "")
|
||||
calidades = ['720p']
|
||||
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
|
||||
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"active": true,
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode 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 = correct_url(page_url)
|
||||
dd1 = httptools.downloadpage("https://api.alldebrid.com/user/login?agent=mySoft&username=%s&password=%s" %(user, password)).data
|
||||
token = scrapertools.find_single_match(dd1, 'token":"([^"]+)')
|
||||
dd2 = httptools.downloadpage("https://api.alldebrid.com/link/unlock?agent=mySoft&token=%s&link=%s" %(token, page_url)).data
|
||||
link = scrapertools.find_single_match(dd2, 'link":"([^"]+)')
|
||||
link = link.replace("\\","")
|
||||
video_urls = []
|
||||
if link:
|
||||
extension = "mp4 [alldebrid]"
|
||||
video_urls.append([extension, 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
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"active": true,
|
||||
"free": false,
|
||||
"id": "realdebrid",
|
||||
"name": "Real-Debrid",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "premium",
|
||||
"label": "@70272",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from core import jsontools
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import config, logger
|
||||
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 = httptools.downloadpage(url, post=post_link, headers=headers.items()).data
|
||||
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 = httptools.downloadpage("https://api.real-debrid.com/oauth/v2/token", post=post_token,
|
||||
headers=headers.items()).data
|
||||
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 = httptools.downloadpage(url, post=post_link, headers=headers.items()).data
|
||||
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 = httptools.downloadpage(url, headers=headers.items()).data
|
||||
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(config.get_localized_string(70414),
|
||||
config.get_localized_string(60252) % verify_url,
|
||||
config.get_localized_string(70413) % user_code,
|
||||
config.get_localized_string(60254))
|
||||
|
||||
# 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 = httptools.downloadpage(url, headers=headers.items()).data
|
||||
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 = htttools.downloadpage("https://api.real-debrid.com/oauth/v2/token", post=post,
|
||||
headers=headers.items()).data
|
||||
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 ""
|
||||
@@ -0,0 +1 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from base64 import b64decode
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_long_url(short_url):
|
||||
logger.info("short_url = '%s'" % short_url)
|
||||
|
||||
data = httptools.downloadpage(short_url).data
|
||||
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 = httptools.downloadpage(decoded_uri).data
|
||||
decoded_uri = scrapertools.find_single_match(data, "window.location = '([^']+)'")
|
||||
|
||||
return decoded_uri
|
||||
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from lib import unshortenit
|
||||
|
||||
def expand_url(url):
|
||||
e = unshortenit.UnshortenIt()
|
||||
estado = 200
|
||||
|
||||
while estado != 0:
|
||||
long_url, estado = e.unshorten(url)
|
||||
url = long_url
|
||||
|
||||
return long_url
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
# 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.scrapertools.find_single_match(value, '(.*?)\=.*?\;')
|
||||
cookie_value = scrapertools.scrapertools.find_single_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.scrapertools.find_single_match(body, '<textarea.*?class="caja_des">([^<]+)</textarea>')
|
||||
logger.info("location=" + location)
|
||||
break
|
||||
except:
|
||||
n = n + 1
|
||||
if n > 3:
|
||||
break
|
||||
|
||||
return location
|
||||
@@ -0,0 +1,45 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_server_list():
|
||||
servers = []
|
||||
data = httptools.downloadpage("http://longurl.org/services").data
|
||||
data = scrapertools.unescape(data)
|
||||
data = scrapertools.find_single_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 = httptools.downloadpage(
|
||||
"http://api.longurl.org/v2/expand?url=" + urllib.quote_plus(short_url)).data
|
||||
logger.info(longurl_data)
|
||||
try:
|
||||
long_url = scrapertools.scrapertools.find_single_match(longurl_data, '<long-url><!\[CDATA\[(.*?)\]\]></long-url>')
|
||||
except:
|
||||
long_url = ""
|
||||
if (long_url <> ""): data = data.replace(short_url, long_url)
|
||||
return data
|
||||
@@ -0,0 +1,13 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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
|
||||
@@ -0,0 +1,86 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Ringraziamo errmax e dr-z3r0
|
||||
import re
|
||||
|
||||
from core import httptools, scrapertools, scrapertoolsV2
|
||||
|
||||
from servers.decrypters import expurl
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
|
||||
encontrados = {
|
||||
'https://vcrypt.net/images/logo', 'https://vcrypt.net/css/out',
|
||||
'https://vcrypt.net/images/favicon', 'https://vcrypt.net/css/open',
|
||||
'http://linkup.pro/js/jquery', 'https://linkup.pro/js/jquery',
|
||||
'http://www.rapidcrypt.net/open'
|
||||
}
|
||||
devuelve = []
|
||||
|
||||
patronvideos = [
|
||||
r'(https?://(gestyy|rapidteria|sprysphere)\.com/[a-zA-Z0-9]+)',
|
||||
r'(https?://(?:www\.)?(vcrypt|linkup)\.[^/]+/[^/]+/[a-zA-Z0-9_]+)'
|
||||
]
|
||||
|
||||
for patron in patronvideos:
|
||||
logger.info(" find_videos #" + patron + "#")
|
||||
matches = re.compile(patron).findall(page_url)
|
||||
|
||||
for url, host in matches:
|
||||
if url not in encontrados:
|
||||
logger.info(" url=" + url)
|
||||
encontrados.add(url)
|
||||
|
||||
if host == 'gestyy':
|
||||
resp = httptools.downloadpage(
|
||||
url,
|
||||
follow_redirects=False,
|
||||
cookies=False,
|
||||
only_headers=True,
|
||||
replace_headers=True,
|
||||
headers={'User-Agent': 'curl/7.59.0'})
|
||||
data = resp.headers.get("location", "")
|
||||
elif 'vcrypt.net' in url:
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
|
||||
elif 'linkup' in url:
|
||||
idata = httptools.downloadpage(url).data
|
||||
data = scrapertoolsV2.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>")
|
||||
else:
|
||||
data = ""
|
||||
while host in url:
|
||||
resp = httptools.downloadpage(
|
||||
url, follow_redirects=False)
|
||||
url = resp.headers.get("location", "")
|
||||
if not url:
|
||||
data = resp.data
|
||||
elif host not in url:
|
||||
data = url
|
||||
if data:
|
||||
devuelve.append(data)
|
||||
else:
|
||||
logger.info(" url duplicada=" + url)
|
||||
|
||||
patron = r"""(https?://(?:www\.)?(?:threadsphere\.bid|adf\.ly|q\.gs|j\.gs|u\.bb|ay\.gy|linkbucks\.com|any\.gs|cash4links\.co|cash4files\.co|dyo\.gs|filesonthe\.net|goneviral\.com|megaline\.co|miniurls\.co|qqc\.co|seriousdeals\.net|theseblogs\.com|theseforums\.com|tinylinks\.co|tubeviral\.com|ultrafiles\.net|urlbeat\.net|whackyvidz\.com|yyv\.co|adfoc\.us|lnx\.lu|sh\.st|href\.li|anonymz\.com|shrink-service\.it|rapidcrypt\.net)/[^"']+)"""
|
||||
|
||||
logger.info(" find_videos #" + patron + "#")
|
||||
matches = re.compile(patron).findall(page_url)
|
||||
|
||||
for url in matches:
|
||||
if url not in encontrados:
|
||||
logger.info(" url=" + url)
|
||||
encontrados.add(url)
|
||||
|
||||
long_url = expurl.expand_url(url)
|
||||
if long_url:
|
||||
devuelve.append(long_url)
|
||||
else:
|
||||
logger.info(" url duplicada=" + url)
|
||||
|
||||
ret = page_url+" "+str(devuelve) if devuelve else page_url
|
||||
logger.info(" RET=" + str(ret))
|
||||
return ret
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from platformcode 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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://.+.d0stream.com/embed/([a-z0-9]+)",
|
||||
"url": "https://v.d0stream.com/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "dostream",
|
||||
"name": "dostream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s14.postimg.cc/lczc08bsx/dostream.png"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector DoStream By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
if data.code == 404:
|
||||
return False, "[Dostream] 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, headers={"Referer":page_url}).data
|
||||
patron = '"label":"([^"]+)".*?'
|
||||
patron += '"src":"(http.*?)".*?'
|
||||
matches = scrapertools.find_multiple_matches(data, patron)
|
||||
for label, url in matches:
|
||||
video_urls.append(['%s [dostream]' %label, url])
|
||||
video_urls.sort(key=lambda it: int(it[0].split("p ")[0]))
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "downace.com/embed/([A-z0-9]+)",
|
||||
"url": "https://downace.com/embed/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "downace",
|
||||
"name": "downace",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s12.postimg.cc/4n9fmdy7x/logo-downace.png"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "no longer exists" in data or "to copyright issues" in data:
|
||||
return False, "[Downace] El video ha sido borrado"
|
||||
if "please+try+again+later." in data:
|
||||
return False, "[Downace] Error de downace, no se puede generar el enlace al video"
|
||||
if "File has been removed due to inactivity" in data:
|
||||
return False, "[Downace] El archivo ha sido removido por inactividad"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
video_urls = []
|
||||
videourl = scrapertools.find_single_match(data, 'controls preload.*?src="([^"]+)')
|
||||
video_urls.append([".MP4 [downace]", videourl])
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://estream.to/embed-([a-z0-9]+).html",
|
||||
"url": "https://estream.to/\\1.html"
|
||||
},
|
||||
{
|
||||
"pattern": "https://estream.xyz/embed-([a-z0-9]+).html",
|
||||
"url": "https://estream.to/\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "estream",
|
||||
"name": "estream",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s14.postimg.cc/ibd54ayf5/estream.png"
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector Estream By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
import re
|
||||
from core import httptools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url)
|
||||
|
||||
if data.code == 404:
|
||||
return False, "[Estream] 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
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
patron = "<source src=([^ ]+) type='video/mp4' label='.*?x(.*?)'"
|
||||
matches = re.compile(patron, re.DOTALL).findall(data)
|
||||
|
||||
for url, quality in matches:
|
||||
video_urls.append(["%sp [estream]" % quality, url])
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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 = httptools.downloadpage(page_url).data
|
||||
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
|
||||
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
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
data = httptools.downloadpage(page_url).page
|
||||
media_url = scrapertools.find_single_match(data, '\'file\': \'([^"]+)\',')
|
||||
video_urls = []
|
||||
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [fakingstv]", media_url])
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://i.imgur.com/vHDcd6Y.png?1"
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url)
|
||||
|
||||
if "Object not found" in data.data or "longer exists on our servers" in data.data:
|
||||
return False, "[Fastplay] El archivo no existe o ha sido borrado"
|
||||
if data.code == 500:
|
||||
return False, "[Fastplay] Error interno del servidor"
|
||||
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
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "((?:fembed|divload).com/(?:f|v)/[A-z0-9_-]+)",
|
||||
"url": "https://www.\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fembed",
|
||||
"name": "Fembed",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://i.postimg.cc/prdPwBhT/fembed1.png",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from core import jsontools
|
||||
from platformcode import logger
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Sorry 404 not found" in data:
|
||||
return False, "[fembed] El fichero ha sido borrado"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
page_url = page_url.replace("/f/","/v/")
|
||||
page_url = page_url.replace("/v/","/api/source/")
|
||||
data = httptools.downloadpage(page_url, post={}).data
|
||||
data = jsontools.load(data)
|
||||
for videos in data["data"]:
|
||||
v = videos["file"]
|
||||
if not v.startswith("http"): v = "https://www.fembed.com" + videos["file"]
|
||||
video_urls.append([videos["label"] + " [fembed]", v])
|
||||
return video_urls
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://fex.net/load/[A-z0-9]+/[A-z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "fex",
|
||||
"name": "Fex",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://i.postimg.cc/pdswzj8G/fex.png",
|
||||
"version": 1
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Server Fex -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
from core import httptools
|
||||
from platformcode import logger
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url, follow_redirects=False)
|
||||
|
||||
if data.code == 404:
|
||||
return False, "[Fex] El archivo no existe o ha sido borrado"
|
||||
|
||||
return True, ""
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True)
|
||||
logger.debug(data.headers)
|
||||
url = data.headers['location']
|
||||
video_urls.append(['Fex', url])
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://filebebo.com/(?:e|d)/[a-zA-Z0-9]+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filebebo",
|
||||
"name": "filebebo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://filebebo.com/images/logo.png"
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# -*- Server Filebebo -*-
|
||||
# -*- Created for Alfa-addon -*-
|
||||
# -*- By the Alfa Develop Group -*-
|
||||
|
||||
import re
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def get_source(url):
|
||||
logger.info()
|
||||
data = httptools.downloadpage(url).data
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
return data
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = get_source(page_url)
|
||||
|
||||
if "File was deleted" in data or "File Not Found" in data:
|
||||
return False, "[Filebebo] El video 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 = get_source(page_url)
|
||||
url = scrapertools.find_single_match(data, "<source src=(.*?) type='video/.*?'")
|
||||
video_urls.append(['Filebebo', url])
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_filefactory.png"
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from platformcode 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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(https://www.filepup.net/play/\\w+)",
|
||||
"url": "\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filepup",
|
||||
"name": "filepup",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "http://static.filepup.net/fplogoV2s.png"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector filepup By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
response = httptools.downloadpage(page_url)
|
||||
if "File was deleted" in response.data or "is no longer available" in response.data:
|
||||
return False, "[filepup] El fichero no existe o ha sido borrado"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
video_urls = []
|
||||
page_url = page_url.replace("https","http") + "?wmode=transparent"
|
||||
data = httptools.downloadpage(page_url).data
|
||||
media_url = scrapertools.find_single_match(data, 'src: "([^"]+)"')
|
||||
qualities = scrapertools.find_single_match(data, 'qualities: (\[.*?\])')
|
||||
qualities = scrapertools.find_multiple_matches(qualities, ' "([^"]+)')
|
||||
for calidad in qualities:
|
||||
media = media_url
|
||||
title = "%s [filepup]" % (calidad)
|
||||
if "480" not in calidad:
|
||||
med = media_url.split(".mp4")
|
||||
media = med[0] + "-%s.mp4" %calidad + med[1]
|
||||
media += "|Referer=%s" %page_url
|
||||
media += "&User-Agent=" + httptools.get_user_agent()
|
||||
video_urls.append([title, media, int(calidad.replace("p", ""))])
|
||||
video_urls.sort(key=lambda x: x[2])
|
||||
for video_url in video_urls:
|
||||
video_url[2] = 0
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
return video_urls
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s31.postimg.cc/ijne6piij/filescdn.png"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "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
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"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
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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 = httptools.downloadpage(login_url, post=post2).data
|
||||
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 = httptools.downloadpage(url, post=post).data
|
||||
|
||||
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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://www.filevideo.net/embed-(?:embed-|)([A-z0-9]+)",
|
||||
"url": "http://filevideo.net/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "filevideo",
|
||||
"name": "filevideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s15.postimg.cc/b7jj9dbbf/filevideo.png"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
|
||||
if "Not Found" in data or "File was deleted" in data:
|
||||
return False, "[Filevideo] El fichero 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
|
||||
enc_data = scrapertools.find_single_match(data, "type='text/javascript'>(eval.*?)\s*</script>")
|
||||
dec_data = jsunpack.unpack(enc_data)
|
||||
|
||||
video_urls = []
|
||||
media_urls = scrapertools.find_multiple_matches(dec_data, '\{file\s*:\s*"([^"]+)",label\s*:\s*"([^"]+)"\}')
|
||||
for media_url, label in media_urls:
|
||||
ext = scrapertools.get_filename_from_url(media_url)[-4:]
|
||||
video_urls.append(["%s %sp [filevideo]" % (ext, label), media_url])
|
||||
|
||||
video_urls.reverse()
|
||||
m3u8 = scrapertools.find_single_match(dec_data, '\{file\:"(.*?.m3u8)"\}')
|
||||
if m3u8:
|
||||
title = video_urls[-1][0].split(" ", 1)[1]
|
||||
video_urls.insert(0, [".m3u8 %s" % title, m3u8])
|
||||
|
||||
for video_url in video_urls:
|
||||
logger.info("%s - %s" % (video_url[0], video_url[1]))
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "flashx.co/([A-z0-9]+)\\.(jsp|html)",
|
||||
"url": "https://www.flashx.co/\\1.\\2"
|
||||
},
|
||||
{
|
||||
"pattern": "flashx.(?:tv|pw|ws|sx|to)/(?:embed.php\\?c=|embed-|playvid-|)([A-z0-9]+)",
|
||||
"url": "https://www.flashx.tv/\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "flashx",
|
||||
"name": "flashx",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_flashx.png"
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import time
|
||||
import urllib
|
||||
|
||||
from core import httptools, scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import config, logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
if 'file was deleted' in data or 'File Not Found (Deleted or Abused)' in data:
|
||||
return False, config.get_localized_string(70292) % "FlashX"
|
||||
elif 'Video is processing now' in data:
|
||||
return False, config.get_localized_string(70293) % "FlashX"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info("url=" + page_url)
|
||||
pfxfx = ""
|
||||
data = httptools.downloadpage(page_url, cookies=False).data
|
||||
data = data.replace("\n", "")
|
||||
cgi_counter = scrapertools.find_single_match(data,
|
||||
"""(?is)src=.(https://www.flashx.../counter.cgi.*?[^(?:'|")]+)""")
|
||||
cgi_counter = cgi_counter.replace("%0A", "").replace("%22", "")
|
||||
playnow = scrapertools.find_single_match(data, 'https://www.flashx.../dl[^"]+')
|
||||
# Para obtener el f y el fxfx
|
||||
js_fxfx = "https://www." + scrapertools.find_single_match(data.replace("//", "/"),
|
||||
"""(?is)(flashx.../js\w+/c\w+.*?[^(?:'|")]+)""")
|
||||
data_fxfx = httptools.downloadpage(js_fxfx).data
|
||||
mfxfx = scrapertools.find_single_match(data_fxfx, 'get.*?({.*?})').replace("'", "").replace(" ", "")
|
||||
matches = scrapertools.find_multiple_matches(mfxfx, '(\w+):(\w+)')
|
||||
for f, v in matches:
|
||||
pfxfx += f + "=" + v + "&"
|
||||
logger.info("mfxfxfx1= %s" % js_fxfx)
|
||||
logger.info("mfxfxfx2= %s" % pfxfx)
|
||||
if pfxfx == "":
|
||||
pfxfx = "f=fail&fxfx=6"
|
||||
coding_url = 'https://www.flashx.co/flashx.php?%s' % pfxfx
|
||||
# {f: 'y', fxfx: '6'}
|
||||
bloque = scrapertools.find_single_match(data, '(?s)Form method="POST" action(.*?)span')
|
||||
flashx_id = scrapertools.find_single_match(bloque, 'name="id" value="([^"]+)"')
|
||||
fname = scrapertools.find_single_match(bloque, 'name="fname" value="([^"]+)"')
|
||||
hash_f = scrapertools.find_single_match(bloque, 'name="hash" value="([^"]+)"')
|
||||
imhuman = scrapertools.find_single_match(bloque, "value='([^']+)' name='imhuman'")
|
||||
post = 'op=download1&usr_login=&id=%s&fname=%s&referer=&hash=%s&imhuman=%s' % (
|
||||
flashx_id, urllib.quote(fname), hash_f, imhuman)
|
||||
wait_time = scrapertools.find_single_match(data, "<span id='xxc2'>(\d+)")
|
||||
|
||||
# Obligatorio descargar estos 2 archivos, porque si no, muestra error
|
||||
httptools.downloadpage(coding_url, cookies=False)
|
||||
httptools.downloadpage(cgi_counter, cookies=False)
|
||||
|
||||
try:
|
||||
time.sleep(int(wait_time) + 1)
|
||||
except:
|
||||
time.sleep(6)
|
||||
|
||||
data = httptools.downloadpage(playnow, post).data
|
||||
# Si salta aviso, se carga la pagina de comprobacion y luego la inicial
|
||||
# LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS
|
||||
if "You try to access this video with Kodi" in data:
|
||||
url_reload = scrapertools.find_single_match(data, 'try to reload the page.*?href="([^"]+)"')
|
||||
try:
|
||||
data = httptools.downloadpage(url_reload, cookies=False).data
|
||||
data = httptools.downloadpage(playnow, post, cookies=False).data
|
||||
# LICENSE GPL3, de alfa-addon: https://github.com/alfa-addon/ ES OBLIGATORIO AÑADIR ESTAS LÍNEAS
|
||||
except:
|
||||
pass
|
||||
|
||||
matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+</script>")
|
||||
video_urls = []
|
||||
for match in matches:
|
||||
try:
|
||||
match = jsunpack.unpack(match)
|
||||
match = match.replace("\\'", "'")
|
||||
media_urls = scrapertools.find_multiple_matches(match, "{src:'([^']+)'.*?,label:'([^']+)'")
|
||||
subtitle = ""
|
||||
for media_url, label in media_urls:
|
||||
if media_url.endswith(".srt") and label == "Spanish":
|
||||
try:
|
||||
from core import filetools
|
||||
data = httptools.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]))
|
||||
except:
|
||||
pass
|
||||
|
||||
return video_urls
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "flix555.com/([A-z0-9]+)",
|
||||
"url": "https://flix555.com/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "flix555",
|
||||
"name": "flix555",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://flix555.com/img/logo.png"
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re, base64, urllib, time
|
||||
|
||||
from core import httptools, scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger, platformtools
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
resp = httptools.downloadpage(page_url)
|
||||
if resp.code == 404 or '<b>File Not Found</b>' in resp.data:
|
||||
return False, "[flix555] El video no está disponible"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
|
||||
data = httptools.downloadpage(page_url).data
|
||||
# ~ logger.info(data)
|
||||
|
||||
post = {}
|
||||
inputs = scrapertools.find_multiple_matches(data, '<input type="(?:hidden|submit)" name="([^"]*)" value="([^"]*)"')
|
||||
for nom, valor in inputs: post[nom] = valor
|
||||
post = urllib.urlencode(post)
|
||||
# ~ logger.info(post)
|
||||
|
||||
espera = scrapertools.find_single_match(data, '<span id="cxc">(\d+)</span>')
|
||||
platformtools.dialog_notification('Cargando flix555', 'Espera de %s segundos requerida' % espera)
|
||||
time.sleep(int(espera))
|
||||
|
||||
data = httptools.downloadpage(page_url, post=post).data
|
||||
# ~ logger.info(data)
|
||||
|
||||
packed = scrapertools.find_single_match(data, "<script type=[\"']text/javascript[\"']>(eval.*?)</script>")
|
||||
unpacked = jsunpack.unpack(packed)
|
||||
# ~ logger.info(unpacked)
|
||||
|
||||
matches = scrapertools.find_multiple_matches(unpacked, 'file\s*:\s*"([^"]*)"\s*,\s*label\s*:\s*"([^"]*)"')
|
||||
if matches:
|
||||
for url, lbl in matches:
|
||||
if not url.endswith('.srt'):
|
||||
itemlist.append(['[%s]' % lbl, url])
|
||||
|
||||
return itemlist
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import scrapertools
|
||||
from platformcode 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 = []
|
||||
|
||||
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
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "Este archivo no existe" in data:
|
||||
return False, "Archivo no existe"
|
||||
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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "gamovideo.com/(?:embed-|)([a-z0-9]+)",
|
||||
"url": "http://gamovideo.com/\\1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "gamovideo",
|
||||
"name": "gamovideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_gamovideo.png"
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
headers = {"User-Agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0"}
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url, headers=headers, cookies=False).data
|
||||
|
||||
if "File was deleted" in data or "<noscript>" not 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."
|
||||
if "File is awaiting for moderation" in data:
|
||||
return False, "[Gamovideo] El video está esperando por moderación."
|
||||
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, cookies=False).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
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if '<h2 class="error">Download error</h2>' in data:
|
||||
return False, "El enlace no es válido<br/>o ha sido borrado de gigasize"
|
||||
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
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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 = httptools.downloadpage(url).data
|
||||
|
||||
# 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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "https://gounlimited.to/embed-(.*?).html",
|
||||
"url": "https://gounlimited.to/embed-\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "gounlimited",
|
||||
"name": "gounlimited",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s31.postimg.cc/bsiaj2q2j/goo.png"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# --------------------------------------------------------
|
||||
# Conector GoUnlimited By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
import re
|
||||
from core import httptools
|
||||
from platformcode import logger
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if data == "File was deleted":
|
||||
return False, "[gounlimited] El video 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
|
||||
data = re.sub(r'"|\n|\r|\t| |<br>|\s{2,}', "", data)
|
||||
packed_data = scrapertools.find_single_match(data, "javascript'>(eval.*?)</script>")
|
||||
unpacked = jsunpack.unpack(packed_data)
|
||||
patron = "sources..([^\]]+)"
|
||||
matches = re.compile(patron, re.DOTALL).findall(unpacked)
|
||||
for url in matches:
|
||||
url += "|Referer=%s" %page_url
|
||||
video_urls.append(['mp4', url])
|
||||
return video_urls
|
||||
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(?s)https://youtube.googleapis.com.*?docid=([A-z0-9-_=]+)",
|
||||
"url": "http://docs.google.com/get_video_info?docid=\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(?s)http://docs.google.com/get_video_info.*?docid=([A-z0-9-_=]+)",
|
||||
"url": "http://docs.google.com/get_video_info?docid=\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "https://drive.google.com/uc\\?id=([A-z0-9-_=]+)",
|
||||
"url": "http://docs.google.com/get_video_info?docid=\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(?s)(?:https|http)://(?:docs|drive).google.com/file/d/([^/]+)/(?:preview|edit|view)",
|
||||
"url": "http://docs.google.com/get_video_info?docid=\\1"
|
||||
},
|
||||
{
|
||||
"pattern": "(?s)https://(lh.).googleusercontent.com/([A-z0-9-_=]+)",
|
||||
"url": "https://\\1.googleusercontent.com/\\2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "gvideo",
|
||||
"name": "gvideo",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s11.postimg.cc/giobzkprz/logo-google1.png"
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
if 'googleusercontent' in page_url:
|
||||
return True, "" # desactivada verificación pq se encalla!
|
||||
|
||||
response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url})
|
||||
if "no+existe" in response.data:
|
||||
return False, "[gvideo] El video no existe o ha sido borrado"
|
||||
if "Se+ha+excedido+el" in response.data:
|
||||
return False, "[gvideo] Se ha excedido el número de reproducciones permitidas"
|
||||
if "No+tienes+permiso" in response.data:
|
||||
return False, "[gvideo] No tienes permiso para acceder a este video"
|
||||
if "Se ha producido un error" in response.data:
|
||||
return False, "[gvideo] Se ha producido un error en el reproductor de google"
|
||||
if "No+se+puede+procesar+este" in response.data:
|
||||
return False, "[gvideo] No se puede procesar este video"
|
||||
if response.code == 429:
|
||||
return False, "[gvideo] Demasiadas conexiones al servidor, inténtelo después"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
video_urls = []
|
||||
urls = []
|
||||
streams =[]
|
||||
logger.debug('page_url: %s'%page_url)
|
||||
if 'googleusercontent' in page_url:
|
||||
|
||||
response = httptools.downloadpage(page_url, follow_redirects = False, cookies=False, headers={"Referer": page_url})
|
||||
url=response.headers['location']
|
||||
if "set-cookie" in response.headers:
|
||||
try:
|
||||
cookies = ""
|
||||
cookie = response.headers["set-cookie"].split("HttpOnly, ")
|
||||
for c in cookie:
|
||||
cookies += c.split(";", 1)[0] + "; "
|
||||
data = response.data.decode('unicode-escape')
|
||||
data = urllib.unquote_plus(urllib.unquote_plus(data))
|
||||
headers_string = "|Cookie=" + cookies
|
||||
except:
|
||||
headers_string = ""
|
||||
else:
|
||||
headers_string = ""
|
||||
|
||||
quality = scrapertools.find_single_match (url, '.itag=(\d+).')
|
||||
|
||||
streams.append((quality, url))
|
||||
|
||||
else:
|
||||
response = httptools.downloadpage(page_url, cookies=False, headers={"Referer": page_url})
|
||||
cookies = ""
|
||||
cookie = response.headers["set-cookie"].split("HttpOnly, ")
|
||||
for c in cookie:
|
||||
cookies += c.split(";", 1)[0] + "; "
|
||||
data = response.data.decode('unicode-escape')
|
||||
data = urllib.unquote_plus(urllib.unquote_plus(data))
|
||||
headers_string = "|Cookie=" + cookies
|
||||
url_streams = scrapertools.find_single_match(data, 'url_encoded_fmt_stream_map=(.*)')
|
||||
streams = scrapertools.find_multiple_matches(url_streams,
|
||||
'itag=(\d+)&url=(.*?)(?:;.*?quality=.*?(?:,|&)|&quality=.*?(?:,|&))')
|
||||
|
||||
itags = {'18': '360p', '22': '720p', '34': '360p', '35': '480p', '37': '1080p', '43': '360p', '59': '480p'}
|
||||
for itag, video_url in streams:
|
||||
if not video_url in urls:
|
||||
video_url += headers_string
|
||||
video_urls.append([itags[itag], video_url])
|
||||
urls.append(video_url)
|
||||
video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", "")))
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "server_hugefiles.png"
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import urllib
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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
|
||||
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 = httptools.downloadpage(page_url, post=urllib.urlencode(post)).data
|
||||
# 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
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"active": true,
|
||||
"find_videos": {
|
||||
"ignore_urls": [],
|
||||
"patterns": [
|
||||
{
|
||||
"pattern": "(jawcloud.co/(?:embed-|)([A-z0-9]+))",
|
||||
"url": "https://\\1.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"free": true,
|
||||
"id": "jawcloud",
|
||||
"name": "jawcloud",
|
||||
"settings": [
|
||||
{
|
||||
"default": false,
|
||||
"enabled": true,
|
||||
"id": "black_list",
|
||||
"label": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s8.postimg.cc/b64mzlgxh/jawcloud1.png"
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
def test_video_exists(page_url):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "The file you were looking for could not be found" in data:
|
||||
return False, "[jawcloud] El archivo ha ido borrado"
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, user="", password="", video_password=""):
|
||||
logger.info("(page_url='%s')" % page_url)
|
||||
data = httptools.downloadpage(page_url).data
|
||||
video_urls = []
|
||||
videourl = scrapertools.find_single_match(data, 'source src="([^"]+)')
|
||||
video_urls.append([".MP4 [jawcloud]", videourl])
|
||||
|
||||
return video_urls
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
],
|
||||
"thumbnail": "https://s26.postimg.cc/6ebn509jd/mailru1.png"
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import jsontools
|
||||
from core import scrapertools
|
||||
from platformcode import logger
|
||||
|
||||
|
||||
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
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"active": true,
|
||||
"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": "@60654",
|
||||
"type": "bool",
|
||||
"visible": true
|
||||
},
|
||||
{
|
||||
"default": 0,
|
||||
"enabled": true,
|
||||
"id": "favorites_servers_list",
|
||||
"label": "@60655",
|
||||
"lvalues": [
|
||||
"No",
|
||||
"1",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5"
|
||||
],
|
||||
"type": "list",
|
||||
"visible": false
|
||||
}
|
||||
]
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user