Project

inthenews

0.01
No commit activity in last 3 years
No release in over 3 years
A little parser for Wikipedia's 'In the News' content
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

In The News¶ ↑

A simple ruby parser for Wikipedia’s “In the News” box on the (english-language) homepage.

Usage¶ ↑

Install the gem

gem install inthenews

Then fetch the current news items

@news = InTheNews::Parser.new
items = @news.items

Items have text

items.first.text #=> "The Supreme Court of Pakistan retroactively discharges Yousaf Raza Gillani from the prime ministership due to his contempt of court conviction."

And associated topics (other related wikipedia pages)

items.first.topics #=> ['Supreme_Court_of_Pakistan', 'Yousaf_Raza_Gillani', 'Prime_Minister_of_Pakistan', 'Contempt_of_court']