flashx: Actualizado get_video_url
Actualizado get_video_url
This commit is contained in:
@@ -68,19 +68,14 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
fname = scrapertools.find_single_match(data, 'name="fname" value="([^"]+)"')
|
fname = scrapertools.find_single_match(data, 'name="fname" value="([^"]+)"')
|
||||||
hash_f = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)"')
|
hash_f = scrapertools.find_single_match(data, 'name="hash" value="([^"]+)"')
|
||||||
post = 'op=download1&usr_login=&id=%s&fname=%s&referer=&hash=%s&imhuman=Proceed+to+video' % (
|
post = 'op=download1&usr_login=&id=%s&fname=%s&referer=&hash=%s&imhuman=Proceed+to+video' % (
|
||||||
flashx_id, urllib.quote(fname), hash_f)
|
flashx_id, urllib.quote(fname), hash_f)
|
||||||
wait_time = scrapertools.find_single_match(data, "<span id='xxc2'>(\d+)")
|
wait_time = scrapertools.find_single_match(data, "<span id='xxc2'>(\d+)")
|
||||||
|
|
||||||
file_id = scrapertools.find_single_match(data, "'file_id', '([^']+)'")
|
file_id = scrapertools.find_single_match(data, "'file_id', '([^']+)'")
|
||||||
coding_url = 'https://files.fx.fastcontentdelivery.com/jquery2.js?fx=%s' % base64.encodestring(file_id)
|
|
||||||
headers['Host'] = "files.fx.fastcontentdelivery.com"
|
|
||||||
headers['Referer'] = "https://www.flashx.tv/"
|
headers['Referer'] = "https://www.flashx.tv/"
|
||||||
headers['Accept'] = "*/*"
|
headers['Accept'] = "*/*"
|
||||||
coding = httptools.downloadpage(coding_url, headers=headers, replace_headers=True).data
|
|
||||||
|
|
||||||
coding_url = 'https://www.flashx.tv/counter.cgi?fx=%s' % base64.encodestring(file_id)
|
coding_url = 'https://www.flashx.tv/counter.cgi?fx=%s' % base64.encodestring(file_id)
|
||||||
headers['Host'] = "www.flashx.tv"
|
headers['Host'] = "www.flashx.tv"
|
||||||
coding = httptools.downloadpage(coding_url, headers=headers, replace_headers=True).data
|
|
||||||
|
|
||||||
coding_url = 'https://www.flashx.tv/flashx.php?fxfx=3'
|
coding_url = 'https://www.flashx.tv/flashx.php?fxfx=3'
|
||||||
headers['X-Requested-With'] = 'XMLHttpRequest'
|
headers['X-Requested-With'] = 'XMLHttpRequest'
|
||||||
@@ -94,7 +89,6 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
headers.pop('X-Requested-With')
|
headers.pop('X-Requested-With')
|
||||||
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
||||||
data = httptools.downloadpage('https://www.flashx.tv/dl?playthis', post, headers, replace_headers=True).data
|
data = httptools.downloadpage('https://www.flashx.tv/dl?playthis', post, headers, replace_headers=True).data
|
||||||
|
|
||||||
matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+</script>")
|
matches = scrapertools.find_multiple_matches(data, "(eval\(function\(p,a,c,k.*?)\s+</script>")
|
||||||
for match in matches:
|
for match in matches:
|
||||||
if match.startswith("eval"):
|
if match.startswith("eval"):
|
||||||
@@ -114,7 +108,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
|
|||||||
# Extrae la URL
|
# Extrae la URL
|
||||||
# {file:"http://f11-play.flashx.tv/luq4gfc7gxixexzw6v4lhz4xqslgqmqku7gxjf4bk43u4qvwzsadrjsozxoa/video1.mp4"}
|
# {file:"http://f11-play.flashx.tv/luq4gfc7gxixexzw6v4lhz4xqslgqmqku7gxjf4bk43u4qvwzsadrjsozxoa/video1.mp4"}
|
||||||
video_urls = []
|
video_urls = []
|
||||||
media_urls = scrapertools.find_multiple_matches(match, '\{file\:"([^"]+)",label:"([^"]+)"')
|
match = match.replace("\\","").replace('\"',"\'")
|
||||||
|
media_urls = scrapertools.find_multiple_matches(match, "{src:'([^']+)'.*?,label:'([^']+)'")
|
||||||
subtitle = ""
|
subtitle = ""
|
||||||
for media_url, label in media_urls:
|
for media_url, label in media_urls:
|
||||||
if media_url.endswith(".srt") and label == "Spanish":
|
if media_url.endswith(".srt") and label == "Spanish":
|
||||||
|
|||||||
Reference in New Issue
Block a user