KoD 0.7
- nuovo metodo di override DNS - aggiunta opzione nascondi server, se usi l'autoplay - migliorie al codice e fix vari
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Ringraziamo errmax e dr-z3r0
|
||||
import re
|
||||
|
||||
from core import httptools, scrapertoolsV2
|
||||
from core import httptools, scrapertools
|
||||
from platformcode import logger
|
||||
from servers.decrypters import expurl
|
||||
|
||||
@@ -62,10 +62,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
if '/olink/' in url: continue
|
||||
else:
|
||||
idata = httptools.downloadpage(url).data
|
||||
data = scrapertoolsV2.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>")
|
||||
data = scrapertools.find_single_match(idata, "<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>")
|
||||
#fix by greko inizio
|
||||
if not data:
|
||||
data = scrapertoolsV2.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
|
||||
data = scrapertools.find_single_match(idata, 'action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">')
|
||||
from lib import unshortenit
|
||||
data, status = unshortenit.unshorten(url)
|
||||
# logger.info("Data - Status zcrypt linkup : [%s] [%s] " %(data, status))
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools, scrapertoolsV2
|
||||
from core import httptools, scrapertools
|
||||
from platformcode import config, logger
|
||||
import base64
|
||||
|
||||
|
||||
+19
-34
@@ -1,48 +1,33 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
# --------------------------------------------------------
|
||||
# Conector Mixdrop By Alfa development Group
|
||||
# --------------------------------------------------------
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertoolsV2
|
||||
from platformcode import config, logger
|
||||
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, cookies=False).data
|
||||
if 'WE ARE SORRY' in data:
|
||||
global data
|
||||
data = httptools.downloadpage(page_url).data
|
||||
if "<h2>WE ARE SORRY</h2>" in data or '<title>404 Not Found</title>' in data:
|
||||
return False, config.get_localized_string(70449) % "MixDrop"
|
||||
|
||||
return True, ""
|
||||
|
||||
|
||||
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||
logger.info()
|
||||
itemlist = []
|
||||
logger.info("url=" + page_url)
|
||||
video_urls = []
|
||||
ext = '.mp4'
|
||||
|
||||
# streaming url
|
||||
data = httptools.downloadpage(page_url).data
|
||||
data = re.sub(r'\n|\t|\r', ' ', data)
|
||||
data = re.sub(r'>\s\s*<', '><', data)
|
||||
jsCode = scrapertoolsV2.find_single_match(data, r'<script>\s*MDCore\.ref = "[a-z0-9]+"; (.*?) </script>')
|
||||
jsUnpacked = jsunpack.unpack(jsCode)
|
||||
url = "https://" + scrapertoolsV2.find_single_match(jsUnpacked, r'vsr[^=]*="(?:/)?(/[^"]+)')
|
||||
packed = scrapertools.find_single_match(data, r'(eval.*?)</script>')
|
||||
unpacked = jsunpack.unpack(packed)
|
||||
media_url = scrapertools.find_single_match(unpacked, r'MDCore\.furl\s*=\s*"([^"]+)"')
|
||||
if not media_url.startswith('http'):
|
||||
media_url = 'http:%s' % media_url
|
||||
video_urls.append(["%s [Mixdrop]" % ext, media_url])
|
||||
|
||||
itemlist.append([".mp4 [MixDrop]", url])
|
||||
|
||||
# download url
|
||||
# import urllib
|
||||
# try:
|
||||
# import json
|
||||
# except:
|
||||
# import simplejson as json
|
||||
# page_url = page_url.replace('/e/', '/f/') + '?download'
|
||||
# data = httptools.downloadpage(page_url).data
|
||||
# csrf = scrapertoolsV2.find_single_match(data, '<meta name="csrf" content="([^"]+)">')
|
||||
# postData = {'csrf': csrf, 'a': 'genticket'}
|
||||
# resp = httptools.downloadpage(page_url, post=urllib.urlencode(postData)).data
|
||||
# resp = json.loads(resp)
|
||||
# if resp['type'] == 'ok':
|
||||
# itemlist.append([".mp4 [MixDrop]", 'https:' + resp['url']])
|
||||
|
||||
return itemlist
|
||||
return video_urls
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertoolsV2
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import config, logger
|
||||
import ast
|
||||
@@ -22,10 +22,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
video_urls = []
|
||||
data = httptools.downloadpage(page_url).data
|
||||
# logger.info(data)
|
||||
block = scrapertoolsV2.find_single_match(data, r'sources: \[([^\]]+)\]')
|
||||
sources = scrapertoolsV2.find_multiple_matches(block, r'file:\s*"([^"]+)"(?:,label:\s*"([^"]+)")?')
|
||||
block = scrapertools.find_single_match(data, r'sources: \[([^\]]+)\]')
|
||||
sources = scrapertools.find_multiple_matches(block, r'file:\s*"([^"]+)"(?:,label:\s*"([^"]+)")?')
|
||||
if not sources:
|
||||
sources = scrapertoolsV2.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+",[^,]+,\s*label:\s*"([^"]+)"')
|
||||
sources = scrapertools.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+",[^,]+,\s*label:\s*"([^"]+)"')
|
||||
for url, quality in sources:
|
||||
quality = 'auto' if not quality else quality
|
||||
video_urls.append(['.' + url.split('.')[-1] + ' [' + quality + '] [Onlystream]', url])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from core import httptools
|
||||
from core import scrapertoolsV2
|
||||
from core import scrapertools
|
||||
from lib import jsunpack
|
||||
from platformcode import config, logger
|
||||
import ast
|
||||
@@ -22,10 +22,10 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
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.*)")
|
||||
code_data = scrapertools.find_single_match(data, "<script type='text/javascript'>(eval.*)")
|
||||
if code_data:
|
||||
code = jsunpack.unpack(code_data)
|
||||
match = scrapertoolsV2.find_single_match(code, r'sources:(\[[^]]+\])')
|
||||
match = scrapertools.find_single_match(code, r'sources:(\[[^]]+\])')
|
||||
lSrc = ast.literal_eval(match)
|
||||
|
||||
lQuality = ['360p', '720p', '1080p', '4k'][:len(lSrc)-1]
|
||||
@@ -36,7 +36,7 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
||||
video_urls.append(['.' + source.split('.')[-1] + '(' + quality + ') [SuperVideo]', source])
|
||||
else:
|
||||
logger.info('ELSE!')
|
||||
matches = scrapertoolsV2.find_multiple_matches(data, r'src:\s*"([^"]+)",\s*type:\s*"[^"]+"(?:\s*, res:\s(\d+))?')
|
||||
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 + ']', url])
|
||||
|
||||
Reference in New Issue
Block a user