# yt-dlp视频下载

yt-dlp是一个基于python的视频下载工具，需要先安装ffmpeg。

安装：

```
pip install yt-dlp
```

下载视频：

```
yt-dlp --skip-unavailable-fragments --no-check-certificate --sleep-interval 3 --no-part --no-cache-dir --geo-bypass --no-playlist --no-call-home --hls-prefer-native --hls-use-mpegts --user-agent "Mozilla/5.0 (iPad; CPU OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MQBHD/6.9.1 Safari/537.22" --fixup detect_or_warn' "https://xxxxxxx.com"
# 设置ua，禁止缓存，忽略证书等等，参数比较多，更具需要设置即可。
```

yt-dlp可以使用youtube-dl的下载参数，可以参考：

[youtube-dl视频下载参数](https://bbs.zsxwz.com/thread-2732.htm)

小tips：可以使用alias设置别名，这样就不用没一次都输入一长串的参数了：

```
alias you='youtube-dl --skip-unavailable-fragments --no-check-certificate --sleep-interval 3 --no-part --no-cache-dir --geo-bypass --no-playlist --no-call-home --hls-prefer-native --hls-use-mpegts --user-agent "Mozilla/5.0 (iPad; CPU OS 13_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MQBHD/6.9.1 Safari/537.22" --fixup detect_or_warn'
# 可以添加到.bashrc或者.zshrc
```

you-get与youtube-dl类似，可以参考：

[you-get下载视频](https://bbs.zsxwz.com/thread-711.htm)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://termux-wiki.zsxwz.com/qi-ta-yi-xie-ming-ling-xing-gong-ju/python.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
