fix dooplay_get_links e Wstream
This commit is contained in:
+3
-2
@@ -553,12 +553,13 @@ def dooplay_get_links(item, host):
|
||||
for type, post, nume, title, server in matches:
|
||||
postData = urlencode({
|
||||
"action": "doo_player_ajax",
|
||||
"post": post,
|
||||
"post": post,
|
||||
"nume": nume,
|
||||
"type": type
|
||||
})
|
||||
dataAdmin = httptools.downloadpage(host + '/wp-admin/admin-ajax.php', post=postData,headers={'Referer': item.url}).data
|
||||
link = scrapertools.find_single_match(dataAdmin, "<iframe.*src='([^']+)'")
|
||||
link = scrapertools.find_single_match(dataAdmin, r"<iframe.*src='([^']+)'")
|
||||
if not link: link = scrapertools.find_single_match(dataAdmin, r'"embed_url":"([^"]+)"').replace('\\','')
|
||||
ret.append({
|
||||
'url': link,
|
||||
'title': title,
|
||||
|
||||
@@ -7,6 +7,7 @@ import re
|
||||
|
||||
try:
|
||||
import urllib.parse as urllib
|
||||
# unichr = chr
|
||||
except ImportError:
|
||||
import urllib
|
||||
|
||||
@@ -32,6 +33,18 @@ def test_video_exists(page_url):
|
||||
page_url = 'https://116.202.226.34/video.php?file_code=' + code
|
||||
data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True, verify=False).data
|
||||
|
||||
if 'nored.icu' in str(headers):
|
||||
var = scrapertools.find_single_match(data, r'var [a-zA-Z0-9]+ = \[([^\]]+).*?')
|
||||
value = scrapertools.find_single_match(data, r'String\.fromCharCode\(parseInt\(value\) \D (\d+)')
|
||||
if var and value:
|
||||
dec = ''
|
||||
for v in var.split(','):
|
||||
dec += chr(int(v) - int(value))
|
||||
page_url = scrapertools.find_single_match(dec, "src='([^']+)")
|
||||
new_data = httptools.downloadpage(page_url, headers=headers, follow_redirects=True, verify=False).data
|
||||
if new_data:
|
||||
data = new_data
|
||||
|
||||
real_url = page_url
|
||||
if "Not Found" in data or "File was deleted" in data or 'Video is processing' in data or 'Sorry this video is unavailable' in data:
|
||||
return False, config.get_localized_string(70449) % 'Wstream'
|
||||
|
||||
Reference in New Issue
Block a user