Skip to content

Instantly share code, notes, and snippets.

@soramugi
Created February 1, 2016 06:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soramugi/9c23d947117e208b8210 to your computer and use it in GitHub Desktop.
Save soramugi/9c23d947117e208b8210 to your computer and use it in GitHub Desktop.
アニたまの別冊ラジ関の更新確認
#!/bin/bash
word='2/1更新★もじゃ'
cookie=/tmp/cookie.txt
sleep_time=`expr 60 \* 5`
curl -c $cookie 'http://www.weeeef.com/weeeefww1/Transition?command=top&group=G0000049' 1>/dev/null 2>&1
curl -b $cookie -c $cookie "http://www.weeeef.com/weeeefww1/CategoryServlet?groupId=null&time=`date +%s`" 1>/dev/null 2>&1
while true; do
printf .
curl -b $cookie -c $cookie -s 'http://www.weeeef.com/weeeefww1/BookServlet' | xmllint --format - | grep Title | grep $word && say 更新されました && break
sleep $sleep_time
done;
rm $cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment