dongzhuzhou4504 2014-06-13 16:28
浏览 60
已采纳

维基百科Api Extensions with Php

Iam using this Wikipedia-Php Request Methode. Now, i will get back only people, and not companys or a kind of that. My actualy url is like this:

$url = 'http://de.wikipedia.org/w/api.php?format=xml&action=query&titles='.$q.'&prop=revisions&rvprop=content';

i had searched in the wikipedia api-description, but i don't have find any help that will answer my question. Sorry for my bad English.

  • 写回答

1条回答 默认 最新

  • doudou0612 2014-06-13 20:41
    关注

    There is no certain way to chose only articles about people. You either try to traverse your way through the sub categories from Kategorie:Person, but that will give you a lot of false positives, or you can look for pages containing any of the templates that are common on pages about persons (this will vary a lot, depending on what WP edition you are talking about).

    I would, however, recommend you to have a look at WikiData or DBPedia, where you can get structured data from Wikipedia. Some hints are here: How do I get all articles about people from Wikipedia?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化