Crawler Basics: Python realizes crawling a melon video without watermark (with complete code, super detailed)

I. Introduction

Crawlers are really embarrassing. If you write a little article, analyze the website, etc., you won’t give it. Copyright issues, hey, I will go crazy on the edge. Be sure to write in detail so that I can understand it at a glance. Finally, thank you all.

2. Climb a melon video without watermark

1. Analyzing the website

If you have read the blog I wrote about crawling a certain station, you can actually find the information you want in one click.
Open the developer tools, press Ctrl+f to open the search box and enter _SSR_HYDRATED_DATA, what comes out is what we want.

When we searched mian_url again, we found that its value is letters plus numbers, which is not the url address we want. What does this mean? It means the address is encrypted!

If you see this kind of encryption of uppercase and lowercase letters plus numbers, you can consider using base64 to try it, and
this can be decoded with base64. The video and audio of a melon video are separated, so ffmpeg is still needed to merge the video and audio.

First of all, we crawl the video and audio, then save them, and finally merge them. Let's implement some together.

2. Complete code

Guess you like

Origin blog.csdn.net/qq_65898266/article/details/124780534