php - How to get specific content from wikipedia? -
i'm trying make personal tv guide display title , airdate of last available episode of h.i.m.y.m , tbbt.
as resource information decided use wikipedia. know wikipedia has it's own api , i've been looking through documentation quite while it's extensive , don't know start. far i've got point i'm querying url:
http://en.wikipedia.org/w/api.php?action=query&title=list_of_how_i_met_your_mother_episodes&prop=info&format=dbg
and receiving following array:
array ( 'query' => array ( 'pages' => array ( 6048517 => array ( 'pageid' => 6048517, 'ns' => 0, 'title' => 'list of how met mother episodes', 'touched' => '2011-01-25t15:33:45z', 'lastrevid' => 409077359, 'counter' => 0, 'length' => 4417, ), ), ), )
the problem have no idea how actual data i'm looking :/ maybe out there has bit more exprerience wikipedia api , can somehow me problem. thanks
note mediawiki api allows access mediawiki kind of information. wiki kind of collection of text pages. there no inherit semantic within way mediawiki software stores information on wikipedia. done via special, text-based formatting.
so if find general , consistent information on wikipedia, not because software did it, because authors decided on common standard display data. such, actual semantic out of wiki, need parse information yourself. can use mediawiki api exact text representation software stores article, , parse information looking out of text. of course requires know where , how particular information usually displayed. , of course, there no guarantee, work time, or every page test.
Comments
Post a Comment