pediapress / mwlib

mediawiki parser library
103 stars 35 forks source link

Image not fetched #26

Open v0lk3r opened 11 years ago

v0lk3r commented 11 years ago

The imageinfo for the image does not contain the title attribute, therefore it is not fetched. (check line 535 in fetch.py)

See snippet: http://en.wikivoyage.org/w/index.php?title=User:Volker.haas&oldid=2097385

In the article http://en.wikivoyage.org/wiki/Cape_Town (where the example was pulled from) another image fails to be fetched

v0lk3r commented 11 years ago

some more info:

Markup in article:

* [[Image:Flag of Belgium.svg|20px]] <listing name="Belgium" address="4F, Vogue House, Thibault Sq" phone="+27 (0)21 419 4690"></listing>

* [[Image:Flag of China.svg|20px]] <listing name="China" address="972 Pretorius St, Arcadia, Pretoria" phone="+27 12-4316500" email="reception@chinese-embassy.org.za" fax="+27 12-3424244" url="http://www.chinese-embassy.org.za/eng/"></listing>

The last URL is displayed as http://en.wikivoyage.org/wiki/File:Flag_of_the_People%27s_Republic_of_China.svg in the browser.

The API request for the image info fails:

compare:

http://en.wikivoyage.org/w/api.php?action=query&titles=File:Flag_of_Belgium.svg&prop=imageinfo&iiprop=url|user|comment|url|sha1|size (works as expected)

http://en.wikivoyage.org/w/api.php?action=query&titles=File:Flag_of_China.svg&prop=imageinfo&iiprop=url|user|comment|url|sha1|size (fails: imageinfo is missing)