抖yin的X-gorgon算法

最近由于公司的需求人员提出要抓取抖音的相关数据,如热门主播、粉丝数、搜索数据等,因此不得不开始探索抖音APP,觉得自己掉坑了,但实话实说抖音在安全这方面做得真是好,自己与同事一起花费了九牛二虎之力,才慢慢理出抖音的X-gorgon算法。分享给大家,不要用于商用哦。

这个算法在国外有人出价美金1500,换成人民币也接近一万了吧。
x-gorgon抖音算法在国外的报价

下面是python版本的X-Gorgon算法API:


import requests

url = "https://tiktok-x-gorgon-generation.p.rapidapi.com/sign-url"

querystring = {"url_encoded":"aHR0cHM6Ly9hcGkxOS1ub3JtYWwtYy1hbGlzZy50aWt0b2t2LmNvbS9hd2VtZS92MS91c2VyL2ZvbGxvd2luZy9saXN0Lz91c2VyX2lkPTY4ODc1Njk2NjgxMzI2ODUzMTcmc2VjX3VzZXJfaWQ9TVM0d0xqQUJBQUFBd1FmUjJWOXhuT3hsdnZneUlCU1kxUVI2cjNLdl9pQUFzY0NHS1F3T0FUakY5WEVFbV8tTE9uRlJtRzVSeFRQdCZzdG9yYWdlX3R5cGU9MSZpaWQ9Njg3MjczOTI4MjY1NTkyMTkyNiZjaGFubmVsPWJldGEmZGV2aWNlX3R5cGU9R29vZ2xlK1BpeGVsJnRpbWV6b25lX25hbWU9QW1lcmljYSUyRk5ld19Zb3JrJmRwaT00MjAmcmVzaWRlbmNlPVVTJmNhcnJpZXJfcmVnaW9uPVVTJm9zX3ZlcnNpb249OC4xLjAmdmVyc2lvbl9jb2RlPTE3MDQyMCZhcHBfbmFtZT1tdXNpY2FsX2x5JmRldmljZV9wbGF0Zm9ybT1hbmRyb2lkJmJ1aWxkX251bWJlcj0xNy40LjIwJmFpZD0xMjMz"}

headers = {
    'x-rapidapi-host': "tiktok-x-gorgon-generation.p.rapidapi.com",
    'x-rapidapi-key': "6d2db268ebmsh6e320e1ec3fdfc7p124420jsnb6f5f9bb8184"
    }

response = requests.request("GET", url, headers=headers, params=querystring)

print(response.text)
{
    "url":"https://api19-normal-c-alisg.tiktokv.com/aweme/v1/user/following/list/?user_id=6887569668132685317&sec_user_id=MS4wLjABAAAAwQfR2V9xnOxlvvgyIBSY1QR6r3Kv_iAAscCGKQwOATjF9XEEm_-LOnFRmG5RxTPt&storage_type=1&iid=6872739282655921926&channel=beta&device_type=Google+Pixel&timezone_name=America%2FNew_York&dpi=420&residence=US&carrier_region=US&os_version=8.1.0&version_code=170420&app_name=musical_ly&device_platform=android&build_number=17.4.20&aid=1233",
    "x-khronos":"1604053863",
    "x-gorgon":"0404a06b40112ab9add6e82abbd4118fe2a215b137b09e6029b2",
    "user-agent":"okhttp/3.10.0.1"
}

 

你可能感兴趣的:(Android逆向,python)