Skip to content

Instantly share code, notes, and snippets.

@m-ueno
Last active December 30, 2016 14:32
Show Gist options
  • Save m-ueno/422104cf6ce48a7b0f51e03fc6004f90 to your computer and use it in GitHub Desktop.
Save m-ueno/422104cf6ce48a7b0f51e03fc6004f90 to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
radio_url=https://radiocloud.jp/archive/megane
wget -nv $radio_url -O temp
# url=https://www.spiral-pf.com/embed/c99d69d37a9a5db695da381346f47bfa6cbd7e902d7b446377d6412f3d64ed17
url=https:$(xmllint --html --xpath 'string(//div[@id="contents_open"]//input[@name="file_url"]/@value)' --nowarning temp 2>/dev/null)
url2=$(curl --cookie-jar cookie -Lv -H "Referer: https://radiocloud.jp/archive/megane/" $url |perl -nle '$_=~/(www.spiral-pf.com\/mp3_data.*)"/ and print "https://" . $1')
time curl -vL --cookie cookie $url2 -o audio.m4a > curl.log
@m-ueno
Copy link
Author

m-ueno commented Dec 30, 2016

"C:\Windows\System32\bash.exe" -c "hoge.sh"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment