Last active
December 29, 2023 00:49
-
-
Save vimagick/5361df4c16ed6f52c141e0b9e170506b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # https://music.xn--41a.ws/ | |
| # | |
| BASE_URL=https://music.xn--41a.ws | |
| TOTAL_PAGES=$(curl -s $BASE_URL | pup 'ul.listalka > li:last-child > a text{}') | |
| for p in $(seq 1 $TOTAL_PAGES) | |
| do | |
| echo "====== $p ======" | |
| curl -sSL $BASE_URL/page/$p/ | | |
| pup 'li.track json{}' | | |
| jq -c '.[] | | |
| (.["data-url_song"]+.["data-mp3"]) as $url | | |
| .children[] | select(.tag=="h2") | | |
| {url: $url, artist: .children[0].children[0].text, title: .children[2].children[0].text}' | | |
| ascii2uni -q -aQ | | |
| jq -r '"\(.url)\n dir=songs/\(.artist)\n out=\(.title).mp3"' | | |
| aria2c --allow-overwrite=false --auto-file-renaming=false --deferred-input -i- -U Mozilla/5.0 -x10 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment