Returns the most important pieces of content on a web page. Finds the best block of text, image and title by analysing the page content.
Pass in a URL on initialisation and then call the helpers to pull the best content out.
mc = MechanizeContent::Parser.new("www.joystiq.com/2010/03/19/mag-gets-free-trooper-gear-pack-dlc-next-week/")
"MAG gets free 'Trooper Gear Pack' DLC next week -- Joystiq"
"Ten-hut, soldiers! HQ has just sent word that some new gear will be shipping to the front lines of MAG next week, free of charge: the Trooper Gear Pack. In this parcel, we'll finally get access to the Flashbang grenade..."
The gem also supports multiple URLs and will find the best content between them. The order in which they are inserted determines priority.
Note on Patches/Pull Requests
Fork the project.
Make your feature addition or bug fix.
Add tests for it. This is important so I don't break it in a future version unintentionally.
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
Send me a pull request. Bonus points for topic branches.
Copyright © 2010 John Griffin. See LICENSE for details.