mirror of https://github.com/preservetube/auto.git
remove onion and i2p & upgrade yt-dlp
This commit is contained in:
parent
0251374f16
commit
246bd8e4d2
|
@ -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.03.04/yt-dlp -q
|
RUN wget https://github.com/yt-dlp/yt-dlp/releases/download/2023.07.06/yt-dlp -q
|
||||||
RUN chmod +x yt-dlp
|
RUN chmod +x yt-dlp
|
||||||
|
|
||||||
CMD ["node", "index.js"]
|
CMD ["node", "index.js"]
|
|
@ -2,7 +2,8 @@ const fetch = require('node-fetch')
|
||||||
|
|
||||||
async function getInstance() {
|
async function getInstance() {
|
||||||
const instances = await (await fetch('https://api.invidious.io/instances.json?pretty=1')).json()
|
const instances = await (await fetch('https://api.invidious.io/instances.json?pretty=1')).json()
|
||||||
return `https://${instances[Math.floor(Math.random() * instances.length)][0]}`
|
const sorted = instances.filter(o => o[1].type == 'https')
|
||||||
|
return `https://${sorted[Math.floor(Math.random() * sorted.length)][0]}`
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPipedInstance() {
|
async function getPipedInstance() {
|
||||||
|
|
Loading…
Reference in New Issue