Nuovi domini streamlare e streamsb, possibile fix streamsb
This commit is contained in:
@@ -513,7 +513,7 @@ def girc(page_data, url, co):
|
|||||||
and https://github.com/addon-lab/addon-lab_resolver_Project
|
and https://github.com/addon-lab/addon-lab_resolver_Project
|
||||||
Copyright (C) 2021 ADDON-LAB, KAR10S
|
Copyright (C) 2021 ADDON-LAB, KAR10S
|
||||||
"""
|
"""
|
||||||
import re
|
import re, random, string
|
||||||
from core import httptools
|
from core import httptools
|
||||||
hdrs = {'Referer': url}
|
hdrs = {'Referer': url}
|
||||||
rurl = 'https://www.google.com/recaptcha/api.js'
|
rurl = 'https://www.google.com/recaptcha/api.js'
|
||||||
@@ -527,10 +527,11 @@ def girc(page_data, url, co):
|
|||||||
rdata = {'ar': 1,
|
rdata = {'ar': 1,
|
||||||
'k': key,
|
'k': key,
|
||||||
'co': co,
|
'co': co,
|
||||||
'hl': 'en',
|
'hl': 'it',
|
||||||
'v': v,
|
'v': v,
|
||||||
'size': 'invisible',
|
'size': 'invisible',
|
||||||
'cb': '123456789'}
|
'sa': 'submit',
|
||||||
|
'cb': ''.join([random.choice(string.ascii_lowercase + string.digits) for i in range(12)])}
|
||||||
page_data2 = httptools.downloadpage('{0}/anchor?{1}'.format(aurl, httptools.urlparse.urlencode(rdata)), headers=hdrs).data
|
page_data2 = httptools.downloadpage('{0}/anchor?{1}'.format(aurl, httptools.urlparse.urlencode(rdata)), headers=hdrs).data
|
||||||
rtoken = re.search('recaptcha-token.+?="([^"]+)', page_data2)
|
rtoken = re.search('recaptcha-token.+?="([^"]+)', page_data2)
|
||||||
if rtoken:
|
if rtoken:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "https://streamlare.com/[ve]/(\\w+)",
|
"pattern": "https?://(?:streamlare|sl(?:maxed|tube|watch))\\.(?:com?|org)/[ve]/(\\w+)",
|
||||||
"url": "https://streamlare.com/e/\\1"
|
"url": "https://streamlare.com/e/\\1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"ignore_urls": [],
|
"ignore_urls": [],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
{
|
{
|
||||||
"pattern": "(?:streamsb|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas|sbfast|sbfull|viewsb).\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
|
"pattern": "(?:streamsb|sbembed|sbembed1|sbplay1|sbplay|pelistop|tubesb|playersb|embedsb|watchsb|streamas|sbfast|sbfull|viewsb|sbvideo|cloudemb|sbplay2|japopav|javplaya|ssbstream)\\.\\w{2,5}/(?:embed-|d/|e/)?([A-z0-9]+)",
|
||||||
"url": "https://streamsb.net/d/\\1"
|
"url": "https://streamsb.net/d/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+11
-12
@@ -24,18 +24,17 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
if sources:
|
if sources:
|
||||||
sources.sort(key=lambda x: int(x[1]), reverse=True)
|
sources.sort(key=lambda x: int(x[1]), reverse=True)
|
||||||
sources = [(x[1] + 'p', x[0]) for x in sources]
|
sources = [(x[1] + 'p', x[0]) for x in sources]
|
||||||
for s in sources:
|
s = sources[0] # only the first to reduce the number of requests to google recaptcha
|
||||||
code, mode, hash = eval(s[1])
|
code, mode, hash = eval(s[1])
|
||||||
dl_url = 'https://{0}/dl?op=download_orig&id={1}&mode={2}&hash={3}'.format(host, code, mode, hash)
|
dl_url = 'https://{0}/dl?op=download_orig&id={1}&mode={2}&hash={3}'.format(host, code, mode, hash)
|
||||||
data = httptools.downloadpage(dl_url).data
|
data = httptools.downloadpage(dl_url).data
|
||||||
|
captcha = scrapertools.girc(data, 'https://{0}/'.format(host), base64.b64encode('https://{0}:443'.format(host).encode('utf-8')).decode('utf-8').replace('=', ''))
|
||||||
captcha = scrapertools.girc(data, 'https://{0}/'.format(host), base64.b64encode('https://{0}:443'.format(host).encode('utf-8')).decode('utf-8').replace('=', ''))
|
if captcha:
|
||||||
if captcha:
|
data = httptools.downloadpage(dl_url, post={'op': 'download_orig', 'id': code, 'mode': mode,
|
||||||
data = httptools.downloadpage(dl_url, post={'op': 'download_orig', 'id': code, 'mode': mode,
|
'hash': hash, 'g-recaptcha-response': captcha}, timeout=10).data
|
||||||
'hash': hash, 'g-recaptcha-response': captcha}, timeout=10).data
|
media_url = scrapertools.find_single_match(data, 'href="([^"]+)"[^>]+>Download')
|
||||||
media_url = scrapertools.find_single_match(data, 'href="([^"]+)">Direct')
|
if media_url:
|
||||||
if media_url:
|
video_urls.append([s[0], media_url])
|
||||||
video_urls.append([s[0], media_url])
|
|
||||||
return video_urls
|
return video_urls
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user