Migliorie riconoscimento server Cinemalibero e nuovo server HexUpload
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@
|
|||||||
"raiplay": "https://www.raiplay.it",
|
"raiplay": "https://www.raiplay.it",
|
||||||
"serietvu": "https://www.serietvu.live",
|
"serietvu": "https://www.serietvu.live",
|
||||||
"streamingcommunity": "https://streamingcommunity.actor",
|
"streamingcommunity": "https://streamingcommunity.actor",
|
||||||
"streamingita": "https://www.streamingita.bid",
|
"streamingita": "https://www.streamingita.best",
|
||||||
"streamtime": "https://t.me/s/StreamTime",
|
"streamtime": "https://t.me/s/StreamTime",
|
||||||
"tantifilm": "https://www.tantifilm.mobi",
|
"tantifilm": "https://www.tantifilm.mobi",
|
||||||
"toonitalia": "https://toonitalia.co"
|
"toonitalia": "https://toonitalia.co"
|
||||||
|
|||||||
+31
-28
@@ -97,10 +97,11 @@ def peliculas(item):
|
|||||||
@support.scrape
|
@support.scrape
|
||||||
def episodios(item):
|
def episodios(item):
|
||||||
data = item.data
|
data = item.data
|
||||||
|
# debug=True
|
||||||
|
|
||||||
if item.args == 'anime':
|
if item.args == 'anime':
|
||||||
logger.debug("Anime :", item)
|
logger.debug("Anime :", item)
|
||||||
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))'
|
patron = r'<a target=(?P<url>[^>]+>(?P<title>Episodio\s(?P<episode>\d+))(?::)?(?:(?P<title2>[^<]+))?.*?(?:<br|</p))|(?P<data>.+)'
|
||||||
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
patronBlock = r'(?:Stagione (?P<season>\d+))?(?:</span><br />|</span></p>|strong></p>)(?P<block>.*?)(?:<div style="margin-left|<span class="txt_dow">)'
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
elif item.args == 'sport':
|
elif item.args == 'sport':
|
||||||
@@ -110,7 +111,6 @@ def episodios(item):
|
|||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
elif item.args == 'serie' or item.contentType == 'tvshow':
|
elif item.args == 'serie' or item.contentType == 'tvshow':
|
||||||
logger.debug("Serie :", item)
|
logger.debug("Serie :", item)
|
||||||
# debug=True
|
|
||||||
patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|×)\d+|Puntata \d+)(?:-(?P<episode2>\d+))?[;]?[ ]?(?P<title>[^<–-]+))?(?P<data>.*?)(?:<br|</p)'
|
patron = r'(?:/>|<p>)\s*(?:(?P<episode>\d+(?:x|×|×)\d+|Puntata \d+)(?:-(?P<episode2>\d+))?[;]?[ ]?(?P<title>[^<–-]+))?(?P<data>.*?)(?:<br|</p)'
|
||||||
patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)'
|
patronBlock = r'Stagione\s(?:[Uu]nica)?(?:(?P<lang>iTA|ITA|Sub-ITA|Sub-iTA))?.*?</strong>(?P<block>.+?)(?:strong>|<div class="at-below)'
|
||||||
item.contentType = 'tvshow'
|
item.contentType = 'tvshow'
|
||||||
@@ -130,26 +130,30 @@ def episodios(item):
|
|||||||
for it in itl:
|
for it in itl:
|
||||||
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
|
ep = scrapertools.find_single_match(it.title, r'(\d+x\d+)')
|
||||||
if not ep and 'http' in it.data: # stagione intera
|
if not ep and 'http' in it.data: # stagione intera
|
||||||
from lib import unshortenit
|
# from lib import unshortenit
|
||||||
data = unshortenit.findlinks(it.data)
|
# data = unshortenit.findlinks(it.data)
|
||||||
|
episodes = {}
|
||||||
|
|
||||||
def get_ep(s):
|
def get_ep(s):
|
||||||
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
|
srv_mod = __import__('servers.%s' % s.server, None, None, ["servers.%s" % s.server])
|
||||||
if hasattr(srv_mod, 'get_filename'):
|
if hasattr(srv_mod, 'get_filename'):
|
||||||
title = srv_mod.get_filename(s.url)
|
title = srv_mod.get_filename(s.url)
|
||||||
ep = scrapertools.get_season_and_episode(title)
|
if item.args == 'anime':
|
||||||
|
ep = title
|
||||||
|
else:
|
||||||
|
ep = scrapertools.get_season_and_episode(title)
|
||||||
if ep:
|
if ep:
|
||||||
if ep not in episodes:
|
if ep not in episodes:
|
||||||
episodes[ep] = []
|
episodes[ep] = []
|
||||||
episodes[ep].append(s)
|
episodes[ep].append(s)
|
||||||
|
|
||||||
servers = support.server(item, data, CheckLinks=False, Download=False, Videolibrary=False)
|
servers = support.server(item, it.data, CheckLinks=False, Download=False, Videolibrary=False)
|
||||||
episodes = {}
|
# for s in servers:
|
||||||
for s in servers:
|
# get_ep(s)
|
||||||
get_ep(s)
|
|
||||||
# ottengo l'episodio dal nome del file
|
# ottengo l'episodio dal nome del file
|
||||||
# with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
# for s in servers:
|
for s in servers:
|
||||||
# executor.submit(get_ep, s)
|
executor.submit(get_ep, s)
|
||||||
# logger.debug(it.contentLanguage)
|
# logger.debug(it.contentLanguage)
|
||||||
ret.extend([it.clone(title=typo(ep, 'bold')+typo(it.contentLanguage, '_ [] color kod bold'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
|
ret.extend([it.clone(title=typo(ep, 'bold')+typo(it.contentLanguage, '_ [] color kod bold'), contentSeason=int(ep.split('x')[0]), contentEpisodeNumber=int(ep.split('x')[1]), servers=[srv.tourl() for srv in episodes[ep]]) for ep in episodes])
|
||||||
elif ep:
|
elif ep:
|
||||||
@@ -248,26 +252,25 @@ def findvideos(item):
|
|||||||
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
|
return support.server(item, itemlist=[Item().fromurl(s) for s in item.servers])
|
||||||
if not item.data:
|
if not item.data:
|
||||||
item.data = httptools.downloadpage(item.url)
|
item.data = httptools.downloadpage(item.url)
|
||||||
data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)<div class="at-below-post')
|
data = scrapertools.find_single_match(item.data, '<div class="at-above-post addthis_tool"(.*?)(?:<div class="at-below-post|[dD][oO][wW][nN][lL][oO][aA][dD])')
|
||||||
if data:
|
if data:
|
||||||
item.data = data
|
item.data = data
|
||||||
|
|
||||||
servers = []
|
servers = []
|
||||||
if item.args == 'anime':
|
# if item.args == 'anime':
|
||||||
if item.urls: # this is a episode
|
# if item.urls: # this is a episode
|
||||||
return support.server(item, itemlist=[Item(url=support.unshortenit.FileCrypt().unshorten(u)) for u in item.urls])
|
# return support.server(item, itemlist=[Item(url=support.unshortenit.FileCrypt().unshorten(u)) for u in item.urls])
|
||||||
itemlist = []
|
# itemlist = []
|
||||||
episodes = {}
|
# episodes = {}
|
||||||
# support.dbg()
|
# for uri in support.unshortenit.FileCrypt().find(item.data):
|
||||||
for uri in support.unshortenit.FileCrypt().find(item.data):
|
# for ep in support.unshortenit.FileCrypt(uri).list_files():
|
||||||
for ep in support.unshortenit.FileCrypt(uri).list_files():
|
# ep = ('.'.join(ep[0].split('.')[:-1]), ep[1]) # remove extension
|
||||||
ep = ('.'.join(ep[0].split('.')[:-1]), ep[1]) # remove extension
|
# if not ep[0] in episodes:
|
||||||
if not ep[0] in episodes:
|
# episodes[ep[0]] = []
|
||||||
episodes[ep[0]] = []
|
# episodes[ep[0]].append(ep[1])
|
||||||
episodes[ep[0]].append(ep[1])
|
# for ep in episodes.keys():
|
||||||
for ep in episodes.keys():
|
# itemlist.append(item.clone(title=ep, urls=episodes[ep], action='findvideos', data=''))
|
||||||
itemlist.append(item.clone(title=ep, urls=episodes[ep], action='findvideos', data=''))
|
# return itemlist
|
||||||
return itemlist
|
|
||||||
total_servers = support.server(item, data=item.data)
|
total_servers = support.server(item, data=item.data)
|
||||||
|
|
||||||
if item.contentType == 'episode' and len(set([srv.server for srv in total_servers])) < len([srv.server for srv in total_servers]):
|
if item.contentType == 'episode' and len(set([srv.server for srv in total_servers])) < len([srv.server for srv in total_servers]):
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ def process_request_proxy(url):
|
|||||||
data = re.sub('https://translate\.googleusercontent\.com/.*?u=(.*?)&usg=[A-Za-z0-9_-]+', '\\1', data)
|
data = re.sub('https://translate\.googleusercontent\.com/.*?u=(.*?)&usg=[A-Za-z0-9_-]+', '\\1', data)
|
||||||
data = re.sub('https?://[a-zA-Z0-9-]*' + domain.replace('.', '-') + '\.translate\.goog(/[a-zA-Z0-9#/-]+)', 'https://' + domain + '\\1', data)
|
data = re.sub('https?://[a-zA-Z0-9-]*' + domain.replace('.', '-') + '\.translate\.goog(/[a-zA-Z0-9#/-]+)', 'https://' + domain + '\\1', data)
|
||||||
data = re.sub('\s+<', '<', data)
|
data = re.sub('\s+<', '<', data)
|
||||||
|
data = re.sub('https://translate\.google\.com/website\?[^ ]+u=', '', data)
|
||||||
data = data.replace('&', '&').replace('https://translate.google.com/website?sl=' + SL + '&tl=' + TL + '&ajax=1&u=', '')
|
data = data.replace('&', '&').replace('https://translate.google.com/website?sl=' + SL + '&tl=' + TL + '&ajax=1&u=', '')
|
||||||
|
|
||||||
return {'url': url.strip(), 'result': result, 'data': data}
|
return {'url': url.strip(), 'result': result, 'data': data}
|
||||||
|
|||||||
+67
-34
@@ -45,15 +45,16 @@ class UnshortenIt(object):
|
|||||||
_protectlink_regex = r'(?:s\.)?protectlink\.stream'
|
_protectlink_regex = r'(?:s\.)?protectlink\.stream'
|
||||||
_uprot_regex = r'uprot\.net'
|
_uprot_regex = r'uprot\.net'
|
||||||
# for services that only include real link inside iframe
|
# for services that only include real link inside iframe
|
||||||
_simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link|icu'
|
_simple_iframe_regex = r'cryptmango|xshield\.net|vcrypt\.club|isecure\.link|isecure\.icu'
|
||||||
# for services that only do redirects
|
# for services that only do redirects
|
||||||
_simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream|isecure\.link|icu'
|
_simple_redirect = r'streamcrypt\.net/[^/]+|is\.gd|www\.vedere\.stream|isecure\.link|isecure\.icu'
|
||||||
_filecrypt_regex = r'filecrypt\.cc'
|
_filecrypt_regex = r'filecrypt\.cc'
|
||||||
|
|
||||||
listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,
|
listRegex = [_adfly_regex, _linkbucks_regex, _adfocus_regex, _lnxlu_regex, _shst_regex, _hrefli_regex, _anonymz_regex,
|
||||||
_shrink_service_regex, _rapidcrypt_regex, _simple_iframe_regex, _linkup_regex, _linkhub_regex,
|
_shrink_service_regex, _rapidcrypt_regex, _simple_iframe_regex, _linkup_regex,
|
||||||
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _uprot_regex, _simple_redirect,
|
_swzz_regex, _stayonline_regex, _snip_regex, _linksafe_regex, _protectlink_regex, _uprot_regex, _simple_redirect,
|
||||||
_filecrypt_regex]
|
]
|
||||||
|
folderRegex = [_filecrypt_regex, _linkhub_regex]
|
||||||
|
|
||||||
_maxretries = 5
|
_maxretries = 5
|
||||||
|
|
||||||
@@ -95,8 +96,6 @@ class UnshortenIt(object):
|
|||||||
# uri, code = self._unshorten_vcrypt(uri)
|
# uri, code = self._unshorten_vcrypt(uri)
|
||||||
if re.search(self._linkup_regex, uri, re.IGNORECASE):
|
if re.search(self._linkup_regex, uri, re.IGNORECASE):
|
||||||
uri, code = self._unshorten_linkup(uri)
|
uri, code = self._unshorten_linkup(uri)
|
||||||
if re.search(self._linkhub_regex, uri, re.IGNORECASE):
|
|
||||||
uri, code = self._unshorten_linkhub(uri)
|
|
||||||
if re.search(self._swzz_regex, uri, re.IGNORECASE):
|
if re.search(self._swzz_regex, uri, re.IGNORECASE):
|
||||||
uri, code = self._unshorten_swzz(uri)
|
uri, code = self._unshorten_swzz(uri)
|
||||||
if re.search(self._stayonline_regex, uri, re.IGNORECASE):
|
if re.search(self._stayonline_regex, uri, re.IGNORECASE):
|
||||||
@@ -109,8 +108,6 @@ class UnshortenIt(object):
|
|||||||
uri, code = self._unshorten_protectlink(uri)
|
uri, code = self._unshorten_protectlink(uri)
|
||||||
if re.search(self._uprot_regex, uri, re.IGNORECASE):
|
if re.search(self._uprot_regex, uri, re.IGNORECASE):
|
||||||
uri, code = self._unshorten_uprot(uri)
|
uri, code = self._unshorten_uprot(uri)
|
||||||
if re.search(self._filecrypt_regex, uri, re.IGNORECASE):
|
|
||||||
uri, code = self._unshorten_filecrypt(uri)
|
|
||||||
if re.search(self._simple_redirect, uri, re.IGNORECASE):
|
if re.search(self._simple_redirect, uri, re.IGNORECASE):
|
||||||
p = httptools.downloadpage(uri)
|
p = httptools.downloadpage(uri)
|
||||||
uri = p.url
|
uri = p.url
|
||||||
@@ -125,6 +122,14 @@ class UnshortenIt(object):
|
|||||||
raise Exception('Not un-shortened link: ' + uri)
|
raise Exception('Not un-shortened link: ' + uri)
|
||||||
return uri, code
|
return uri, code
|
||||||
|
|
||||||
|
def expand_folder(self, uri):
|
||||||
|
links = []
|
||||||
|
if re.search(self._linkhub_regex, uri, re.IGNORECASE):
|
||||||
|
links = self._unshorten_linkhub(uri)
|
||||||
|
if re.search(self._filecrypt_regex, uri, re.IGNORECASE):
|
||||||
|
links = self._unshorten_filecrypt(uri)
|
||||||
|
return links
|
||||||
|
|
||||||
def unwrap_30x(self, uri, timeout=10):
|
def unwrap_30x(self, uri, timeout=10):
|
||||||
def unwrap_30x(uri, timeout=10):
|
def unwrap_30x(uri, timeout=10):
|
||||||
|
|
||||||
@@ -602,13 +607,9 @@ class UnshortenIt(object):
|
|||||||
logger.info(uri)
|
logger.info(uri)
|
||||||
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
r = httptools.downloadpage(uri, follow_redirect=True, timeout=self._timeout, cookies=False)
|
||||||
links = re.findall('<a href="(http[^"]+)', r.data)
|
links = re.findall('<a href="(http[^"]+)', r.data)
|
||||||
if len(links) == 1:
|
return links
|
||||||
uri = links[0]
|
|
||||||
else:
|
|
||||||
uri = "\n".join(links) # folder
|
|
||||||
return uri, r.code
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return uri, str(e)
|
return []
|
||||||
|
|
||||||
def _unshorten_swzz(self, uri):
|
def _unshorten_swzz(self, uri):
|
||||||
try:
|
try:
|
||||||
@@ -705,19 +706,24 @@ class UnshortenIt(object):
|
|||||||
return link, 200
|
return link, 200
|
||||||
return uri, 200
|
return uri, 200
|
||||||
|
|
||||||
# container, for returning only the first result
|
|
||||||
def _unshorten_filecrypt(self, uri):
|
def _unshorten_filecrypt(self, uri):
|
||||||
url = ''
|
import sys
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
from concurrent import futures
|
||||||
|
else:
|
||||||
|
from concurrent_py2 import futures
|
||||||
|
links = []
|
||||||
try:
|
try:
|
||||||
fc = FileCrypt(uri)
|
fc = FileCrypt(uri)
|
||||||
url = fc.unshorten(fc.list_files()[0][1])
|
# links = [fc.unshorten(f[2]) for f in fc.list_files()]
|
||||||
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
|
unshList = [executor.submit(fc.unshorten, f[2]) for f in fc.list_files()]
|
||||||
|
for link in futures.as_completed(unshList):
|
||||||
|
links.append(link.result())
|
||||||
except:
|
except:
|
||||||
import traceback
|
import traceback
|
||||||
logger.error(traceback.format_exc())
|
logger.error(traceback.format_exc())
|
||||||
if url:
|
return links
|
||||||
return url, 200
|
|
||||||
else:
|
|
||||||
return uri, 200
|
|
||||||
|
|
||||||
|
|
||||||
def decrypt_aes(text, key):
|
def decrypt_aes(text, key):
|
||||||
@@ -758,9 +764,31 @@ def unshorten(uri, type=None, timeout=10):
|
|||||||
|
|
||||||
|
|
||||||
def findlinks(text):
|
def findlinks(text):
|
||||||
|
import sys
|
||||||
|
if sys.version_info[0] >= 3:
|
||||||
|
from concurrent import futures
|
||||||
|
else:
|
||||||
|
from concurrent_py2 import futures
|
||||||
|
|
||||||
unshortener = UnshortenIt()
|
unshortener = UnshortenIt()
|
||||||
matches = []
|
matches = []
|
||||||
|
|
||||||
|
# expand folders
|
||||||
|
regex = '(?:https?://(?:[\w\d]+\.)?)?(?:'
|
||||||
|
for rg in unshortener.folderRegex:
|
||||||
|
regex += rg + '|'
|
||||||
|
regex = regex[:-1] + ')/[a-zA-Z0-9_=/]+'
|
||||||
|
for match in re.findall(regex, text):
|
||||||
|
matches.append(match)
|
||||||
|
|
||||||
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
|
unshList = [executor.submit(unshortener.expand_folder, match) for match in matches]
|
||||||
|
for ret in futures.as_completed(unshList):
|
||||||
|
text += '\n'.join(ret.result())
|
||||||
|
text += '\n'
|
||||||
|
|
||||||
|
# unshorten
|
||||||
|
matches = []
|
||||||
regex = '(?:https?://(?:[\w\d]+\.)?)?(?:'
|
regex = '(?:https?://(?:[\w\d]+\.)?)?(?:'
|
||||||
for rg in unshortener.listRegex:
|
for rg in unshortener.listRegex:
|
||||||
regex += rg + '|'
|
regex += rg + '|'
|
||||||
@@ -776,11 +804,6 @@ def findlinks(text):
|
|||||||
# for match in matches:
|
# for match in matches:
|
||||||
# sh = unshorten(match)[0]
|
# sh = unshorten(match)[0]
|
||||||
# text += '\n' + sh
|
# text += '\n' + sh
|
||||||
import sys
|
|
||||||
if sys.version_info[0] >= 3:
|
|
||||||
from concurrent import futures
|
|
||||||
else:
|
|
||||||
from concurrent_py2 import futures
|
|
||||||
with futures.ThreadPoolExecutor() as executor:
|
with futures.ThreadPoolExecutor() as executor:
|
||||||
unshList = [executor.submit(unshorten, match) for match in matches]
|
unshList = [executor.submit(unshorten, match) for match in matches]
|
||||||
for link in futures.as_completed(unshList):
|
for link in futures.as_completed(unshList):
|
||||||
@@ -795,22 +818,32 @@ def findlinks(text):
|
|||||||
|
|
||||||
|
|
||||||
class FileCrypt:
|
class FileCrypt:
|
||||||
|
hostToFilter = ('https://nitroflare.com', 'http://easybytez.com', 'http://drop.download', 'https://rapidgator.net')
|
||||||
|
extensionToFilter = ('rar',)
|
||||||
|
|
||||||
def __init__(self, uri=None):
|
def __init__(self, uri=None):
|
||||||
self.uri = uri
|
self.uri = uri
|
||||||
|
|
||||||
def find(self, data):
|
def find(self, data):
|
||||||
_filecrypt_regex = r'https?://\w+\.filecrypt\.cc/[a-zA-Z0-9_=/]+'
|
_filecrypt_regex = r'https?://(?:\w+\.)?filecrypt\.cc/[a-zA-Z0-9_=/]+'
|
||||||
return scrapertools.find_multiple_matches(data, _filecrypt_regex)
|
return scrapertools.find_multiple_matches(data, _filecrypt_regex)
|
||||||
|
|
||||||
def list_files(self):
|
def list_files(self):
|
||||||
reg = """<td title="([^"]+).*?<button onclick="openLink\('([^']+)"""
|
reg = """<td title="([^"]+).*?<a href="([^"]+).*?<button onclick="openLink\('([^']+)"""
|
||||||
data = httptools.downloadpage(self.uri).data
|
data = httptools.downloadpage(self.uri).data
|
||||||
|
if 'Richiamo alla sicurezza' in data: # captcha, try with gtranslate
|
||||||
|
from lib import proxytranslate
|
||||||
|
data = proxytranslate.process_request_proxy(self.uri).get('data', '')
|
||||||
ret = scrapertools.find_multiple_matches(data, reg)
|
ret = scrapertools.find_multiple_matches(data, reg)
|
||||||
return ret
|
return [r for r in ret if r[1] not in self.hostToFilter and r[0].split('.')[-1] not in self.extensionToFilter]
|
||||||
|
|
||||||
def unshorten(self, link):
|
def unshorten(self, link):
|
||||||
link_data = httptools.downloadpage('https://www.filecrypt.cc/Link/' + link + '.html').data
|
link_data = httptools.downloadpage('https://filecrypt.cc/Link/' + link + '.html').data
|
||||||
time.sleep(0.1)
|
link_url = scrapertools.find_single_match(link_data, "location.href='([^']+)")
|
||||||
url = httptools.downloadpage(scrapertools.find_single_match(link_data, "location.href='([^']+)"), headers={'Referer': 'http://www.filecrypt.cc/'}, only_headers=True).url
|
if link_url:
|
||||||
logger.info(url)
|
time.sleep(0.1)
|
||||||
return url
|
url = httptools.downloadpage(link_url, headers={'Referer': 'http://filecrypt.cc/'}, only_headers=True).url
|
||||||
|
logger.info(url)
|
||||||
|
return url
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"active": true,
|
||||||
|
"find_videos": {
|
||||||
|
"ignore_urls": [],
|
||||||
|
"patterns": [{
|
||||||
|
"pattern": "hexupload\\.net/([A-z0-9]{12})",
|
||||||
|
"url": "https://hexupload.net/\\1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "hexupload\\.net/embed-([A-z0-9]{12}).html",
|
||||||
|
"url": "https://hexupload.net/\\1"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"free": true,
|
||||||
|
"id": "hexupload",
|
||||||
|
"name": "HexUpload",
|
||||||
|
"settings": [{
|
||||||
|
"default": false,
|
||||||
|
"enabled": true,
|
||||||
|
"id": "black_list",
|
||||||
|
"label": "@70708",
|
||||||
|
"type": "bool",
|
||||||
|
"visible": true
|
||||||
|
}]
|
||||||
|
}
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
from core import httptools, scrapertools
|
||||||
|
from platformcode import config
|
||||||
|
import base64
|
||||||
|
|
||||||
|
|
||||||
|
def test_video_exists(page_url):
|
||||||
|
global data
|
||||||
|
data = httptools.downloadpage(page_url).data
|
||||||
|
|
||||||
|
if 'File Not Found' in data:
|
||||||
|
return False, config.get_localized_string(70449) % "HexUpload"
|
||||||
|
else:
|
||||||
|
return True, ""
|
||||||
|
|
||||||
|
|
||||||
|
def get_video_url(page_url, premium=False, user="", password="", video_password=""):
|
||||||
|
video_urls = []
|
||||||
|
global data
|
||||||
|
source = scrapertools.find_single_match(data, r'b4aa\.buy\("([^"]+)')
|
||||||
|
if source:
|
||||||
|
media_url = base64.b64decode(source).decode()
|
||||||
|
video_urls.append(["mp4", media_url])
|
||||||
|
else: # download only
|
||||||
|
post = {
|
||||||
|
"op": "download2",
|
||||||
|
"id": page_url.split('/')[-1],
|
||||||
|
"method_free": "Free + Download",
|
||||||
|
"method_premium": "",
|
||||||
|
"adblock_detected": "0"
|
||||||
|
}
|
||||||
|
data = httptools.downloadpage(page_url, post=post).data
|
||||||
|
media_url, filename = scrapertools.find_single_match(data, "ldl\.ld\('([^']+)','([^']+)")
|
||||||
|
media_url = base64.b64decode(media_url).decode()
|
||||||
|
filename = base64.b64decode(filename).decode()
|
||||||
|
video_urls.append([filename.split('.')[-1], media_url])
|
||||||
|
return video_urls
|
||||||
|
|
||||||
|
|
||||||
|
def get_filename(page_url):
|
||||||
|
# from core.support import dbg;dbg()
|
||||||
|
title = httptools.downloadpage(page_url).data.split('<h2 style="word-break: break-all;">')[1].split('</h2>')[0]
|
||||||
|
return title
|
||||||
@@ -4,11 +4,11 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "mixdrop[s]?.[^/]+/(?:f|e)/([a-z0-9]+)",
|
"pattern": "mixdro?ps?.[^/]+/(?:f|e)/([a-z0-9]+)",
|
||||||
"url": "https://mixdrop.co/e/\\1"
|
"url": "https://mixdrop.co/e/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "(mixdrop[s]?.[^/]+/player\\.php\\?id=[a-z0-9-]+)",
|
"pattern": "(mixdro?ps?.[^/]+/player\\.php\\?id=[a-z0-9-]+)",
|
||||||
"url": "https://\\1"
|
"url": "https://\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [{
|
"patterns": [{
|
||||||
"pattern": "(?:streamsb|sblanh|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas|sbfast|sbfull|viewsb|sbvideo|cloudemb|sbplay2|japopav|javplaya|ssbstream|sbthe|sbspeed|sbanh)\\.\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
|
"pattern": "(?:streamsb|sblanh|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas|sbfast|sbfull|viewsb|sbvideo|cloudemb|sbplay2|japopav|javplaya|ssbstream|sbthe|sbspeed|sbanh|sblongvu|sbchill)\\.\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
|
||||||
"url": "https://streamsb.net/d/\\1"
|
"url": "https://streamsb.net/d/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user