Last active
May 16, 2019 02:59
-
-
Save gecko655/41923f915d3429ecd31e35b0c9d16c5a 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 | |
| # moved to https://github.com/gecko655/homebrew-aikatsu-story | |
| if [ $# -lt 1 ] ; then | |
| echo "usage: $0 episode-id" | |
| exit 1 | |
| fi | |
| episode_id=`printf %03d $1` | |
| series_id=`printf %02d $(( ($1 - 1)/ 50 + 1))` | |
| if [ $1 -ge 51 ] ; then | |
| url="http://www.aikatsu.net/story/story-${episode_id}.html" | |
| pup_command='.story-main-frame > :nth-child(2) json{}' | |
| else | |
| url="http://www.aikatsu.net/aikatsufriends_${series_id}/story/story-${episode_id}.html" | |
| pup_command='.story-waku-menu > :nth-child(2) json{}' | |
| fi | |
| curl -s $url | \ | |
| pup "$pup_command" | \ | |
| jq --raw-output '.[].text' |
gecko655
commented
May 16, 2019
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment