YouTube Import: Difference between revisions
Appearance
Added page skeleton for YouTube Import Bazaar package |
|||
| Line 13: | Line 13: | ||
== Useful Scripts == | == Useful Scripts == | ||
=== YT-DLP Install script === | |||
create the below scripts to be ran as the root user. Both are required to get yt-dlp working. | |||
This installs yt-dlp. create it at <code>/root/install_yt-dlp.sh</code> | |||
#!/bin/bash | |||
cd /opt/ | |||
git clone https://github.com/yt-dlp/yt-dlp.git | |||
dnf install python3.11 python3.11-pip pandoc -y | |||
/root/update_yt-dlp.sh $1 | |||
This updates yt-dlp. create it at <code>/root/update_yt-dlp.sh</code> | |||
#!/bin/bash | |||
cd /opt/yt-dlp | |||
git checkout Makefile supportedsites.md | |||
make clean | |||
git fetch | |||
git checkout $1 | |||
cat Makefile | sed "s/python3$/python3.11/g" > Makefile.new | |||
mv Makefile.new Makefile | |||
make | |||
if [[ ! -e /usr/local/sbin/deno && -e /home/eprints/.deno/bin/deno ]]; then | |||
cd /usr/local/sbin/ | |||
ln -s /home/eprints/.deno/bin/deno | |||
fi | |||
=== External javascript libraries install script === | |||
YT-DLP now requires some external javascript libraries to run. These must be ran as the EPrints user. | |||
This installs the yt-dlp external javascript libraries. create it at <code>/home/eprints/install_yt-dlp-ejs.sh</code>: | |||
#!/bin/bash | |||
curl -fsSL https://deno.land/install.sh | sh | |||
mkdir ~/yt-dlp-ejs | |||
cd ~/yt-dlp-ejs | |||
git clone https://github.com/yt-dlp/ejs.git . | |||
git checkout $1 | |||
source ~/.bashrc | |||
deno install --frozen | |||
deno run --allow-read --allow-write --allow-net src/yt/solver/test/download.ts | |||
This updates the yt-dlp external javascript libraries. create it at <code>/home/eprints/update_yt-dlp-ejs.sh</code>: | |||
#!/bin/bash | |||
cd ~/yt-dlp-ejs | |||
git fetch | |||
git checkout $1 | |||
source ~/.bashrc | |||
deno install --frozen | |||
deno run --allow-read --allow-write --allow-net src/yt/solver/test/download.ts | |||
As the eprints user, run <code>/home/eprints/install_yt-dlp-ejs.sh</code> as the eprints with the parameter "0.8.0", this may increment in the future. | |||
As root, run <code>/root/install_yt-dlp.sh</code> with the parameter "2026.03.17" | |||
Revision as of 15:38, 15 May 2026
Overview
Installing Dependencies
Python 3.11+
Deno
yt-dlp-ejs
yt-dlp
Useful Scripts
YT-DLP Install script
create the below scripts to be ran as the root user. Both are required to get yt-dlp working.
This installs yt-dlp. create it at /root/install_yt-dlp.sh
#!/bin/bash cd /opt/ git clone https://github.com/yt-dlp/yt-dlp.git dnf install python3.11 python3.11-pip pandoc -y /root/update_yt-dlp.sh $1
This updates yt-dlp. create it at /root/update_yt-dlp.sh
#!/bin/bash cd /opt/yt-dlp git checkout Makefile supportedsites.md make clean git fetch git checkout $1 cat Makefile | sed "s/python3$/python3.11/g" > Makefile.new mv Makefile.new Makefile make if ! -e /usr/local/sbin/deno && -e /home/eprints/.deno/bin/deno ; then cd /usr/local/sbin/ ln -s /home/eprints/.deno/bin/deno fi
External javascript libraries install script
YT-DLP now requires some external javascript libraries to run. These must be ran as the EPrints user.
This installs the yt-dlp external javascript libraries. create it at /home/eprints/install_yt-dlp-ejs.sh:
#!/bin/bash curl -fsSL https://deno.land/install.sh | sh mkdir ~/yt-dlp-ejs cd ~/yt-dlp-ejs git clone https://github.com/yt-dlp/ejs.git . git checkout $1 source ~/.bashrc deno install --frozen deno run --allow-read --allow-write --allow-net src/yt/solver/test/download.ts
This updates the yt-dlp external javascript libraries. create it at /home/eprints/update_yt-dlp-ejs.sh:
#!/bin/bash cd ~/yt-dlp-ejs git fetch git checkout $1 source ~/.bashrc deno install --frozen deno run --allow-read --allow-write --allow-net src/yt/solver/test/download.ts
As the eprints user, run /home/eprints/install_yt-dlp-ejs.sh as the eprints with the parameter "0.8.0", this may increment in the future.
As root, run /root/install_yt-dlp.sh with the parameter "2026.03.17"