Page MenuHomePhabricator

Wikidata API has problems with ZW[N]J and underscores for some links
Closed, DeclinedPublic

Details

Reference
bz45227

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:14 AM
bzimport set Reference to bz45227.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #0)

The API does not use the underscore form for titles.

I had these queries and it shows wrong results

http://wikidata.org/w/api.
php?action=wbgetentities&sites=scnwiki&titles=Lista_d%C3%AE_stati_d%C3%AE_Sta
ti_Uniti&format=jsonfm

it should show item Q1682357

http://wikidata.org/w/api.
php?action=wbgetentities&sites=simplewiki&titles=List_of_U.S.
_states&format=jsonfm

it should show item Q1682357

(In reply to comment #2)

Can't see anything specific, but I guess the landing page use a zwj or zwnj.

The API does not use the underscore form for titles.

http://wikidata.org/w/api.
php?action=wbgetentities&sites=dewiki&titles=Liste_deutscher_Jagdflieger_im_Z
weiten_Weltkrieg&format=jsonfm

should linked to Q557929

(In reply to comment #1)

it has bug also with other links!
for example it works for
http://wikidata.org/w/api.
php?action=wbgetentities&sites=fawiki&titles=%D8%A7%DB%8C%D8%B1%D8%A7%D9%86&f
ormat=jsonfm

but it doesn't work for
http://wikidata.org/w/api.
php?action=wbgetentities&sites=fawiki&titles=%D9%81%D9%87%D8%B1%D8%B3%D8%AA_%
D8%A8%D8%B1%D8%AA%D8%B1%DB%8C%D9%86_%D8%AE%D9%84%D8%A8%D8%A7%D9%86%D9%87%D8%A
7%DB%8C_%D8%AC%D9%86%DA%AF_%D8%AC%D9%87%D8%A7%D9%86%DB%8C_%D8%AF%D9%88%D9%85&
format=jsonfm

after new deploy it didn't solve :(
it has problem of creating items which doesn't have ZWNJ! like

[[شهرآورد سی و نهم تهران]]

[[بانک پارس]]

[[رده:User lki]]

[[غار علی شیخ]]

[[برج روستای مزاران]]

[[میزان الطب]]

Till now I collected more than 500 pages that API doesn't import them! please solve it becuase bots can not create these pages (I use pywikipedia for creating these items)

I checked some of the links and they are solved!