[iqilu]page vars changed

This commit is contained in:
MaxwellGoblin 2017-08-05 20:46:32 +08:00
parent 4d0803bafb
commit 6dd51760c1

View File

@ -3,14 +3,18 @@
__all__ = ['iqilu_download'] __all__ = ['iqilu_download']
from ..common import * from ..common import *
import json
def iqilu_download(url, output_dir = '.', merge = False, info_only = False, **kwargs): def iqilu_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):
'''''' ''''''
if re.match(r'http://v.iqilu.com/\w+', url): if re.match(r'http://v.iqilu.com/\w+', url):
patt = r'url\s*:\s*\[([^\]]+)\]'
#URL in webpage #URL in webpage
html = get_content(url) html = get_content(url)
url = match1(html, r"<input type='hidden' id='playerId' url='(.+)'") player_data = '[' + match1(html, patt) + ']'
urls = json.loads(player_data)
url = urls[0]['stream_url']
#grab title #grab title
title = match1(html, r'<meta name="description" content="(.*?)\"\W') title = match1(html, r'<meta name="description" content="(.*?)\"\W')