mirror of https://github.com/FreeTubeApp/FreeTube
add piped to get instances script
This commit is contained in:
parent
f69416c527
commit
3300118ff8
|
@ -14,3 +14,17 @@ fetch(invidiousApiUrl).then(e => e.json()).then(res => {
|
|||
})
|
||||
fs.writeFile('././static/invidious-instances.json', JSON.stringify(data, null, 2))
|
||||
})
|
||||
|
||||
const pipedApiUrl = 'https://piped-instances.kavin.rocks/'
|
||||
|
||||
fetch(pipedApiUrl).then(e => e.json()).then(res => {
|
||||
const data = res.map(e => e.api_url)
|
||||
fs.writeFile('././static/piped-instances.json', JSON.stringify(data, null, 2))
|
||||
})
|
||||
|
||||
const pipedApiUrl = 'https://piped-instances.kavin.rocks/'
|
||||
|
||||
fetch(pipedApiUrl).then(e => e.json()).then(res => {
|
||||
const data = res.map(e => e.api_url)
|
||||
fs.writeFile('././static/piped-instances.json', JSON.stringify(data, null, 2))
|
||||
})
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const fs = require('fs/promises')
|
||||
const url = 'https://piped-instances.kavin.rocks/'
|
||||
|
||||
fetch(url).then(e => e.json()).then(res => {
|
||||
const data = res.map(e => e.api_url)
|
||||
fs.writeFile('././static/piped-instances.json', JSON.stringify(data, null, 2))
|
||||
})
|
Loading…
Reference in New Issue