2020-11-04 22:35:10 +01:00
|
|
|
|
# Web Services
|
|
|
|
|
|
|
|
|
|
## General
|
|
|
|
|
|
|
|
|
|
### Remove query string from downloaded files
|
|
|
|
|
|
|
|
|
|
:::shell
|
|
|
|
|
for i in *\?*; do echo mv "$i" "$(echo $i | cut -d'?' -f 1)"; done
|
|
|
|
|
|
|
|
|
|
## Mora
|
|
|
|
|
|
|
|
|
|
### Get title listing (for MusicBrainz)
|
|
|
|
|
|
|
|
|
|
:::js
|
|
|
|
|
[...document.querySelectorAll('.package_table tr')].map(el => {try {return `${el.querySelector('.package_td1').innerText} ${el.querySelector('.package_td2').innerText} / ${el.querySelector('.package_td3').innerText} ${el.querySelector('.package_td4').innerText.split('\n')[0]}`} catch(e) {}}).slice(1).join('\n')
|
|
|
|
|
|
|
|
|
|
## Instagram
|
|
|
|
|
|
|
|
|
|
### Download picture in highest quality available
|
|
|
|
|
|
|
|
|
|
https://instagram.com/p/SHORTCODE/media/?size=l
|
|
|
|
|
|
|
|
|
|
## Bandcamp
|
|
|
|
|
|
|
|
|
|
### Get title listing (for MusicBrainz)
|
|
|
|
|
|
|
|
|
|
:::js
|
|
|
|
|
[...document.querySelectorAll('#track_table .track_row_view')].map(el => `${el.querySelector('.track_number').innerText} ${el.querySelector('.track-title').innerText} (${el.querySelector('.time').innerText})`).join("\n")
|
|
|
|
|
|
|
|
|
|
## Ototoy
|
|
|
|
|
|
|
|
|
|
### Get title listing (for MusicBrainz)
|
|
|
|
|
|
|
|
|
|
:::js
|
|
|
|
|
Array.from(document.querySelectorAll('#tracklist tr:not(:nth-child(1))')).map(el => el.querySelector('span[id^="title-"]').innerText + " " + el.querySelector('td:nth-child(3)').innerText).join("\n")
|
2021-09-18 08:34:09 +02:00
|
|
|
|
|
|
|
|
|
## SteamDB
|
|
|
|
|
|
|
|
|
|
### Get stats as json
|
|
|
|
|
|
|
|
|
|
:::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" } })))
|
2021-09-18 08:34:33 +02:00
|
|
|
|
|
|
|
|
|
## 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
|