wiki/docs/web-services.md

36 lines
1.2 KiB
Markdown
Raw Normal View History

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")