1. Fiddler is needed for APP package capture tutorial
If you don’t understand fiddler’s configuration, follow this tutorial step by step
2. Find the interface that returns user aweme_count and UID data
Enter the douyin user homepage that I follow, find the douyin id of the user and record it, which is Unique_id (unique_id is different from UID).
The user home page has the following data: As shown in the figure
Note: this page does not return the UID data we need, we need to search in the following way, in another page to capture the packet to obtain
Tiktok home click on the search icon
Enter the unique_ID value obtained from the user’s home page and click Search
Enter the page, switch to the user bar, the page will return the data and interface we need
Fiddler captures packets. This interface returns two parameters we need, aweme_count and user UID
Input is the unique_ID of the user’s home page, which is passed into the following method
Given the unique_id, we request the interface, extract the data we need aweme_count and UID, and print it successfully. This step ends
Verify =False: verify=False: verify=False: verify=False: verify=False: verify=False
3. Next, look for the video playing page interface
When the mobile phone switches to the user’s home page, the interface we need to capture packets will appear. Because the user’s home page has videos, the natural interface is in this interface
Packet capture, successfully capture the share_URL interface as shown in the figure below, which requires us to pass two parameters, namely aweme_count and UID obtained in the previous step
Note: Share_URL is not the actual interface for downloading the video. We need to further extract the data returned by share_URL to find the real video interface
But the interface was found to be inconvenient to use in some tests. After checking some materials on the Internet, I found that the old interface before Douyin needed to be used, as shown in the code
The resulting video_urls is a fake video interface that needs to be extracted further
I passed the video_urls to the method to download the video, and in the middle I called the get_download_url method to further extract the actual video interface
Extract the real video interface, request the fake interface through GET, and extract the real video interface through the regular match in the big pile of response returned
Here is a simple screenshot of the difference between the two video interfaces. This picture is a fake video interface. There is a video, but it is not real
The following is our real video interface, the entire page has only one video, directly download video data
My experience is limited, the inadequacy of welcome correction