also you can use xmlreader and read dumps of wikidata.


On Tue, Mar 18, 2014 at 3:47 PM, Felix Reimann <felix@fex-it.de> wrote:
Am 18.03.2014 11:52, schrieb Thomas Douillard:
> Hi, no to my knowledge it is not possible with pywikibot because
> Wikidata itself cannot do that atm (it will be possible when simple
> queries will be on line on Wikidata) but it is possible using another
> service like wdq, from Magnus Manske:
> http://wikidata-wdq-mm.instance-proxy.wmflabs.org/

True. However, as P214 is a property with string type, you cannont use
the neat query-click interface but have to use the API of WikidataQuery.

For your problem, this would be
http://wikidata-wdq-mm.instance-proxy.wmflabs.org/api?q=string[214:"5726988"]

giving the resulting item list [3300924].


If you additionally want to modify the resulting items with pywikibot:
A page generator for pywikibot which takes such query strings and work
on the resulting item list is currently under review:
https://gerrit.wikimedia.org/r/#/c/118698/

Bye
Felix
>
>
> 2014-03-18 11:44 GMT+01:00 Mpaa <mpaa.wiki@gmail.com
> <mailto:mpaa.wiki@gmail.com>>:
>
>     OK, thanks anyway
>
>
>     On Tue, Mar 18, 2014 at 11:43 AM, Mpaa <mpaa.wiki@gmail.com
>     <mailto:mpaa.wiki@gmail.com>> wrote:
>
>         hi all.
>
>         can someone help with my question below?
>
>         Thanks
>         Mpaa
>
>
>
>
>         On 18 March 2014 10:16, Mpaa <mpaa.wiki@gmail.com
>         <mailto:mpaa.wiki@gmail.com>> wrote:
>
>             Hi.
>
>             Need some help from someone familiar with wikidata.
>
>             Is there a way with pywikibot to find out, given a certain
>             value for a Property, which Item has that particular
>             Property value?
>
>             Better with a practical case.
>
>             Given P214 (VIAF data), I want to know who has P214 set to
>             5726988.
>             E.g.: how to find out that Item
>             https://www.wikidata.org/wiki/Q3300924 has P214=5726988?
>
>             Thanks for your help.
>
>             Bye
>             Mpaa
>
>
>
>
>
>     _______________________________________________
>     Pywikipedia-l mailing list
>     Pywikipedia-l@lists.wikimedia.org
>     <mailto:Pywikipedia-l@lists.wikimedia.org>
>     https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>
>
>
>
> _______________________________________________
> Pywikipedia-l mailing list
> Pywikipedia-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>


_______________________________________________
Pywikipedia-l mailing list
Pywikipedia-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l



--
Amir