# Source: https://github.com/imoki/sign_script/blob/main/polymerization/ql_only_mi.py
# Raw: https://raw.githubusercontent.com/imoki/sign_script/main/polymerization/ql_only_mi.py
# Repo: imoki/sign_script
# Path: polymerization/ql_only_mi.py
# UploadedAt: 2025-08-25T21:29:14+08:00
# SHA256: dc606d90cb26ba29201ee384a3989fb2cf397a1a20262a6c8cb56e777836fe48
# Category: web版/抓包
# Evidence: web/H5关键词 + cookie/token/header

"""
name : 小米商城
cron : 1 9 * * *
脚本兼容 : 青龙
更新时间 : 20250825
环境变量名：mi
环境变量值：cookie
备注：抓小米商城app的包。若提示“已刷新最新任务”或“未查询到对应任务”，请将任务列表响应体提交到 https://github.com/imoki/mi/ 仓库的issues中。
    抓包及提交方式：抓取小米商城app的 https://shop-api.retail.mi.com/mtop/navi/venue/batch 包的响应体，将响应体全部发送到issues中。
    如何判断提交的响应体格式是否正确：响应中含有doneInSingleAward则说明是正确的。

在github中发送issues:
1. 进入到 “https://github.com/imoki/mi/” 这个仓库的issues中
2. 提交issues。
    - 标题格式如下：（标题格式：当天抓包时间+任务列表响应）
        20241117任务列表响应
    - 内容格式如下：（确保内容中含有doneInSingleAward。内容为json字符串即可，无需写其它多余文字）
        {"traceId":"","code":0,"attachments":{"timestamp":""},"data":{"result_list":[{"amountTotal":760,"jumpUrl":"","tipList":["完成每日签到赚米金","积攒米金兑超级好物"],"waitArrival":0,"waitReceiveList":[],"waitReceiveTotal":0},{"components":[{"actId":"6706c0695404a23dfb5b2cab","taskId":"6706c0695243011f230d465d","taskName":"米金签到","taskDesc":"","taskType":200,"finishedNumber":0},{"actId":"6706c0695404a23dfb5b2cab","taskId":"6706edf30344c966c5b46681","taskName":"来会员中心 领专属好券","taskDesc":"浏览10秒+10米金","taskType":200,"finishedNumber":0},{"actId":"6706c0695404a23dfb5b2cab","taskId":"670f6baf1d65ee598c4fc39d","taskName":"新客专享福利","taskDesc":"浏览10秒+10米金","taskType":200,"finishedNumber":0},{"actId":"6706c0695404a23dfb5b2cab","taskId":"670fa2ba57e9a97a89265b63","taskName":"逛手机频道 选心动手机","taskDesc":"浏览10秒+10米金","taskType":200,"finishedNumber":0},{"actId":"6706c0695404a23dfb5b2cab","taskId":"6720abdc4015d32aaaa400bc","taskName":"Xiaomi 15系列 新品手机","taskDesc":"浏览10秒+10米金","taskType":200,"finishedNumber":0}]},{"components":[{"actId":"","taskId":"","taskName":"米金抽奖","taskDesc":"","taskType":128,"finishedNumber":0,"totalNumber":20,"startTime":1720000000000,"endTime":1730000000000,"status":2,"scores":0,"singleCostScores":30,"costType":2,"cycleTime":0,"taskRefreshWay":0,"upperLimit":20,"canDo":true}]}]},"message":"ok"}

"""

import lzma, base64
exec(lzma.decompress(base64.b64decode('[encoded data, 5848 characters]')))