Skip to content

Instantly share code, notes, and snippets.

@yu81
Last active August 29, 2015 14:08
Show Gist options
  • Save yu81/9be3fdbcb9c96a12f320 to your computer and use it in GitHub Desktop.
Save yu81/9be3fdbcb9c96a12f320 to your computer and use it in GitHub Desktop.
Find Wild Hyuza at Astoltia by scraping Yahoo! Realtime Search using cooccurrence word of Hyuza(ヒューザ).
curl 'http://realtime.search.yahoo.co.jp/search?p=%E3%83%92%E3%83%A5%E3%83%BC%E3%82%B6&ei=UTF-8' |
sed -e 's/\\n//g' |
egrep -o '<em>ヒューザ<\/em> .+<\/a><\/dd>' |
sed -e 's/[a-zA-Z\/<>]//g' |
awk '{print ($2 != "") ? $2 : "Hyuza not found.";}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment