web-services/youtube: Add converting takeout playlist to invidious
This commit is contained in:
parent
cd364c00e6
commit
b027a2aa0f
|
@ -40,3 +40,14 @@
|
|||
|
||||
:::js
|
||||
console.log(JSON.stringify(Array.from(document.querySelectorAll('#js-achievements table tbody tr')).map(row => { const cols = row.querySelectorAll('td'); return { name: cols[0].innerText, description: cols[1].querySelector('p.i').innerText, displayName: cols[1].childNodes[0].textContent.replace(/\n/g, ''), hidden: "0", icon: "achievements/" + cols[0].innerText + ".jpg", icongray: "achievements/" + cols[0].innerText + "_gray.jpg" } })))
|
||||
|
||||
## YouTube
|
||||
|
||||
### Convert takeout playlists to Invidious format
|
||||
|
||||
Incredibly ugly, but it works™.
|
||||
|
||||
If you want the import to succeed remove the liked video playlist before importing.
|
||||
|
||||
:::shell
|
||||
(echo '{"playlists":['; (for i in *.csv; do echo '{"title": "'"${i%%.csv}"'", "description": "", "privacy": "private", "videos": ["'"$(tail -n +5 "$i" | head -n -1 | cut -d',' -f1| perl -p -e 's/\n/","/' | head -c -3)"'"]},'; done)|head -c -2; echo ']}') > playlists.json
|
||||
|
|
Loading…
Reference in a new issue