For windows user:
- go to NodeJS offcial website, download the latest version, install it
- open the powershell or execute
cmd.exe
- navigate to project folder
- Install npm packages:
# if yarn has installed yarn # or npm
- login to https://i.mi.com
- open the browser developer tool by pressing
F12
- go to Application tab, choose Cookies in left sidebar, expand it and choose the only item in it. Notice that a table appears on the right column
- create a txt file in project folder, rename it to cookie.txt. The first line of the content goes for
userId
value, while the second line should beserviceToken
value - save the txt file
You may specify the custom cookie file by passing the additional argument to
node index.js
-
navigate to project folder
-
type:
node index.js
-
wait for completion
-
if everything goes well, the content of
output.json
file in your folder should be all you want, or it's empty due to the error, feel free to overwrite it in the next run
If any issue occurs, please let me know it.
- add cross platform support
- if
output.json
is empty, skip the question step - check sequence of token and id parameters
- flexible output format and structure