mirror of https://github.com/preservetube/auto.git
docker and ytdlp fuckery
This commit is contained in:
parent
278325fb44
commit
44832e36ee
|
@ -8,7 +8,7 @@ WORKDIR /usr/src/preservetube/auto
|
||||||
COPY . /usr/src/preservetube/auto
|
COPY . /usr/src/preservetube/auto
|
||||||
RUN yarn
|
RUN yarn
|
||||||
|
|
||||||
RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp -q
|
RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.09.24/yt-dlp -q
|
||||||
RUN chmod +x yt-dlp
|
RUN chmod +x yt-dlp
|
||||||
|
|
||||||
CMD ["node", "index.js"]
|
CMD ["node", "index.js"]
|
|
@ -3,7 +3,8 @@ const logger = require('./logger.js')
|
||||||
|
|
||||||
async function downloadVideo(url) {
|
async function downloadVideo(url) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const child = child_process.spawn("../yt-dlp", [url, ' -f 248+250/22/18/17'], {cwd: 'videos', shell: false})
|
const child = child_process.spawn("../yt-dlp", ["--proxy", "http://gluetun:8888", url], {cwd: 'videos', shell: false})
|
||||||
|
// https://github.com/yt-dlp/yt-dlp/blob/cc8d8441524ec3442d7c0d3f8f33f15b66aa06f3/README.md?plain=1#L1500
|
||||||
|
|
||||||
child.stdout.on("data", data => {
|
child.stdout.on("data", data => {
|
||||||
const msg = data.toString().trim()
|
const msg = data.toString().trim()
|
||||||
|
|
Loading…
Reference in New Issue