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' |
Author
gecko655
commented
Mar 7, 2019
$ for i in `seq 1 57`
> do
> lines=`aikatsu_story $i | wc -m`
> printf "%2d: %s\n" $i $lines
> done
1: 133
2: 170
3: 151
4: 131
5: 122
6: 108
7: 112
8: 150
9: 120
10: 102
11: 130
12: 121
13: 132
14: 118
15: 126
16: 121
17: 120
18: 125
19: 111
20: 126
21: 114
22: 109
23: 121
24: 121
25: 108
26: 116
27: 123
28: 110
29: 120
30: 123
31: 118
32: 120
33: 113
34: 112
35: 107
36: 120
37: 113
38: 118
39: 113
40: 112
41: 119
42: 118
43: 112
44: 111
45: 120
46: 119
47: 117
48: 116
49: 114
50: 110
51: 122
52: 111
53: 110
54: 106
55: 119
56: 119
57: 115
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment