Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
twoism committed Jun 17, 2010
1 parent 994b148 commit c3dfc1c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.mdown
Expand Up @@ -4,6 +4,10 @@

Simply awesome web scraping. Better docs later. See specs.

### 0.3.4 Update ###

[http://twoism.posterous.com/new-graboid-dsl](http://twoism.posterous.com/new-graboid-dsl, "New DSL")

### Installation ###


Expand All @@ -15,7 +19,7 @@
%w{rubygems graboid}.each { |f| require f }

class RedditEntry
include Graboid::Entity
include Graboid::Scraper

selector '.entry'

Expand All @@ -26,7 +30,7 @@
entry.css('a').first['href']
end

pager do |doc|
page_with do |doc|
doc.css('p.nextprev a').select{|a| a.text =~ /next/i }.first['href']
end

Expand All @@ -38,9 +42,9 @@

end

RedditEntry.source = 'http://reddit.com'
@posts = RedditEntry.new( :source => 'http://reddit.com' ).all( :max_pages => 2 )

RedditEntry.all(:max_pages => 5).each do |p|
@posts.each do |p|
puts "title: #{p.title}"
puts "domain: #{p.domain}"
puts "link: #{p.link}"
Expand Down

0 comments on commit c3dfc1c

Please sign in to comment.