👷 Fix action download apk

This commit is contained in:
xtaodada 2024-03-12 22:28:14 +08:00
parent f0a7e14db5
commit 716d1f3eee
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
2 changed files with 8 additions and 1 deletions

View File

@ -30,7 +30,8 @@ jobs:
- name: Download apk - name: Download apk
run: | run: |
cd compiler/ds cd compiler/ds
curl -H 'x-rpc-client_type: 2' -H 'x-rpc-app_version: 2.37.1' -H 'x-rpc-channel: miyousheluodi' https://api-takumi.mihoyo.com/ptolemaios/api/getLatestRelease | jq --raw-output '.data.package_url' | xargs curl -o mihoyobbs.apk chmod +x download.sh
./download.sh
- name: Parse apk - name: Parse apk
run: | run: |
cd compiler/ds cd compiler/ds

6
compiler/ds/download.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# shellcheck disable=SC2154
jsonData="$(curl -X GET "https://api-takumi.miyoushe.com/ptolemaios_api/api/getLatestRelease" -H "x-rpc-client_type: 2" -H "x-rpc-app_version: 2.67.1" -H "x-rpc-channel: miyousheluodi" -H "x-rpc-h265_supported: 1" -H "referer: https://app.mihoyo.com" -H "x-rpc-verify_key: bll8iq97cem8" -H "x-rpc-csm_source: " -H "user-agent: okhttp/4.9.3")"
url="$(echo "$jsonData" | jq --raw-output '.data.package_url')"
curl -o mihoyobbs.apk "$url"