risoluzioni in ordine per download a qualità massima

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

View File

@@ -6,7 +6,7 @@
"language": ["sub-ita"],
"thumbnail": "animesubita.png",
"bannermenu": "animesubita.png",
"categories": ["anime", "vos", "movie"],
"categories": ["anime", "vos"],
"settings": []
}

View File

@@ -15,7 +15,7 @@
},
"free": true,
"id": "akstream",
"name": "akstream",
"name": "Akvideo",
"settings": [
{
"default": false,
@@ -41,5 +41,6 @@
"type": "list",
"visible": false
}
]
],
"thumbnail": "server_akvideo.png"
}

View File

@@ -13,7 +13,7 @@ def test_video_exists(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 False, config.get_localized_string(70449) % "Akvideo"
return True, ""
@@ -36,10 +36,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
i = 0
for media_url in matches:
# URL del vídeo
video_urls.append([vres[i] + " mp4 [Akstream] ", media_url + '|' + _headers])
video_urls.append([vres[i] + " mp4 [Akvideo] ", 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
return sorted(video_urls, key=lambda x: x[0].split('x')[1])

View File

@@ -4,8 +4,8 @@
"ignore_urls": [],
"patterns": [
{
"pattern": "clipwatching.com/(?:embed-)?([a-zA-Z0-9]+).html",
"url": "http://clipwatching.com/embed-\\1.html"
"pattern": "clipwatching.com/((?:embed-)?[a-zA-Z0-9./_-]+).html",
"url": "http://clipwatching.com/\\1.html"
}
]
},

View File

@@ -30,4 +30,5 @@ def get_video_url(page_url, user="", password="", video_password=""):
logger.info(label)
if ".jpg" not in video:
video_urls.append(['%s [%sp] [ClipWatching]' % (Type, label), video])
video_urls.sort(key=lambda x: x[0].split()[1])
return video_urls

View File

@@ -11,7 +11,7 @@
},
"free": true,
"id": "cloudvideo",
"name": "cloudvideo",
"name": "CloudVideo",
"settings": [
{
"default": false,
@@ -38,5 +38,5 @@
"visible": false
}
],
"thumbnail": "https://cloudvideo.tv/static/img/logo5.png"
"thumbnail": "server_cloudvideo.png"
}

View File

@@ -11,7 +11,7 @@ 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 False, config.get_localized_string(70292) % "CloudVideo"
return True, ""
@@ -19,17 +19,17 @@ 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>")
# enc_data = scrapertools.find_single_match(data, "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'
Type = '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])
Type = url[1].replace('label:','')
video_urls.append(['%s [CloudVideo]' % Type, video_url])
return video_urls

View File

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

View File

@@ -11,7 +11,7 @@
},
"free": true,
"id": "hdload",
"name": "hdload",
"name": "HDLoad",
"settings": [
{
"default": false,
@@ -38,5 +38,5 @@
"visible": false
}
],
"thumbnail": "https://mixdrop.co/imgs/mixdrop-logo2.png"
"thumbnail": "server_hdload"
}

View File

@@ -10,7 +10,7 @@ def test_video_exists(page_url):
data = httptools.downloadpage(page_url, cookies=False).data
if 'Not found id' in data:
return False, config.get_localized_string(70449) % "hdload"
return False, config.get_localized_string(70449) % "HDLoad"
return True, ""
@@ -24,6 +24,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.info(data)
url = base64.b64decode(data)
itemlist.append([".mp4 [hdload]", url])
itemlist.append([".mp4 [HDLoad]", url])
return itemlist

View File

@@ -16,7 +16,7 @@
"ok.ru"
]
},
"name": "okru",
"name": "OKru",
"settings": [
{
"default": false,

View File

@@ -4,7 +4,7 @@ import re
from core import httptools
from core import scrapertools
from platformcode import logger
from platformcode import logger, config
def test_video_exists(page_url):
@@ -12,9 +12,9 @@ def test_video_exists(page_url):
data = httptools.downloadpage(page_url).data
if "copyrightsRestricted" in data or "COPYRIGHTS_RESTRICTED" in data:
return False, "[Okru] El archivo ha sido eliminado por violación del copyright"
return False, config.get_localized_string(70449) % "OKru"
elif "notFound" in data:
return False, "[Okru] El archivo no existe o ha sido eliminado"
return False, config.get_localized_string(70449) % "OKru"
return True, ""
@@ -28,6 +28,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# URL del vídeo
for type, url in re.findall(r'\{"name":"([^"]+)","url":"([^"]+)"', data, re.DOTALL):
url = url.replace("%3B", ";").replace("u0026", "&")
video_urls.append([type + " [okru]", url])
video_urls.append([type + " [OKru]", url])
return video_urls

30
servers/onlystream.py Normal file
View File

@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
from core import httptools
from core import scrapertoolsV2
from lib import jsunpack
from platformcode import config, logger
import ast
from core import support
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url, cookies=False).data
if 'File you are looking for is not found.' in data:
return False, config.get_localized_string(70449) % "Onlystream"
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
block = scrapertoolsV2.find_single_match(data, r'sources: \[([^\]]+)\]')
sources = scrapertoolsV2.find_multiple_matches(block, r'file:\s*"([^"]+)"(?:,label:\s*"([^"]+)")?')
for url, quality in sources:
quality = 'auto' if not quality else quality
video_urls.append(['.' + url.split('.')[-1] + ' [' + quality + '] [Onlystream]', url])
video_urls.sort(key=lambda x: x[0].split()[1])
return video_urls

View File

@@ -11,7 +11,7 @@
},
"free": true,
"id": "speedvideo",
"name": "speedvideo",
"name": "Speedvideo",
"settings": [
{
"default": false,
@@ -37,5 +37,6 @@
"type": "list",
"visible": false
}
]
],
"thumbnail": "server_speedvideo.png"
}

View File

@@ -42,5 +42,5 @@
"visible": false
}
],
"thumbnail": "https://supervideo.tv/images/logo-player.png"
"thumbnail": "server_supervideo.png"
}

View File

@@ -6,7 +6,7 @@ from lib import jsunpack
from platformcode import config, logger
import ast
def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
@@ -21,6 +21,7 @@ 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
logger.info('SUPER DATA= '+data)
code_data = scrapertoolsV2.find_single_match(data, "<script type='text/javascript'>(eval.*)")
if code_data:
code = jsunpack.unpack(code_data)
@@ -34,7 +35,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
quality = 'auto' if n==0 else lQuality[n-1]
video_urls.append(['.' + source.split('.')[-1] + '(' + quality + ') [SuperVideo]', source])
else:
matches = scrapertoolsV2.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"\s*, res:\s(\d+)')
logger.info('ELSE!')
matches = scrapertoolsV2.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"(?:\s*, res:\s(\d+))?')
for url, quality in matches:
video_urls.append(['mp4 [' + quality + ']', url])
if url.split('.')[-1] != 'm3u8':
video_urls.append([url.split('.')[-1] + ' [' + quality + ']', url])
else:
video_urls.append([url.split('.')[-1], url])
video_urls.sort(key=lambda x: x[0].split()[-1])
return video_urls

View File

@@ -15,7 +15,7 @@
},
"free": true,
"id": "vcstream",
"name": "vcstream",
"name": "Vidcloud",
"settings": [
{
"default": false,
@@ -42,5 +42,5 @@
"visible": false
}
],
"thumbnail": "http://i.imgur.com/l45Tk0G.png"
"thumbnail": "server_vidcloud.png"
}

View File

@@ -13,7 +13,7 @@ def test_video_exists(page_url):
logger.info("(page_url='%s')" % page_url)
data = httptools.downloadpage(page_url).data
if "We're Sorry" in data:
return False, config.get_localized_string(70292) % "vcstream"
return False, config.get_localized_string(70292) % "Vidcloud"
return True, ""
@@ -50,7 +50,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
ext = "mp4"
if "m3u8" in media_url:
ext = "m3u8"
video_urls.append(["%s [vcstream]" % ext, media_url])
video_urls.append(["%s [Vidcloud" % ext, media_url])
for video_url in video_urls:
logger.info("%s - %s" % (video_url[0], video_url[1]))

View File

@@ -11,7 +11,7 @@
},
"free": true,
"id": "vidoza",
"name": "vidoza",
"name": "Vidoza",
"settings": [
{
"default": false,
@@ -38,5 +38,5 @@
"visible": false
}
],
"thumbnail": "http://i.imgur.com/YefcBBY.png"
"thumbnail": "server_vidoza.png"
}

View File

@@ -12,7 +12,7 @@ def test_video_exists(page_url):
if "Page not found" in data or "File was deleted" in data:
return False, "[vidoza] El archivo no existe o ha sido borrado"
elif "processing" in data:
return False, "[vidoza] El vídeo se está procesando"
return False, config.get_localized_string(70449) % "Vidoza"
return True, ""
@@ -22,7 +22,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(page_url).data
video_urls = []
s = scrapertools.find_single_match(data, 'sourcesCode\s*:\s*(\[\{.*?\}\])')
s = scrapertools.find_single_match(data, r'sourcesCode\s*:\s*(\[\{.*?\}\])')
s = s.replace('src:', '"src":').replace('file:', '"file":').replace('type:', '"type":').replace('label:', '"label":').replace('res:', '"res":')
try:
data = jsontools.load(s)
@@ -34,8 +34,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if 'res' in enlace: tit += '[%s]' % enlace['res']
if tit == '' and 'type' in enlace: tit = enlace['type']
if tit == '': tit = '.mp4'
video_urls.append(["%s [vidoza]" % tit, url])
video_urls.append(["%s [Vidoza]" % tit, url])
except:
logger.debug('No se detecta json %s' % s)
pass

View File

@@ -11,7 +11,7 @@
},
"free": true,
"id": "vup",
"name": "vup",
"name": "VUP",
"settings": [
{
"default": false,
@@ -38,5 +38,5 @@
"visible": false
}
],
"thumbnail": "https://i.postimg.cc/ZKjvqXxj/vup.png"
"thumbnail": "server_vupplayer.png"
}

View File

@@ -48,9 +48,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
for key in keys:
video_urls.append(['%s [%sp]' % (key['type'].replace('video/',''), key['label']), key['src'].replace('https','http') + '|' + _headers])
else:
media_urls = scrapertools.find_multiple_matches(data, '(http.*?\.mp4)')
media_urls = scrapertools.find_multiple_matches(data, r'(http.*?\.mp4)')
for media_url in media_urls:
video_urls.append(['video' + " mp4 [wstream] ", media_url + '|' + _headers])
video_urls.sort(key=lambda x: x[0])
return video_urls