Changeset 19698 for lang/ruby/robot-twitter/trunk/robot-twitter.rb
- Timestamp:
- 09/22/08 02:06:34 (4 months ago)
- Files:
-
- 1 modified
-
lang/ruby/robot-twitter/trunk/robot-twitter.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/robot-twitter/trunk/robot-twitter.rb
r19026 r19698 29 29 statuses = "" 30 30 31 for i in 1.. 1031 for i in 1..30 32 32 puts "scraping ... Page " + i.to_s + "\n" 33 33 page = agent.get('http://twitter.com/home/?page=' + i.to_s) 34 34 page.body = page.body.toutf8 35 page.search('td.content').each do |entry| 35 36 page.search('div.status-body').each do |entry| 36 37 name = entry.search('a').first.inner_text 37 38 content = CGI.unescapeHTML(entry.search('span.entry-content').first.inner_html).gsub(/^\s+/, '') … … 44 45 45 46 meta = entry.search('a[@class="entry-date"]').first 46 time = meta.search(' abbr.published').first.inner_text47 time = meta.search('span.published').first.inner_text 47 48 statuses = meta["href"] 48 49
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)