Created
December 19, 2013 05:48
-
-
Save kmdsbng/8034945 to your computer and use it in GitHub Desktop.
はてなブログで購読中のrssを取得する
This file contains 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
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