How to download Kuaishou videos in python
First of all, open fiddler. Fiddler is an http/https packet capture artifact, so I won’t introduce it here.
Configure to allow https
Configure to allow remote connections, that is, open the http proxy
Computer ip : 192.168.1.110
Then make sure that the mobile phone and computer are in a local area network and can communicate. Since I don't have an Android phone here, I used an Android emulator instead, and the effect is the same.
Open the mobile browser and enter 192.168.1.110:8888, which is the set proxy address. Only after installing the certificate can you capture packets
After installing the certificate, WiFi settings modify the network and manually specify the http proxy
After saving, fiddler can capture the app data. Open Kuaishou to refresh and you can see that there are many http requests. Come in, the general interface address and the like are very obvious. You can see that it is a json type
http post request. The return data is json. After expansion, it is found that there are 20 in total. For the video information, first make sure it is correct and look for a video link.
Then open postman to test, if submitted in form-data mode, an error will be reported
Change to raw
The error message is different, try adding headers
Return data successfully, try a few more times, and find that every time The returned results are different.
Let’s start the code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
Test
Multi-threaded download downloads about 2000 videos each time, and downloads to D by default: \Kuaishou
Related recommendations: "Python Video Tutorial"
The above is the detailed content of How to download Kuaishou videos in python. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





Solution to permission issues when viewing Python version in Linux terminal When you try to view Python version in Linux terminal, enter python...

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

When using Python's pandas library, how to copy whole columns between two DataFrames with different structures is a common problem. Suppose we have two Dats...

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...

How does Uvicorn continuously listen for HTTP requests? Uvicorn is a lightweight web server based on ASGI. One of its core functions is to listen for HTTP requests and proceed...

In Python, how to dynamically create an object through a string and call its methods? This is a common programming requirement, especially if it needs to be configured or run...

Using python in Linux terminal...

Fastapi ...
