some fixes to greko's pull

This commit is contained in:
mac12m99
2019-05-18 14:42:11 +02:00
parent 875205ca83
commit bb62870eda
6 changed files with 21 additions and 124 deletions
+3 -4
View File
@@ -51,10 +51,9 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
#fix by greko inizio
if not data:
data = scrapertoolsV2.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
if '/olink/' in url or '/delta/' in url or '/mango/' in url or '/now/' in url:
from lib import unshortenit
data, status = unshortenit.unshorten(url)
logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
from lib import unshortenit
data, status = unshortenit.unshorten(url)
logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
# fix by greko fine
else:
data = ""
+4
View File
@@ -6,6 +6,10 @@
{
"pattern": "vidto.me/(?:embed-|)([A-z0-9]+)",
"url": "http://vidto.me/embed-\\1.html"
},
{
"pattern": "vidtome.stream/(?:embed-|)([A-z0-9]+)",
"url": "http://vidtome.stream/\\1.html"
}
]
},
-41
View File
@@ -1,41 +0,0 @@
{
"active": true,
"find_videos": {
"ignore_urls": [],
"patterns": [
{
"pattern": "vidtome.stream/(?:embed-|)([A-z0-9]+)",
"url": "http://vidtome.stream/\\1.html"
}
]
},
"free": true,
"id": "vidtomestream",
"name": "vidtomestream",
"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
}
]
}
-33
View File
@@ -1,33 +0,0 @@
# -*- coding: utf-8 -*-
# -*- copiato e adattato da vidtome -*-
# -*- by Greko -*-
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 "Not Found" in data or "File Does not Exist" in data:
return False, "[vidtomestream] Il video non esiste 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
code = scrapertools.find_single_match(data, 'name="code" value="([^"]+)')
hash = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)')
post = "op=download1&code=%s&hash=%s&imhuman=Proceed+to+video" %(code, hash)
data1 = httptools.downloadpage("http://m.vidtome.stream/playvideo/%s" %code, post=post).data
video_urls = []
media_urls = scrapertools.find_multiple_matches(data1, 'file: "([^"]+)')
for media_url in media_urls:
ext = scrapertools.get_filename_from_url(media_url)[-4:]
video_urls.append(["%s [vidtomestream]" % (ext), media_url])
video_urls.reverse()
for video_url in video_urls:
logger.info("%s" % (video_url[0]))
return video_urls