from typing import Dict
import time
import requests


def stock_js_weibo_nlp_time() -> Dict:
    """
    https://datacenter.jin10.com/market
    :return: 特定时间表示的字典
    :rtype: dict
    """
    url = "https://datacenter-api.jin10.com/weibo/config"
    payload = {"_": int(time.time() * 1000)}
    headers = {
        "authority": "datacenter-api.jin10.com",
        "pragma": "no-cache",
        "cache-control": "no-cache",
        "accept": "*/*",
        "x-app-id": "rU6QIu7JHe2gOUeR",
        "sec-fetch-dest": "empty",
        "x-csrf-token": "",
        "x-version": "1.0.0",
        "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.116 Safari/537.36",
        "origin": "https://datacenter.jin10.com",
        "sec-fetch-site": "same-site",
        "sec-fetch-mode": "cors",
        "referer": "https://datacenter.jin10.com/market",
        "accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
    }

    r = requests.get(url, headers=headers, data=payload)
    return r.json()["data"]["timescale"]