def get_xueqiu_cube_list(category,count,orderby):
url=cube_list_url+"?category="+category+"&count="+count+"&market=cn&profit="+orderby
data = request(url,cookie)
jsonObj = json.loads(data.read())
db = TinyDB('data/db_cube.json')
table = db.table("Cube")
db.purge_table("Cube")
for TopestCube in jsonObj["list"]:
table.insert(TopestCube)
# for TopestCube in jsonObj["list"]:
# id = TopestCube["id"]
# name = TopestCube["name"]
# symbol = TopestCube["symbol"]
# daily_gain = TopestCube["daily_gain"]
# monthly_gain = TopestCube["monthly_gain"]
# annualized_gain_rate = TopestCube["annualized_gain_rate"]
# total_gain = TopestCube["total_gain"]
# print(jsonObj)
评论列表
文章目录