tiktok-dl
tiktok-dl copied to clipboard
Implement device registration
That would make it a lot easier.
I haven't looked into it, but there should be some API with which you can register your device and get iid
automatically.
Like in app you can use username/password.
I would, if I had the time to do so. Unfortunately I don't. Everyone is welcome to contribute to this project.
hello, i have tried your script, but it is not working, i got my device id and my iid, but it still not working
I think it's not working now as there's this extra content headers "x-gorgon x-khronos" which are dynamically generated . I think Tik Tok has updated their security .
@dvingerh I'd like to have your thoughts on it .
Tiktok's api is really finicky, sometimes the script will work sometimes it wont. This script used to work pretty well without much issues but it has recently started to have trouble grabbing the info yeah.
But i did just test it with my iid and device id and while it struggled to get a proper response eventually after a few retries it did get the user info and video information to download. So i wouldn't say it's a completely dead script but there are definitely better solutions floating around github which I would suggest to use instead
@dvingerh Thank you so much for taking out the time to reply .
Would it be too much to ask If I could know what changes you did to get the results . It may help me as well . Yes there are other solutions as well , but this one perfectly suits my needs .
When I run the script to get the user by username , the user_list array in the json response is empty and it's always empty , no matter what i search it with . So after researching it a bit on different forums , I thought it is because of the extra anti spam parameters Tiktok api has added namely x-gorgon x-khronos .
But as you said , you got it working , so that means it has nothing to do with the anti spam parameters . I'd like to know how you got it working . Thanks .
I'd like to know how you got it working
I have only entered my device id and iid. No other steps were taken and no changes were made to code
But more often than not it doesn't work and i get one of the two results:
- JSON response is received but only has
{"status_code":0,"status_msg":"","block_code":2018}
- No JSON is returned whatsoever (empty response)
I'm going to assume this is because not all required parameters and such are being sent which results in the tiktok servers rejecting the request in some way but why it doesn't reject every single request remains elusive to me.
yes, u r correct.I have tried to scrap my phone by chareless, and saw all the tiktok request to their servers and understood one thing. This is because of the headers XGorgon and XXronos. I have tried to make request to a specific video without xgorgon, i got empty response, but when i added headers XGorgon and XXronos the script worked. So i think the problem is this. I've tried to find, how they are generating it, because each video has a unique xgorgon, so u cant use XGorgon of one video with another video.
@kamronbek29 Please let us know , if you find something .
I can generate x-gorgon,works for video list,but got empty response with user info
@tmxd09887 hello. Could u share With us the script to generate xgorgon, please?
For anyone still interested check out this repository