Risposta server come Dict e modifiche varie

This commit is contained in:
Alhaziel01
2021-08-28 18:10:47 +02:00
parent 8975f950c5
commit 60ec158008
108 changed files with 330 additions and 361 deletions
+1 -1
View File
@@ -61,4 +61,4 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_urls = support.get_jwplayer_mediaurl(data, 'akvideo', onlyHttp=True)
return sorted(video_urls, key=lambda x: int(x[0].split('x')[0])) if vres else video_urls
return video_urls
+1 -1
View File
@@ -22,5 +22,5 @@ def get_video_url(page_url, user="", password="", video_password=""):
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])
video_urls.append({'type':'mp4', 'res':label, 'url':videourl})
return video_urls
+1 -2
View File
@@ -24,6 +24,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
match = scrapertools.find_multiple_matches(data, patron)
for media_url in match:
media_url += "|Referer=%s" %page_url
title = "mp4 [anonfile]"
video_urls.append([title, media_url])
video_urls.append({'type':'mp4', 'url':media_url})
return video_urls
+1 -1
View File
@@ -23,5 +23,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
patron = '<meta property="og:video" content="([^"]+)">'
matches = scrapertools.find_multiple_matches(data, patron)
for url in matches:
video_urls.append(['.MP4 [ArchiveOrg]', url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls
+3 -3
View File
@@ -45,9 +45,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug("URL=" + str(url))
# URL del vídeo
video_urls.append([".mp4" + " [backin]", url])
video_urls.append({'type':'mp4', 'url':url})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], httptools.get_url_headers(video_url[1])))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], httptools.get_url_headers(video_url[1])))
return video_urls
+1 -1
View File
@@ -28,6 +28,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = re.sub(r'\n|\r|\t|\s{2,}', "", data)
media_url, ext = scrapertools.find_single_match(data, r'file:\s*"([^"]+)",type:\s*"([^"]+)"')
video_urls.append(["%s [Badshare]" % ext, media_url])
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+1 -1
View File
@@ -34,5 +34,5 @@ def get_video_url(page_url, user="", password="", video_password=""):
file += "&Host=fs30.indifiles.com:182"
video_urls = []
videourl = file
video_urls.append([".MP4 [bdupload]", videourl])
video_urls.append({'type':'mp4', 'url':videourl})
return video_urls
+1 -1
View File
@@ -27,5 +27,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
matches = scrapertools.find_multiple_matches(data, patron)
for url in matches:
url += "|Referer=%s" %page_url
video_urls.append(['.m3u8 [CinemaUpload]', url])
video_urls.append({'type':'m3u8', 'url':url})
return video_urls
+3 -3
View File
@@ -49,9 +49,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# 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.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+3 -3
View File
@@ -35,7 +35,7 @@ def get_video_url(page_url, user="", password="", video_password=""):
else:
label = video.split('.')[-1]
multires = False
video_urls.append([label + " [clipwatching]", video])
if multires:
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
video_urls.append({'type':label, 'url':video})
# if multires:
# video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
return video_urls
+1 -1
View File
@@ -37,5 +37,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
url = url.split(',')
video_url = url[0]
Type = url[1].replace('label:','')
video_urls.append(['%s [CloudVideo]' % Type, video_url])
video_urls.append({'type':Type, 'url':video_url})
return video_urls
+3 -3
View File
@@ -92,9 +92,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':filename, 'res':quality, 'url':media_url, 'sub':file_sub})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -38,7 +38,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
stream_url_http = scrapertools.find_single_match(data_m3u8, r'PROGRESSIVE-URI="([^"]+)"')
if stream_url_http:
stream_url = stream_url_http
video_urls.append(["%sp .%s [dailymotion]" % (calidad, stream_type), stream_url, 0, subtitle])
video_urls.append({'type':calidad, 'res':stream_type, 'url':stream_url, 'sub':subtitle})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+3 -3
View File
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from platformcode import logger, config
from platformcode import logger
from core import scrapertools
def test_video_exists(page_url):
@@ -9,7 +10,6 @@ def test_video_exists(page_url):
# 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.debug("(page_url='%s')" % page_url)
video_urls = [["%s %s" % (page_url[-4:], config.get_localized_string(30137)), page_url]]
video_urls=[{'type':scrapertools.get_filename_from_url(page_url).split('.')[-1], 'url':page_url}]
return video_urls
+1 -1
View File
@@ -31,7 +31,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if match:
url, token = match
ret = scraper.get(host + url, headers=headers).text
video_urls.append(['mp4 [DooD Stream]', '{}{}{}{}|Referer={}'.format(randomize(ret), url, token, int(time.time() * 1000), host)])
video_urls.append({'type':'mp4', 'url':'{}{}{}{}|Referer={}'.format(randomize(ret), url, token, int(time.time() * 1000), host)})
return video_urls
+2 -2
View File
@@ -24,6 +24,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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]))
video_urls.append({'type':label, 'url':url})
# video_urls.sort(key=lambda it: int(it[0].split("p ")[0]))
return video_urls
+1 -1
View File
@@ -22,6 +22,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
data = httptools.downloadpage(page_url).data
video_urls = []
videourl = scrapertools.find_single_match(data, 'controls preload.*?src="([^"]+)')
video_urls.append([".MP4 [downace]", videourl])
video_urls.append({'type':'mp4', 'url':videourl})
return video_urls
+3 -3
View File
@@ -31,7 +31,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
videourl = match
videourl = videourl.replace('%5C', '')
videourl = urllib.unquote(videourl)
video_urls.append(["[facebook]", videourl])
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'url':videourl})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -32,7 +32,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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])
video_urls.append({'type':extension, 'res':video_calidad, 'url':video_url, 'sub':subtitulo})
try:
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0].rsplit(" ")[1]))
except:
+2 -2
View File
@@ -32,6 +32,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
media_url = file['file']
label = file['label']
extension = file['type']
video_urls.append([ extension + ' ' + label + ' [Fembed]', media_url])
video_urls.sort(key=lambda x: int(x[0].split()[1].replace('p','')))
video_urls.append({'type':extension, 'quality':label, 'url':media_url})
# video_urls.sort(key=lambda x: int(x[0].split()[1].replace('p','')))
return video_urls
+1 -1
View File
@@ -23,5 +23,5 @@ def get_video_url(page_url, user="", password="", video_password=""):
data = httptools.downloadpage(page_url, follow_redirects=False, only_headers=True)
logger.debug(data.headers)
url = data.headers['location']
video_urls.append(['Fex', url])
video_urls.append({'url':url})
return video_urls
+7 -7
View File
@@ -26,15 +26,15 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
qualities = scrapertools.find_multiple_matches(qualities, ' "([^"]+)')
for calidad in qualities:
media = media_url
title = "%s [filepup]" % (calidad)
# title = "%s [filepup]" % (calidad)
if "480" not in calidad:
med = media_url.split(".mp4")
media = med[0] + "-%s.mp4" %calidad + med[1]
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.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':'mp4', 'res':calidad, 'url':media})
# video_urls.sort(key=lambda x: x[2])
# for video_url in video_urls:
# video_url[2] = 0
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -21,6 +21,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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])
video_urls.append({'url':url})
return video_urls
+1 -1
View File
@@ -1,5 +1,5 @@
{
"active": true,
"active": false,
"find_videos": {
"ignore_urls": [],
"patterns": [
+3 -3
View File
@@ -123,10 +123,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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])
video_urls.append({'type':media_url.rsplit('.', 1)[1], 'url':media_url, 'sub':subtitle})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
except:
pass
+4 -4
View File
@@ -22,13 +22,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
matches = re.compile(patron, re.DOTALL).findall(page_url)
try:
video_urls.append(["[fourshared]", matches[0]])
video_urls.append({'url':matches[0]})
except:
pass
else:
video_urls.append(["[fourshared]", page_url])
video_urls.append({'url':page_url})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+4 -4
View File
@@ -83,11 +83,11 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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])
video_urls.append({'type':'rtmp', 'url':rtmp_url})
video_urls.append({'type':scrapertools.get_filename_from_url(mediaurl).split('.')[-1], 'url':mediaurl})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -1,5 +1,5 @@
{
"active": true,
"active": false,
"find_videos": {
"ignore_urls": [],
"patterns": [
+3 -3
View File
@@ -21,9 +21,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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]])
video_urls.append({'url':newmatches[0]})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -36,5 +36,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
for url in matches:
if url.startswith('//'): url= 'http:' + url
url += "|Referer=%s" %page_url
video_urls.append(['mp4 [Go Unlimited]', url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls
-4
View File
@@ -3,10 +3,6 @@
"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"
+2 -2
View File
@@ -77,8 +77,8 @@ def get_video_url(page_url, user="", password="", video_password=""):
for itag, video_url in streams:
if not video_url in urls:
video_url += headers_string
video_urls.append([itags.get(itag, ''), video_url])
video_urls.append({'res':itags.get(itag, ''), 'type':video_url.split('.')[-1], 'url':video_url})
urls.append(video_url)
video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", "")))
# video_urls.sort(key=lambda video_urls: int(video_urls[0].replace("p", "")))
return video_urls
+1 -1
View File
@@ -25,6 +25,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug(data)
url = base64.b64decode(data)
itemlist.append([".mp4 [HDLoad]", url])
itemlist.append({'type':'mp4', 'url':url})
return itemlist
+1 -1
View File
@@ -140,6 +140,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(baseUrl + '/pl/' + page_url.split('/')[-1].replace('?', '') + '.m3u8', headers=[['X-Secure-Proof', secureProof]]).data
filetools.write(xbmc.translatePath('special://temp/hdmario.m3u8'), data, 'w')
video_urls = [['.m3u8 [HDmario]', 'special://temp/hdmario.m3u8']]
video_urls = [{'type':'m3u8', 'url':'special://temp/hdmario.m3u8'}]
return video_urls
+3 -3
View File
@@ -42,9 +42,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
mediaurl = r[0]
video_urls = []
video_urls.append([scrapertools.get_filename_from_url(mediaurl)[-4:] + " [hugefiles]", mediaurl])
video_urls.append({'type':scrapertools.get_filename_from_url(mediaurl).split('.')[-1], 'url':mediaurl})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -34,6 +34,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
ext = ext.split("/")[1]
except:
ext = ".mp4"
video_urls.append(["%s (%s) [idtbox]" % (ext, res), url])
video_urls.append({'type':ext, 'res':res, 'url':url})
return video_urls
+1 -1
View File
@@ -18,6 +18,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
data = httptools.downloadpage(page_url).data
video_urls = []
videourl = scrapertools.find_single_match(data, 'source src="([^"]+)')
video_urls.append([".MP4 [jawcloud]", videourl])
video_urls.append({'type':'mp4', 'url':videourl})
return video_urls
+2 -2
View File
@@ -25,9 +25,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_urls = []
media_url = scrapertools.find_single_match(data, '<video src="([^"]+)"')
if media_url:
ext = media_url[-4:]
ext = media_url.split('.')[-1]
if ext == 'm3u8':
media_url = ''
video_urls.append(["%s [Jetload]" % (ext), media_url])
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+7 -7
View File
@@ -38,13 +38,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
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
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'res':quality, 'url',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.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+2 -2
View File
@@ -49,12 +49,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if url_video:
import random, string
parse = urlparse.urlparse(url_video)
video_urls.append(['mp4 [MaxStream]', url_video])
video_urls.append({'type':'mp4', 'url':url_video})
try:
r1 = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(19))
r2 = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(19))
r3 = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(19))
video_urls.append(['m3u8 [MaxStream]', '{}://{}/hls/{},{},{},{},.urlset/master.m3u8'.format(parse.scheme, parse.netloc, parse.path.split('/')[1], r1, r2, r3)])
video_urls.append({'type':'m3u8', 'url':'{}://{}/hls/{},{},{},{},.urlset/master.m3u8'.format(parse.scheme, parse.netloc, parse.path.split('/')[1], r1, r2, r3)})
# video_urls.append(['m3u8 [MaxStream]', '{}://{}/hls/{},wpsc2hllm5g5fkjvslq,4jcc2hllm5gzykkkgha,fmca2hllm5jtpb7cj5q,.urlset/master.m3u8'.format(parse.scheme, parse.netloc, parse.path.split('/')[1])])
except:
logger.debug('Something wrong: Impossible get HLS stream')
+3 -3
View File
@@ -25,7 +25,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
patron = 'Download file.*?href="([^"]+)"'
matches = scrapertools.find_multiple_matches(data, patron)
if len(matches) > 0:
video_urls.append([matches[0][-4:] + " [mediafire]", matches[0]])
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':matches[0].split('.')[-1], 'url':matches[0]})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+2 -2
View File
@@ -86,10 +86,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# This function (the playlist) does not go, you have to browse megaserver / handler.py although the call is in client.py
if len(files) > 5:
media_url = c.get_play_list()
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [mega]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
else:
for f in files:
media_url = f["url"]
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [mega]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
return video_urls
+3 -3
View File
@@ -27,7 +27,7 @@ def test_video_exists(page_url):
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
logger.debug("url=" + page_url)
video_urls = []
ext = '.mp4'
ext = 'mp4'
global data
packed = scrapertools.find_single_match(data, r'(eval.*?)</script>')
@@ -42,7 +42,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
else:
media_url = ''
if not media_url.startswith('http'):
media_url = 'http:%s' % media_url
video_urls.append(["%s [Mixdrop]" % ext, media_url])
media_url = 'http:' + media_url
video_urls.append({'type':ext, 'url': media_url})
return video_urls
+3 -3
View File
@@ -25,7 +25,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
media_url = scrapertools.find_single_match(data, '"file":"([^"]+)')
logger.debug("media_url=" + media_url)
video_urls = list()
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [mp4upload]", media_url])
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -30,5 +30,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if not url.startswith("http"):
url = "http:%s" % url
if not "Default" in quality:
video_urls.append(["[mydaddy] %s" % quality, url])
video_urls.append({'res':quality, 'url':url})
return video_urls
+1 -1
View File
@@ -25,7 +25,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_urls = []
global page_data
video_url = scrapertools.find_single_match(decode(page_data), r"'src',\s*'([^']+)")
video_urls.append([video_url.split('.')[-1] + ' [MyStream]', video_url])
video_urls.append({'type':video_url.split('.')[-1], 'url':video_url})
return video_urls
def decode(data):
+1 -1
View File
@@ -29,5 +29,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
matches = scrapertools.find_multiple_matches(data, 'tracker: "([^"]+)"')
for scrapedurl in matches:
url = base64.b64decode(scrapedurl)
video_urls.append(["[myupload]", url])
video_urls.append({'url':url})
return video_urls
+2 -2
View File
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import sys
import sys, random
from platformcode import config
@@ -101,7 +101,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
link_m3u8 = 'http://hqq.watch/player/get_md5.php?ver=2&at=%s&adb=0&b=1&link_1=%s&server_2=%s&vid=%s&ext=%s' % (at, link_1, server_2, vid, ext)
# ~ logger.debug(link_m3u8)
video_urls.append(["[netu.tv]", link_m3u8])
video_urls.append({'type':'m3u8', 'url':link_m3u8})
return video_urls
+1 -1
View File
@@ -34,7 +34,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# support.dbg()
url = data.get('result',{}).get('playlist')
video_urls.append([url.split('.')[-1], url + '|Referer=' + page_url])
video_urls.append({'type':url.split('.')[-1], 'url':url + '|Referer:' + page_url})
return video_urls
+2 -2
View File
@@ -64,12 +64,12 @@ def find_videos(data):
matches = re.compile(patronvideos, re.DOTALL).findall(data)
for match in matches:
titulo = "[nowvideo]"
# titulo = "[nowvideo]"
url = 'http://nowvideo.club/%s' % match
if url not in encontrados:
logger.debug(" url=" + url)
devuelve.append([titulo, url, 'nowvideo'])
devuelve.append({'url':url})
encontrados.add(url)
else:
logger.debug(" url duplicada=" + url)
+1 -1
View File
@@ -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':type, 'url':url})
return video_urls
+1 -1
View File
@@ -23,6 +23,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
protection = support.match(data, patron=r'>var protection="([^"]+)"').match
url = httptools.downloadpage("https://www.okstream.cc/request/", post='&morocco={}&mycountry={}'.format(keys, protection), headers={'Referer':page_url}).data
url = url.strip()
video_urls.append([url.split('.')[-1] + " [OkStream]", url])
video_urls.append({'type':url.split('.')[-1], 'url':url})
return video_urls
+4 -3
View File
@@ -57,9 +57,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug("location=" + location)
video_urls = []
video_urls.append([filename[-4:] + " (Premium) [1fichier]", location])
# video_urls.append([filename[-4:] + " (Premium) [1fichier]", location])
video_urls.append({'type':filename.split('.')[-1], 'url':location})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+2 -2
View File
@@ -30,6 +30,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
quality = quality.split('x')[0]
if quality not in qualities:
qualities.append(quality)
video_urls.append(["m3u8 {}p [Paramount]".format(quality), url])
video_urls.sort(key=lambda url: int(support.match(url[0], patron=r'(\d+)p').match))
video_urls.append({'type':'m3u8', 'res':quality, 'url':url})
# video_urls.sort(key=lambda url: int(support.match(url[0], patron=r'(\d+)p').match))
return video_urls
+1 -1
View File
@@ -23,5 +23,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
pack = scrapertools.find_single_match(data.data, 'p,a,c,k,e,d.*?</script>')
unpacked = jsunpack.unpack(pack)
url = scrapertools.find_single_match(unpacked, 'file:"([^"]+)') + "|Referer=%s" % page_url
video_urls.append(['m3u8 [PlayTube]', url] )
video_urls.append({'type':'m3u8', 'url':url})
return video_urls
+1 -1
View File
@@ -1,5 +1,5 @@
{
"active": true,
"active": false,
"find_videos": {
"ignore_urls": [],
"patterns": [
+7 -7
View File
@@ -38,12 +38,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_url = video_url.replace("\\", "")
if extension not in [".vtt", ".srt"]:
video_urls.append(["%s %s [rcdnme]" % (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.debug(" %s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':extension, 'res':video_calidad, 'url':video_url, 'sub':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.debug(" %s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -55,5 +55,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
new_link = base_link + '/?format=json&sqr4374_compat=1&no_404=true&%s&%s' % (referer, id)
data = httptools.downloadpage(new_link).data
json_data = jsontools.load(data)
video_urls.append(['Rutube', json_data['video_balancer']['m3u8']])
video_urls.append({'type':'m3u8', 'url':json_data['video_balancer']['m3u8']})
return video_urls
+1 -1
View File
@@ -30,6 +30,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
#media_url += "|Referer=%s" %page_url
if "m3u8" in media_url:
ext = "m3u8"
video_urls.append(["%s [samaup]" % (ext), media_url])
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+7 -9
View File
@@ -14,15 +14,13 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = scrapertools.httptools.downloadpage(page_url).data
media_url = scrapertools.find_single_match(data, 'var\s+video_source\s+\=\s+"([^"]+)"')
if "cache-1" in media_url:
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache1) [sendvid]", media_url])
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache2) [sendvid]",
media_url.replace("cache-1", "cache-2")])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url.replace("cache-1", "cache-2")})
elif "cache-2" in media_url:
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache1) [sendvid]",
media_url.replace("cache-2", "cache-1")])
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " (cache2) [sendvid]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url.replace("cache-2", "cache-1")})
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
else:
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [sendvid]", media_url])
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+3 -3
View File
@@ -32,10 +32,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
media_url = httptools.downloadpage(media_url, only_headers=True, follow_redirects=False).headers.get("location", "")
if media_url:
video_urls.append([media_url.split('.')[-1] + ' - ' + label + ' - ' + ' [Speedvideo]', media_url])
logger.debug("speed video - media urls: %s " % video_urls)
video_urls.append({'type':media_url.split('.')[-1], 'res':label, 'url':media_url})
# logger.debug("speed video - media urls: %s " % video_urls)
return sorted(video_urls, key=lambda x: quality[x[0].split(' - ')[1]])
return video_urls
##,
+1 -1
View File
@@ -25,6 +25,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
media_url = c.get_manifest_url()
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [Streaming Community]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1] , 'url':media_url})
return video_urls
+1 -1
View File
@@ -56,7 +56,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
video_urls = []
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [Streamon]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
return video_urls
+1 -1
View File
@@ -33,5 +33,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
possible_url = js2py.eval_js(find_url)
url = "https:" + possible_url
url = httptools.downloadpage(url, follow_redirects=False, only_headers=True).headers.get("location", "")
video_urls.append(['MP4 [Streamtape]', url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls
+1 -1
View File
@@ -35,6 +35,6 @@ def get_video_url(page_url, video_password=""):
else:
url = re.sub(r'(\.\w{2,3})/\w', '\\1/getl1nk-', data.url) + '.dll'
url += "|Referer=https://streamz.ws/&User-Agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14'"
video_urls.append(["mp4 [streamZ]", url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls
+4 -4
View File
@@ -43,15 +43,15 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
for source in lSrc:
quality = source['label'] if 'label' in source else 'auto'
video_urls.append(['.' + source['file'].split('.')[-1] + ' [' + quality + '] [SuperVideo]', source['file']])
video_urls.append({'type':source['file'].split('.')[-1], 'res':quality, 'url':source['file']})
else:
matches = scrapertools.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"(?:\s*, res:\s(\d+))?')
for url, quality in matches:
if url.split('.')[-1] != 'm3u8':
video_urls.append([url.split('.')[-1] + ' [' + quality + '] [SuperVideo]', url])
video_urls.append({'type':url.split('.')[-1], 'res':quality, 'url':url})
else:
video_urls.append([url.split('.')[-1], url])
video_urls.append({'type':url.split('.')[-1], 'url':url})
video_urls.sort(key=lambda x: x[0].split()[-2])
# video_urls.sort(key=lambda x: x[0].split()[-2])
return video_urls
+2 -2
View File
@@ -30,6 +30,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
if not video.startswith("//"):
continue
video = "https:" + video
video_urls.append(["mp4 [Thevid]", video])
logger.debug("Url: %s" % videos)
video_urls.append({'type':'mp4', 'url':video})
# logger.debug("Url: %s" % videos)
return video_urls
+1 -1
View File
@@ -21,6 +21,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
data = httptools.downloadpage(page_url).data
video_urls = []
videourl = scrapertools.find_single_match(data, 'src: "([^"]+)')
video_urls.append([".MP4 [thevideobee]", videourl])
video_urls.append({'type':'mp4', 'url':videourl})
return video_urls
+2 -2
View File
@@ -29,9 +29,9 @@ def get_video_url(page_url, premium=False, user='', password='', video_password=
info('server=torrent, the url is the good')
if page_url.startswith('magnet:'):
video_urls = [['magnet: [torrent]', page_url]]
video_urls = [{'type':'magnet', 'url':page_url}]
else:
video_urls = [['.torrent [torrent]', page_url]]
video_urls = [{'type':'torrent', 'url':page_url}]
return video_urls
+1 -1
View File
@@ -21,6 +21,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
data = httptools.downloadpage(page_url).data
video_urls = []
videourl = scrapertools.find_single_match(data, 'source src="([^"]+)')
video_urls.append([".MP4 [tusfiles]", videourl])
video_urls.append({'type':'mp4', 'url':videourl})
return video_urls
+3 -3
View File
@@ -71,10 +71,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.error(traceback.format_exc())
extension = ""
video_urls.append([extension + " (Premium) [uploaded.to]", location])
video_urls.append({'type':extension, 'url':location})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -27,6 +27,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(page_url, post=post).data
media_url = scrapertools.find_single_match(data, '<a href="([^"]+)">http')
ext = scrapertools.get_filename_from_url(media_url)
video_urls.append(["%s [Uppom]" % ext, media_url])
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+2 -2
View File
@@ -24,7 +24,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
if new_data != "":
from lib import jsunpack
data = jsunpack.unpack(new_data)
media_url = scrapertools.find_single_match(data, r'file:"([^"]+)"') + '|Referer=' + page_url
video_urls.append(["%s [UPstream]" % media_url.split('.')[-1], media_url])
media_url = scrapertools.find_single_match(data, r'file:"([^"]+)"')
video_urls.append({'type':media_url.split('.')[-1], 'url':media_url + '|Referer=' + page_url})
return video_urls
+3 -3
View File
@@ -74,8 +74,8 @@ def uptostream(data):
tipo = tipo.replace("video/","")
if lang: extension = "{} - {} [{}]".format(tipo, res, lang.upper())
else: extension = "{} - {}".format(tipo, res)
video_urls.append([extension + " [UPtoStream]", media_url, 0, subtitle])
video_urls.sort(key=lambda url: int(match(url[0], patron=r'(\d+)p').match))
video_urls.append({'type':extension, 'url':media_url, 'sub':subtitle})
# video_urls.sort(key=lambda url: int(match(url[0], patron=r'(\d+)p').match))
return video_urls
def atob(s):
@@ -93,6 +93,6 @@ def uptobox(url, data):
media = match(url, post=post[:-1], patron=r'<a href="([^"]+)">\s*<span class="button_upload green">').match
url_strip = media.rsplit('/', 1)[1]
media_url = media.rsplit('/', 1)[0] + "/" + url_strip
video_urls.append([media_url[-4:] + " [UPtoStream]", media_url])
video_urls.append({'type':media_url.split('.')[-1], 'url':media_url})
return video_urls
+1 -1
View File
@@ -43,7 +43,7 @@ def get_video_url(page_url, premium = False, user = "", password = "", video_pas
oculto = re.findall('<input type=hidden value=([^ ]+) id=func', data, flags=re.DOTALL)[0]
funciones = resuelve(clave, base64.b64decode(oculto))
url, type = scrapertools.find_single_match(funciones, "setAttribute\('src', '(.*?)'\);\s.*?type', 'video/(.*?)'")
video_urls.append(['upvid [%s]' % type ,url])
video_urls.append({'type':type ,'url':url})
return video_urls
+1 -1
View File
@@ -31,6 +31,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
for url in matches:
url = url+'|Referer='+page_url
video_urls.append(["[uqload]", url])
video_urls.append({'url':url})
return video_urls
+1 -1
View File
@@ -32,6 +32,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug(post)
url = support.match('https://userload.co/api/request/', post=post, patron=r'([^\s\r\n]+)').match
if url:
video_urls.append(["{} [Userload]".format(url.split('.')[-1]), url])
video_urls.append({'type':url.split('.')[-1], 'url':url})
return video_urls
+4 -4
View File
@@ -33,10 +33,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(page_url, post=post).data
media_url = scrapertools.find_single_match(data, 'name="down_script".*?<a href="([^"]+)"')
ext = scrapertools.get_filename_from_url(media_url)[-4:]
video_urls.append(["%s [userscloud]" % ext, media_url])
ext = scrapertools.get_filename_from_url(media_url).split('.')[-1]
video_urls.append({'type':ext, 'url':media_url})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -36,5 +36,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
matches = scrapertools.find_multiple_matches(bloque, '"([^"]+)":"([^"]+)')
for res, media_url in matches:
video_urls.append(
[scrapertools.get_filename_from_url(media_url)[-4:] + " (" + res + ") [vevio.me]", media_url])
{'type':scrapertools.get_filename_from_url(media_url).split('.')[-1],'res':res, 'url':media_url})
return video_urls
+3 -3
View File
@@ -53,9 +53,9 @@ 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 [Vidcloud" % ext, media_url])
video_urls.append({'type':ext, 'url':media_url})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+2 -2
View File
@@ -25,6 +25,6 @@ def get_video_url(page_url, user="", password="", video_password=""):
bloque = scrapertools.find_single_match(data, 'sources:.\[.*?]')
matches = scrapertools.find_multiple_matches(bloque, '(http.*?)"')
for videourl in matches:
extension = extension = scrapertools.get_filename_from_url(videourl)[-4:]
video_urls.append(["%s [videobin]" %extension, videourl])
extension = extension = scrapertools.get_filename_from_url(videourl).split('.')[-1]
video_urls.append({'type':extension, 'url':videourl})
return video_urls
+1 -1
View File
@@ -15,6 +15,6 @@ def get_video_url(page_url, video_password):
url = url.replace(" ", "")
data=httptools.downloadpage(url).data
url = scrapertools.find_single_match(data, '<source src="([^"]+)"')
video_urls.append(["[videomega]", url])
video_urls.append({'url':url})
return video_urls
+2 -2
View File
@@ -26,7 +26,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug("Intel11 %s" %data)
media_url = scrapertools.find_single_match(data, 'file:"([^"]+)')
if media_url:
ext = media_url[-4:]
video_urls.append(["%s [vidfast]" % (ext), media_url])
ext = media_url.split('.')[-1]
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+3 -3
View File
@@ -27,9 +27,9 @@ def get_video_url(page_url, user="", password="", video_password=""):
bloque = scrapertools.find_single_match(data, 'sources:.\[.*?]')
matches = scrapertools.find_multiple_matches(bloque, '(http.*?)"')
for videourl in matches:
extension = videourl[-4:]
extension = videourl.split('.')[-1]
if extension == 'm3u8':
continue
video_urls.append(["%s [vidlox]" % extension, videourl])
video_urls.reverse()
video_urls.append({'type':extension, 'url':videourl})
# video_urls.reverse()
return video_urls
+2 -2
View File
@@ -18,8 +18,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
logger.debug("url=" + page_url)
global data
video_urls = support.get_jwplayer_mediaurl(data, 'Vidmoly')
for url in video_urls:
for url in video_urls.items:
logger.debug(url)
url[-1] = url[-1].replace(',','').replace('.urlset','').replace('/hls','') + '|Referer=' + page_url
url[url] = url['url'].replace(',','').replace('.urlset','').replace('/hls','') + '|Referer=' + page_url
return video_urls
+7 -6
View File
@@ -31,13 +31,14 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
for enlace in data:
if 'src' in enlace or 'file' in enlace:
url = enlace['src'] if 'src' in enlace else enlace['file']
tit = ''
if 'label' in enlace: tit += ' [%s]' % enlace['label']
if 'res' in enlace: tit += ' [%s]' % enlace['res']
if tit == '' and 'type' in enlace: tit = enlace['type']
if tit == '': tit = '.mp4'
ext = ''
res = ''
if 'type' in enlace: tit = enlace['type'].split('/')[-1]
else: tit = 'mp4'
if 'res' in enlace: res = enlace['res']
elif 'label' in enlace: res = enlace['label']
video_urls.append(["%s [Vidoza]" % tit, url])
video_urls.append({'type':tit, 'res':res, 'url':url})
except:
logger.debug('No se detecta json %s' % s)
pass
+4 -4
View File
@@ -38,8 +38,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
scrapertools.find_single_match(data, '"Watch video ([^"]+")').replace(' ', '.') + ".mp4"
for playpath, inf in playpaths:
h = scrapertools.find_single_match(playpath, 'h=([a-z0-9]+)')
video_urls.append([".mp4 [%s] %s" % (id_server, inf), mp4 % h])
video_urls.append(["RTMP [%s] %s" % (id_server, inf), "%s playpath=%s" % (rtmp, playpath)])
for video_url in video_urls:
logger.debug("video_url: %s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':'mp4', 'res':inf, 'url':mp4 % h})
video_urls.append({'type':'rtmp', 'res':inf, 'url':"%s playpath=%s" % (rtmp, playpath)})
# for video_url in video_urls:
# logger.debug("video_url: %s - %s" % (video_url[0], video_url[1]))
return video_urls
+2 -3
View File
@@ -40,7 +40,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
bloque = scrapertools.find_single_match(data, 'qualities":\{(.*?)\}')
matches = scrapertools.find_multiple_matches(bloque, '"([^"]+)":"([^"]+)')
for res, media_url in matches:
video_urls.append(
[scrapertools.get_filename_from_url(media_url)[-4:] + " (" + res + ") [vidup.tv]", media_url])
video_urls.reverse()
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'res':res, 'url':media_url})
# video_urls.reverse()
return video_urls
+6 -6
View File
@@ -32,12 +32,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
patron += '.*?quality":"([^"]+)"'
match = scrapertools.find_multiple_matches(data, patron)
for mime, media_url, calidad in match:
title = "%s (%s) [Vimeo]" % (mime.replace("video/", "."), calidad)
video_urls.append([title, media_url, int(calidad.replace("p", ""))])
# title = "%s (%s) [Vimeo]" % (mime.replace("video/", "."), calidad)
video_urls.append({'type':mime.replace("video/", ""), 'url':media_url, 'res':calidad})
video_urls.sort(key=lambda x: x[2])
for video_url in video_urls:
video_url[2] = 0
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# video_urls.sort(key=lambda x: x[2])
# for video_url in video_urls:
# video_url[2] = 0
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+3 -3
View File
@@ -31,9 +31,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
"&Cookie=%s; %s" % (cfduid, univid)
video_urls = []
video_urls.append([scrapertools.get_filename_from_url(media_url)[-4:] + " [vimple.ru]", media_url])
video_urls.append({'type':scrapertools.get_filename_from_url(media_url).split('.')[-1], 'url':media_url})
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -22,5 +22,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
data = httptools.downloadpage(page_url).data
enc_data = scrapertools.find_single_match(data, 'data-stream="([^"]+)')
dec_data = base64.b64decode(enc_data)
video_urls.append(['vivo', dec_data])
video_urls.append({'url':dec_data})
return video_urls
+4 -4
View File
@@ -34,10 +34,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
matches = scrapertools.find_multiple_matches(data, '<source src="([^"]+)" type="video/(\w+)')
for media_url, ext in matches:
calidad = scrapertools.find_single_match(media_url, '(\d+)\.%s' % ext)
video_urls.append([calidad + "p ." + ext + " [vk]", media_url])
video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'res':calidad, 'type':ext, 'url':media_url})
# video_urls.sort(key=lambda it: int(it[0].split("p ", 1)[0]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+3 -3
View File
@@ -39,9 +39,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
videoSources = re.findall("<source[\s]+src=[\"'](?P<url>[^\"']+)[^>]+label=[\"'](?P<label>[^\"']+)", strResult)
for url, label in videoSources:
url += "|Referer=%s" %page_url
video_urls.append([label, url])
video_urls.sort(key=lambda i: int(i[0].replace("p","")))
video_urls.append({'type':label, 'url':url})
# video_urls.sort(key=lambda i: int(i[0].replace("p","")))
except:
url = scrapertools.find_single_match(data,'<source src="([^"]+)')
video_urls.append(["MP4", url])
video_urls.append({'type':'mp4', 'url':url})
return video_urls
+2 -2
View File
@@ -56,12 +56,12 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# Search for the correct episode
for episode in json_file['data']:
if episode['video_id'] == int(video_id):
ep_title = '[B]' + episode['title'] + '[/B]'
# ep_title = '[B]' + episode['title'] + '[/B]'
embed_info = vvvvid_decoder.dec_ei(episode['embed_info'])
embed_info = embed_info.replace('manifest.f4m','master.m3u8').replace('http://','https://').replace('/z/','/i/')
key_url = 'https://www.vvvvid.it/kenc?action=kt&conn_id=' + conn_id + '&url=' + embed_info.replace(':','%3A').replace('/','%2F')
key = vvvvid_decoder.dec_ei(current_session.get(key_url, headers=headers, params=payload).json()['message'])
video_urls.append([ep_title, str(embed_info) + '?' + key])
video_urls.append({'type':'m3u8', 'url':str(embed_info) + '?' + key})
return video_urls
+1 -1
View File
@@ -13,6 +13,6 @@ def get_video_url(page_url, video_password):
matches = scrapertools.find_multiple_matches(data, '"file":"([^"]+)","label":"([^"]+)"')
for url, quality in matches:
url = url.replace("\/", "/")
video_urls.append(["[watchanimestream] %s" %quality, url])
video_urls.append({'res':quality, 'url':url})
return video_urls
+4 -4
View File
@@ -31,8 +31,8 @@ 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 [watchvideo]" % (ext), media_url])
video_urls.reverse()
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
video_urls.append({'type':ext, 'url':media_url})
# video_urls.reverse()
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls
+1 -1
View File
@@ -25,5 +25,5 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
decoded = codecs.decode(elem, "hex")
url += decoded.decode("utf8")
url = scrapertools.find_single_match(url, '<source src="([^"]+)"')
video_urls.append(["[youdbox]", url])
video_urls.append({'url':url})
return video_urls
+1 -1
View File
@@ -39,6 +39,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
ext = url[-4:]
media_url = url +"|Referer=%s" % page_url
video_urls.append([ext + " [yourupload]", media_url])
video_urls.append({'type':ext, 'url':media_url})
return video_urls
+5 -5
View File
@@ -1,6 +1,6 @@
# s-*- coding: utf-8 -*-
import xbmc, xbmcaddon, sys, re
from core import httptools, scrapertools, filetools
from core import httptools, scrapertools, filetools, support
from platformcode import config, logger, platformtools
name = 'plugin.video.youtube'
@@ -45,10 +45,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
from youtube_resolver import resolve
try:
for stream in resolve(page_url):
# title = scrapertools.find_single_match(stream['title'], '(\d+p)')
if scrapertools.find_single_match(stream['title'], r'(\d+p)'):
video_urls.append([re.sub(r'(\[[^\]]+\])', '', stream['title']), stream['url']])
video_urls.sort(key=lambda it: int(it[0].split("p", 1)[0]))
r,t = scrapertools.find_single_match(stream['title'], r'(\d+p)[^\(]+\(([^;]+)')
if r:
video_urls.append({'type':t, 'res':r, 'url':stream['url']})
# video_urls.sort(key=lambda it: int(it[0].split("p", 1)[0]))
except:
pass
+3 -3
View File
@@ -28,9 +28,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
url = scrapertools.find_single_match(data, '{file:"([^"]+)"')
video_url = "%s|Referer=%s" % (url, url_redirect)
video_urls = [[scrapertools.get_filename_from_url(url)[-4:] + " [youwatch]", video_url]]
video_urls = [{'typr':scrapertools.get_filename_from_url(url).split('.')[-1], 'url':video_url}]
for video_url in video_urls:
logger.debug("%s - %s" % (video_url[0], video_url[1]))
# for video_url in video_urls:
# logger.debug("%s - %s" % (video_url[0], video_url[1]))
return video_urls

Some files were not shown because too many files have changed in this diff Show More