From 5757dc946c8353fd1c33a7c0b2cbd0ca32a45f6d Mon Sep 17 00:00:00 2001 From: Sitoi <133397418@qq.com> Date: Fri, 9 Apr 2021 09:19:30 +0800 Subject: [PATCH] =?UTF-8?q?:hammer:=20=E6=9B=B4=E6=96=B0=20=E3=80=90Fa=20?= =?UTF-8?q?=E7=B1=B3=E5=AE=B6=E3=80=91=E7=89=88=E6=9C=AC=E8=BF=87=E4=BD=8E?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.template.json | 2 ++ docs/github-actions.md | 2 ++ docs/settings.md | 3 +++ fmapp/fmapp.py | 9 ++++++--- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/config/config.template.json b/config/config.template.json index a08939f..3c420e9 100644 --- a/config/config.template.json +++ b/config/config.template.json @@ -91,11 +91,13 @@ { "fmapp_token": "xxxxxx.xxxxxx-xxxxxx-xxxxxx.xxxxxx-xxxxxx", "fmapp_cookie": "sensorsdata2015jssdkcross=xxxxxx", + "fmapp_blackbox": "eyJlcnJxxxxxx", "fmapp_device_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx" }, { "fmapp_token": "多账号 token 填写,请参考上面,以实际获取为准", "fmapp_cookie": "多账号 cookie 填写,请参考上面,cookie 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", + "fmapp_blackbox": "多账号 blackbox 填写,请参考上面,blackbox 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", "fmapp_device_id": "多账号 device_id 填写,请参考上面,以实际获取为准" } ], diff --git a/docs/github-actions.md b/docs/github-actions.md index ab6a5b6..1e53c1d 100644 --- a/docs/github-actions.md +++ b/docs/github-actions.md @@ -138,11 +138,13 @@ CONFIG_JSON { "fmapp_token": "xxxxxx.xxxxxx-xxxxxx-xxxxxx.xxxxxx-xxxxxx", "fmapp_cookie": "sensorsdata2015jssdkcross=xxxxxx", + "fmapp_blackbox": "eyJlcnJxxxxxx", "fmapp_device_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx" }, { "fmapp_token": "多账号 token 填写,请参考上面,以实际获取为准", "fmapp_cookie": "多账号 cookie 填写,请参考上面,cookie 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", + "fmapp_blackbox": "多账号 blackbox 填写,请参考上面,blackbox 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", "fmapp_device_id": "多账号 device_id 填写,请参考上面,以实际获取为准" } ], diff --git a/docs/settings.md b/docs/settings.md index 63a1caf..ff02b67 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -66,6 +66,7 @@ |_**LIANTONG_ACCOUNT_LIST**_.data|联通营业厅|APP|联通营业厅 每日签到| |_**FMAPP_ACCOUNT_LIST**_.fmapp_token|Fa米家|APP|Fa米家 APP headers 中的 token| |_**FMAPP_ACCOUNT_LIST**_.fmapp_cookie|Fa米家|APP|Fa米家 APP headers 中的 cookie| +|_**FMAPP_ACCOUNT_LIST**_.fmapp_blackbox|Fa米家|APP|Fa米家 APP headers 中的 blackBox| |_**FMAPP_ACCOUNT_LIST**_.fmapp_device_id|Fa米家|APP|Fa米家 APP headers 中的 deviceId| |_**ACFUN_ACCOUNT_LIST**_.acfun_phone|[AcFun](https://www.acfun.cn/)|APP|AcFun 手机账号| |_**ACFUN_ACCOUNT_LIST**_.acfun_password|[AcFun](https://www.acfun.cn/)|APP|AcFun 账号密码| @@ -269,11 +270,13 @@ { "fmapp_token": "xxxxxx.xxxxxx-xxxxxx-xxxxxx.xxxxxx-xxxxxx", "fmapp_cookie": "sensorsdata2015jssdkcross=xxxxxx", + "fmapp_blackbox": "eyJlcnJxxxxxx", "fmapp_device_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxx" }, { "fmapp_token": "多账号 token 填写,请参考上面,以实际获取为准", "fmapp_cookie": "多账号 cookie 填写,请参考上面,cookie 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", + "fmapp_blackbox": "多账号 blackbox 填写,请参考上面,blackbox 以实际获取为准(遇到特殊字符如双引号\" 请加反斜杠转义)", "fmapp_device_id": "多账号 device_id 填写,请参考上面,以实际获取为准" } ], diff --git a/fmapp/fmapp.py b/fmapp/fmapp.py index 2b8f8b3..2b4800f 100644 --- a/fmapp/fmapp.py +++ b/fmapp/fmapp.py @@ -63,18 +63,21 @@ class FMAPPCheckIn: def main(self): fmapp_token = self.check_item.get("fmapp_token") fmapp_cookie = self.check_item.get("fmapp_cookie") + fmapp_blackbox = self.check_item.get("fmapp_blackbox") fmapp_device_id = self.check_item.get("fmapp_device_id") headers = { + "Accept": "*/*", + "Accept-Language": "zh-Hans;q=1.0", + "Accept-Encoding": "br;q=1.0, gzip;q=0.9, deflate;q=0.8", "Host": "fmapp.chinafamilymart.com.cn", "Content-Type": "application/json", - "Accept": "*/*", "loginChannel": "app", - "Accept-Language": "zh-Hans-CN;q=1.0, en-CN;q=0.9, ja-CN;q=0.8, zh-Hant-HK;q=0.7, io-Latn-CN;q=0.6", "token": fmapp_token, - "fmVersion": "2.0.0", + "fmVersion": "2.2.3", "deviceId": fmapp_device_id, "User-Agent": "Fa", "cookie": fmapp_cookie, + "blackBox": fmapp_blackbox, } sign_msg = self.sign(headers=headers) name_msg = self.user_info(headers=headers)