<commit_before>#!/usr/bin/env python

__all__ = ['iqilu_download']

from ..common import *

def iqilu_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):
    ''''''
    if re.match(r'http://v.iqilu.com/\w+', url):
        
        #URL in webpage
        html = get_content(url)
        url = match1(html, r"<input type='hidden' id='playerId' url='(.+)'")
        
        #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
download_playlist = playlist_not_supported('iqilu')
<commit_msg>[iqilu]page vars changed<commit_after>#!/usr/bin/env python

__all__ = ['iqilu_download']

from ..common import *
import json

def iqilu_download(url, output_dir = '.', merge = False, info_only = False, **kwargs):
    ''''''
    if re.match(r'http://v.iqilu.com/\w+', url):
        patt = r'url\s*:\s*\[([^\]]+)\]'
        
        #URL in webpage
        html = get_content(url)
        player_data = '[' + match1(html, patt) + ']'
        urls = json.loads(player_data)
        url = urls[0]['stream_url']
        
        #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
download_playlist = playlist_not_supported('iqilu')

{'fraction_non_alphanumeric': 0.16217765042979942, 'fraction_numerical': 0.0028653295128939827, 'mean_word_length': 2.9681818181818183, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4646356', 'n_tokens_mistral': 625, 'n_tokens_neox': 618, 'n_words': 125}