2015-09-10 21:43:39 +03:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
__all__ = ['iqilu_download']
|
|
|
|
|
|
|
|
from ..common import *
|
2017-08-05 15:46:32 +03:00
|
|
|
import json
|
2015-09-10 21:43:39 +03:00
|
|
|
|
2015-09-26 08:45:39 +03:00
|
|
|
def iqilu_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):
|
2015-09-10 21:43:39 +03:00
|
|
|
''''''
|
|
|
|
if re.match(r'http://v.iqilu.com/\w+', url):
|
2017-08-05 15:46:32 +03:00
|
|
|
patt = r'url\s*:\s*\[([^\]]+)\]'
|
2015-09-10 21:43:39 +03:00
|
|
|
|
|
|
|
#URL in webpage
|
|
|
|
html = get_content(url)
|
2017-08-05 15:46:32 +03:00
|
|
|
player_data = '[' + match1(html, patt) + ']'
|
|
|
|
urls = json.loads(player_data)
|
|
|
|
url = urls[0]['stream_url']
|
2015-09-10 21:43:39 +03:00
|
|
|
|
|
|
|
#grab title
|
|
|
|
title = match1(html, r'<meta name="description" content="(.*?)\"\W')
|
|
|
|
|
|
|
|
type_, ext, size = url_info(url)
|
|
|
|
print_info(site_info, title, type_, size)
|
|
|
|
if not info_only:
|
|
|
|
download_urls([url], title, ext, total_size=None, output_dir=output_dir, merge=merge)
|
|
|
|
|
|
|
|
|
|
|
|
site_info = "iQilu"
|
|
|
|
download = iqilu_download
|
2015-09-26 08:45:39 +03:00
|
|
|
download_playlist = playlist_not_supported('iqilu')
|