Skip to content

Instantly share code, notes, and snippets.

@kmdsbng
Created December 19, 2013 05:48
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 kmdsbng/8034945 to your computer and use it in GitHub Desktop.
Save kmdsbng/8034945 to your computer and use it in GitHub Desktop.
はてなブログで購読中のrssを取得する
casper = do (require 'casper').create
account = YOUR_USER_NAME
pass = YOUR_PASSWORD
casper.start 'https://www.hatena.ne.jp/login', ->
casper.fill 'form[action="/login"]', {'name': account, 'password': pass}, true
@click 'form[action="/login"] input[type="submit"]'
casper.then ->
casper.start 'http://blog.hatena.ne.jp/-/antenna', ->
blog_urls = @evaluate ->
links = document.querySelectorAll('a.entry-unit-user-name')
for link in links then link.getAttribute('href')
feed_urls = for url in blog_urls then url + 'feed'
for url in feed_urls
@echo url
do casper.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment