wiki/docs/web-services.md
Simon Bruder 7cc20db4db
All checks were successful
continuous-integration/drone/push Build is passing
Initial commit
2020-11-05 12:04:06 +01:00

36 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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