Youtube-dl WebUI 作者: Hogwarts 发布于: 2023-04-25 更新于: 2023-09-14 分类: 默认分类  yt-dlp是基于现已停用的youtube-dlc 的youtube-dl分支。该项目的主要重点是添加新功能和补丁,同时与原始项目保持同步。 Github:`https://github.com/yt-dlp/yt-dlp` #一、Youtube-dl-WebUI Github:`https://github.com/timendum/Youtube-dl-WebUI` 特点:WEB端有密码控制,私密性强,能够在web端删除已下载到VPS的文件,以免撑爆VPS硬盘。 需WEB环境,PHP7.4以上。 ##1.1 安装 Youtube-dl-WebUI cd /var/www git clone https://github.com/timendum/Youtube-dl-WebUI.git cp config/config.php.TEMPLATE config/config.php chown -R www-data:www-data /var/www/downloads ##1.2 安装 yt-dlp wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.03.04/yt-dlp.tar.gz tar -zxvf yt-dlp.tar.gz mv yt-dlp /usr/local/bin/ #可自定义路径 ##1.3 设置配置文件 config.php ###1.3.1 生成密码 echo -n yourpassword | md5sum | sed 's/ .*//' # Returns the hash acbd18db4cc2f85cedef654fccc4a4d9 将显示的hash值复制备用 ###1.3.2 设置 config.php vim /var/www/Youtube-dl-WebUI/config/config.php 将"password" => "acbd18db4cc2f85cedef654fccc4a4d9",中的值修改为1.3.1中的yourpassword的md5值 将"bin" => "/usr/local/bin/yt-dlp/yt-dlp",路径改为/usr/local/bin/yt-dlp/yt-dlp #需与安装路径一致 ##1.4 Nginx反代 root /var/www/Youtube-dl-WebUI; index index.php index.html; location ~ \.php$ { fastcgi_intercept_errors on; fastcgi_pass unix:/run/php/php8.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; include fastcgi_params; } #二、metube Github:`https://github.com/alexta69/metube` ##2.1 运行命令 docker run -d -p 127.0.0.1:8081:8081 -v /path/to/downloads:/downloads ghcr.io/alexta69/metube 特点:浏览器扩展性较强,不能在web端删除文件,有可能使VPS硬盘塞满。可执行定期自动删除命令解决。 ##2.2 编辑 clean.sh #!/bin/bash rm -rf /path/to/downloads/* 可用 `crontab -e` 命令添加定期执行 `crontab -l` #查看 ###For Debian vim /etc/crontab * 1 * * * root bash /root/clean.sh ##2.3 Nginx 反代 location / { proxy_pass http://127.0.0.1:8081; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; } ##2.4 保持最新 docker run -d --name watchtower --restart unless-stopped -p 127.0.0.1:8080:8080 -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -c --schedule "0 0 2 * * *" #三、alltube Github:`https://github.com/Rudloff/alltube` 安装参考:`https://winamp.top/337.html` 已存档。 #四、youtube-dl-web Github:`https://github.com/xxcodianxx/youtube-dl-web` 看介绍还不错,搞不定。 root@debian:/data/www/youtube-dl-web/frontend# bash ./build.sh yarn install v1.22.19 [1/4] Resolving packages... [2/4] Fetching packages... warning Pattern ["@types/react@latest"] is trying to unpack in the same destination "/home/node/.cache/yarn/v6/npm-@types-react-17.0.38-f24249fefd89357d5fa71f739a686b8d7c7202bd-integrity/node_modules/@types/react" as pattern ["@types/react@*","@types/react@*","@types/react@*"]. This could result in non-deterministic behavior, skipping. info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... error Could not write file "/mnt/yarn-error.log": "EACCES: permission denied, open '/mnt/yarn-error.log'" error An unexpected error occurred: "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.3.1.tgz: ESOCKETTIMEDOUT". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. yarn run v1.22.19 $ react-scripts build /bin/sh: 1: react-scripts: not found error Command failed with exit code 127. 标签: youtube, youtube-dl, alltube, yt-dlp, Youtube-dl-WebUI, dlp, metube