Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# keys above are relative to cookies
'tvid': tvid,
'bid': bid,
'vid': vid,
'src': '01010031010000000000',
'vt': 0,
'rs': 1,
'ori': 'pcw',
'ps': 1,
'pt': 0,
'd': 0,
's': '',
'lid': '',
'cf': '',
'ct': '',
'authKey': cmd5x('{}{}{}'.format(cmd5x(''), tm, tvid)),
'k_tag': 1,
'ost': 0,
'ppt': 0,
'locale': 'zh_cn',
'prio': '{"ff":"f4v","code":2}',
'k_err_retries': 0,
'up': '',
'qd_v': 2,
'tm': tm,
'qdy': 'a',
'qds': 0,
'ut': 0, # 600 bid isn't available
# relative to encode
#'k_ft1': ,
#'k_ft4': ,
#'k_ft5': ,
'locale': 'zh_cn',
'prio': '{"ff":"f4v","code":2}',
'k_err_retries': 0,
'up': '',
'qd_v': 2,
'tm': tm,
'qdy': 'a',
'qds': 0,
'ut': 0, # 600 bid isn't available
# relative to encode
#'k_ft1': ,
#'k_ft4': ,
#'k_ft5': ,
}
src = '/dash?{}'.format(urlencode(params))
vf = cmd5x(src)
req_url = '{}{}&vf={}'.format(host, src, vf)
html = get_content(req_url)
return json.loads(html)