Skip to content


Fix page.rb content method #4

merged 1 commit into from

3 participants


When pulling Wikipedia content "text/x-wiki" is returned. I'm using ruby 1.9.3p385 with rvm.

require 'wikipedia'
 => true

Wikipedia.find("Salesian High School").content
 => "text/x-wiki"

Fixed by changing page.rb to lookup key directly from hash.


Now it responds with

require 'wikipedia'
 => true

 Wikipedia.find("Salesian High School").content
 => "'''Salesian School''' may refer to:\n\n* [[Salesian schools]],
a generic term applied to educational institutions run by the Roman
Catholic Salesian Congregation of Saint John Bosco\n....
@kenpratt kenpratt merged commit 6cba99c into kenpratt:master

Sorry for the slow merge. FYI I've merged this into master, fixed up the tests, and pushed a new 1.1.0 gem release, if you want to update your Gemfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 24, 2013
  1. @QuackenbushDev
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/wikipedia/page.rb
2 lib/wikipedia/page.rb
@@ -11,7 +11,7 @@ def page
def content
- page['revisions'].first.fetch('*') if page['revisions']
+ page['revisions'].first['*'] if page['revisions']
def sanitized_content
Something went wrong with that request. Please try again.