import curl_cffi
#
# url = 'https://d2ogs1k0ty8acr.cloudfront.net/sales?rank=24&category=Electronics&store=us'
# raw_headers = """
# authority:d2ogs1k0ty8acr.cloudfront.net
# method:GET
# path:/sales?rank=24&category=Electronics&store=us
# scheme:https
# Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
# Accept-Encoding:gzip, deflate, br, zstd
# Accept-Language:zh-CN,zh-TW;q=0.9,zh;q=0.8
# Cache-Control:no-cache
# Cookie:datadome=I2Xd7hJbOOYOWoCj9PbMVSNufWb42ywpgwdj7RI9kREb6k0v7aCy~kDSo__8k5lh7T3jth9fNBL7k5n3r9Yy8hV38dJOsAxfhobwa9UDqvLCJqXGIwf9Cqu6LCJHtXhd
# Pragma:no-cache
# Sec-Ch-Device-Memory:8
# Sec-Ch-Ua:"Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"
# Sec-Ch-Ua-Arch:"x86"
# Sec-Ch-Ua-Full-Version-List:"Not_A Brand";v="8.0.0.0", "Chromium";v="120.0.6099.216", "Google Chrome";v="120.0.6099.216"
# Sec-Ch-Ua-Mobile:?0
# Sec-Ch-Ua-Model:""
# Sec-Ch-Ua-Platform:"Windows"
# Sec-Fetch-Dest:document
# Sec-Fetch-Mode:navigate
# Sec-Fetch-Site:none
# Sec-Fetch-User:?1
# Upgrade-Insecure-Requests:1
# User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
# """
#
# # 转换为 dict
# headers = {
#            'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7',
#            'Accept-Encoding': 'gzip, deflate, br, zstd', 'Accept-Language': 'zh-CN,zh-TW;q=0.9,zh;q=0.8',
#            'Cache-Control': 'no-cache',
#            'Pragma': 'no-cache',
#            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'}
#
# # 打印结果
# print(headers)
# print(url)
# resp = curl_cffi.get(url, headers=headers, impersonate="chrome")
# print(resp.text)
# # url = 'http://192.168.0.113/login'
# # data = {'username':"pengyanbing","password":'15112376559'}
# # resp = requests.post(url,json=data)
# # print(resp.json())
#
# # url = 'http://192.168.2.28:5000/user/members/index'
# # headers={
# #     'inventory-token':"uPaMtIvnQmu5ZT3PvsKJQg"
# # }
# # resp = requests.get(url,headers=headers)
# # print(resp.json())
#
#
# # url = 'http://192.168.0.113'
# # headers = {
# #     'inventory-token': "-6XaaX9iQre-wF1F056OmQ"
# # }
# # resp = requests.get(url, headers=headers)
# # print(resp.text)
# # print(resp.status_code)
# # data = {'username':"pengyanbing","password":'15112376559'}
# # resp = requests.post(url,json=data)
# # print(resp.json())










import requests


headers = {
    "Referer":"https://www.sellersprite.com/v2/tools/sales-estimator",
    "Origin":"https://www.sellersprite.com",
    "Accept":"application/json, text/javascript, */*; q=0.01",
    "Accept-Encoding":"gzip, deflate, br, zstd",
    "Accept-Language":"zh-CN,zh-TW;q=0.9,zh;q=0.8",
    "Cache-Control":"no-cache",
    'Cookie':'ecookie=Q5geIEdVjaBAFtuN_CN; _ga=GA1.1.24257081.1704176282; MEIQIA_TRACK_ID=2BvHiTIbRbKCGdu4mZU9P4u1xzI; MEIQIA_VISIT_ID=2vOZXWYZ1ELMqt7Myhc0FyMlff2; 242a48f291ecd6f60332=d29147f2a3b4af73e978691a1045ab80; current_guest=bXPLbIar9Oez_250519-188489; Hm_lvt_e0dfc78949a2d7c553713cb5c573a486=1747649492,1747708080; HMACCOUNT=38079C97791291E4; _fp=65dbbe41a37f8f9fbe702eba96328267; _gcl_au=1.1.487208183.1744018086.1200924220.1747708256.1747708255; rank-guest-user=4585677471mscMIvqmsIKuDCd6Kk4qriCTUW/dsNaMOv1Wq60RTVlOh4JrbdHK8t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V8VCHwxg; ao_lo_to_n="4585677471mscMIvqmsIKuDCd6Kk4qrmyq1MPFtV4nWaYtgg8lvaAxNW0YMtfNTVxZ5ufIPleIBLuqMQPNii6zzLnEerwJ0yhaH8xWXO7wiSC3X5OM3Kc="; _gaf_fp=c4ea36bde61bd39fcc4758118ac26b47; _ga_38NCVF2XST=GS2.1.s1747708079$o13$g1$t1747708318$j50$l0$h1030740079; Hm_lpvt_e0dfc78949a2d7c553713cb5c573a486=1747708319; _ga_CN0F80S6GL=GS2.1.s1747708080$o21$g1$t1747708319$j0$l0$h0; JSESSIONID=9108499B42608BD47FEF2BEFFAA63B6C',
    "User-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
}

url = "https://www.sellersprite.com/v2/tools/sales-estimator/bsr.json"
data = {
    "station": "US",
    "cid": "2617941011",
    "bsr": "200"
}
response = curl_cffi.post(url, headers=headers,data=data,impersonate="chrome")

print(response.text)
print(response)