snowball.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:Xueqiu 作者: OliangchenO 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号