Class: Scrapperd::Base
- Inherits:
-
Object
- Object
- Scrapperd::Base
- Defined in:
- lib/scrapperd/base.rb
Constant Summary collapse
- BASE_URL =
"http://letterboxd.com/"
Instance Method Summary collapse
Instance Method Details
#fetch(username) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/scrapperd/base.rb', line 13 def fetch(username) raise Scrapperd::Error::BadRequest.new('options must be in a Hash') unless username rss = SimpleRSS.parse(open("#{BASE_URL}#{username}/rss")) rss.items.map{|item| Scrapperd::Activity.new(item)} end |