Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Support downloading watchfaces #38

Open
dpeddi opened this issue Sep 19, 2021 · 0 comments
Open

Support downloading watchfaces #38

dpeddi opened this issue Sep 19, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dpeddi
Copy link

dpeddi commented Sep 19, 2021

Some time ago i wrote something similar to your program to download watchface :

To download list of wf for chaohu(bip):
"/discovery/cards/chaohu_watch_skins"
To download list of wf for tempo(cor):
"/discovery/cards/tempo_watch_skins"

headers = {
<-->SafeString("accept"): "application/x.Huami.v1+json; districts={{}};",
<-->SafeString("authorization"):     "Bearer ****************
<-->SafeString("accept-language"):   "en",
<-->SafeString("user-agent"):        "Mozilla/5.0 (Linux; Android 9; GT-I9505 Build/PQ3A.190801.002;
<-->SafeString("range"):             "max=10000",
<-->SafeString("sec-fetch-mode"):    "cors",
<-->SafeString("origin"):            "https://fe-cdn.huami.com",
<-->SafeString("x-requested-with"):  "com.huami.watch.hmwatchmanager",
<-->SafeString("sec-fetch-site"):    "same-site",
<-->SafeString("referer"):           "https://fe-cdn.huami.com/watch-skins/2.0.8/index.html",
<-->SafeString("accept-encoding"):   "identity",
}
params = {
#SafeString("category"):     "tempo_watch_skins",
<-->SafeString("category"):     "chaohu_watch_skins",
<-->SafeString("user_country"): "us",
<-->SafeString("pageSize"):     "20",
<-->SafeString("districts"): "",
    "v": "%d" % (time.time() * 1000),
}

for more recent watches the api was:
/market/watch/apps/1

with these headers/params

language ="en_US"
>h = {
><-->SafeString("channel"): "Normal",
><-->SafeString("country"): country,
><-->SafeString("cv"): self.cv,
><-->SafeString("lang"): language,
><-->
>}
>p = {
     "Channel": "Normal",
     SafeString("country"): country,
     SafeString("cv"): self.cv,
     SafeString("lang"): language,
     "user_region":  "4",
     "customizable": "disable",
      "per_page":     "36",
     "per_page":     "200",
     "page":         "1",
     "device":       deviceid
}

Feel free to add into you tool
Regards

@argrento argrento added the enhancement New feature or request label Dec 5, 2021
@argrento argrento self-assigned this Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants