flashx: Actualizado get_video_url

Actualizado get_video_url
This commit is contained in:
Intel1
2017-08-01 11:39:23 -05:00
committed by GitHub
parent 82d3653c78
commit 9bd860cecf

View File

@@ -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="([^"]+)"')
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' % (
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+)")
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['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)
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'
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['Content-Type'] = 'application/x-www-form-urlencoded'
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>")
for match in matches:
if match.startswith("eval"):
@@ -114,7 +108,8 @@ def get_video_url(page_url, premium=False, user="", password="", video_password=
# Extrae la URL
# {file:"http://f11-play.flashx.tv/luq4gfc7gxixexzw6v4lhz4xqslgqmqku7gxjf4bk43u4qvwzsadrjsozxoa/video1.mp4"}
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 = ""
for media_url, label in media_urls:
if media_url.endswith(".srt") and label == "Spanish":