support link embed akvideo e wstream, miglioria vcrypt
This commit is contained in:
+2
-1
@@ -476,6 +476,7 @@ class UnshortenIt(object):
|
|||||||
|
|
||||||
def _unshorten_vcrypt(self, uri):
|
def _unshorten_vcrypt(self, uri):
|
||||||
try:
|
try:
|
||||||
|
headers = {}
|
||||||
if 'myfoldersakstream.php' in uri or '/verys/' in uri:
|
if 'myfoldersakstream.php' in uri or '/verys/' in uri:
|
||||||
return uri, 0
|
return uri, 0
|
||||||
r = None
|
r = None
|
||||||
@@ -495,6 +496,7 @@ class UnshortenIt(object):
|
|||||||
if 'shield' in uri.split('/')[-2]:
|
if 'shield' in uri.split('/')[-2]:
|
||||||
uri = decrypt(uri.split('/')[-1])
|
uri = decrypt(uri.split('/')[-1])
|
||||||
else:
|
else:
|
||||||
|
if 'sb/' in uri or 'akv/' in uri or 'wss/' in uri or 'wsd/' in uri:
|
||||||
import datetime, hashlib
|
import datetime, hashlib
|
||||||
ip = urllib.urlopen('http://ip.42.pl/raw').read()
|
ip = urllib.urlopen('http://ip.42.pl/raw').read()
|
||||||
day = datetime.date.today().strftime('%Y%m%d')
|
day = datetime.date.today().strftime('%Y%m%d')
|
||||||
@@ -511,7 +513,6 @@ class UnshortenIt(object):
|
|||||||
logger.info('IP bannato da vcrypt, aspetta un ora')
|
logger.info('IP bannato da vcrypt, aspetta un ora')
|
||||||
else:
|
else:
|
||||||
uri = r.headers['location']
|
uri = r.headers['location']
|
||||||
|
|
||||||
if "4snip" in uri:
|
if "4snip" in uri:
|
||||||
if 'out_generator' in uri:
|
if 'out_generator' in uri:
|
||||||
uri = re.findall('url=(.*)$', uri)[0]
|
uri = re.findall('url=(.*)$', uri)[0]
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
"find_videos": {
|
"find_videos": {
|
||||||
"ignore_urls": ["http://akvideo.stream/video", "http://akvideo.stream/video/api"],
|
"ignore_urls": ["http://akvideo.stream/video", "http://akvideo.stream/video/api"],
|
||||||
"patterns": [
|
"patterns": [
|
||||||
|
{
|
||||||
|
"pattern": "(https?://akvideo.stream/swembedid/\\d+)",
|
||||||
|
"url": "\\1"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"pattern": "(https://akvideo\\.stream/api/vcmod/fastredirect/embed_ak\\.php\\?id=[0-9]+)",
|
"pattern": "(https://akvideo\\.stream/api/vcmod/fastredirect/embed_ak\\.php\\?id=[0-9]+)",
|
||||||
"url": "\\1"
|
"url": "\\1"
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ def test_video_exists(page_url):
|
|||||||
global data
|
global data
|
||||||
page = httptools.downloadpage(page_url)
|
page = httptools.downloadpage(page_url)
|
||||||
logger.info(page.data)
|
logger.info(page.data)
|
||||||
if 'embed_ak.php' in page_url:
|
if 'embed_ak.php' in page_url or '/embed-' in page.url:
|
||||||
code = scrapertools.find_single_match(page.url, '/embed-([0-9a-z]+)\.html')
|
code = scrapertools.find_single_match(page.url, '/embed-([0-9a-z]+)\.html')
|
||||||
if not code:
|
if not code:
|
||||||
code = scrapertools.find_single_match(page.data, r"""input\D*id=(?:'|")[^'"]+(?:'|").*?value='([a-z0-9]+)""")
|
code = scrapertools.find_single_match(page.data, r"""input\D*id=(?:'|")[^'"]+(?:'|").*?value='([a-z0-9]+)""")
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"url": "https://wstream.video/video.php?file_code=\\1"
|
"url": "https://wstream.video/video.php?file_code=\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "wstream\\.video/(?!api|swembedid)([a-zA-Z0-9/]+.html)",
|
"pattern": "wstream\\.video/(?!api)([a-zA-Z0-9/]+.html)",
|
||||||
"url": "https://wstream.video/\\1"
|
"url": "https://wstream.video/\\1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ headers = [['User-Agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20
|
|||||||
def test_video_exists(page_url):
|
def test_video_exists(page_url):
|
||||||
logger.info("(page_url='%s')" % page_url)
|
logger.info("(page_url='%s')" % page_url)
|
||||||
resp = httptools.downloadpage(page_url)
|
resp = httptools.downloadpage(page_url)
|
||||||
|
|
||||||
global data, real_url
|
global data, real_url
|
||||||
data = resp.data
|
data = resp.data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user