Changeset 9408 for lang/ruby/twitter_bot
- Timestamp:
- 04/13/08 22:43:31 (5 years ago)
- Files:
-
- 1 modified
-
lang/ruby/twitter_bot/47news/headline.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/twitter_bot/47news/headline.rb
r9009 r9408 31 31 result :urls,:titles 32 32 } 33 begin 34 res = open('http://www.47news.jp/localnews/'+location+'/archives.php').read 35 rescue OpenURI::HTTPError 36 exit! 37 end 33 38 34 html = NKF::nkf('-w -m0', open('http://www.47news.jp/localnews/'+location+'/archives.php').read)39 html = NKF::nkf('-w -m0', res) 35 40 36 41 news = scraper.scrape(html, :parser => :html_parser) … … 63 68 p title.to_s 64 69 twit.update(Kconv.kconv(title.to_s + news.urls[i], Kconv::UTF8)) 70 sleep 5 65 71 end 66 72 end … … 68 74 end 69 75 else 70 p ' 404Not Found'76 p 'Not Found' 71 77 end 72 78
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)