Modify

Opened 3 years ago

Closed 3 years ago

#14001 closed enhancement (fixed)

[Patch] Resolve Wikipedia redirects when failing Wikidata lookup

Reported by: nyurik Owned by: simon04
Priority: normal Milestone:
Component: Plugin wikipedia Version:
Keywords: Cc:

Description

Frequently Wikipedia articles get renamed, and the OSM "wikipedia" tag is left pointing to the "redirect" page. Unfortunately, the api.php?action=wbsearchentities does not handle redirects. Thus, for all failed Wikidata lookups, the plugin should try to resolve Wiki link, and try the Wikidata lookup again. This API call does both - it normalizes page titles (2 in this case), and resolves redirects:

https://en.wikipedia.org/w/api.php?action=query&titles=einstein|usa&redirects

Attachments (1)

resolveRedirects.diff (3.9 KB) - added by nyurik 3 years ago.
Proposed patch

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by nyurik

Attachment: resolveRedirects.diff added

Proposed patch

comment:1 Changed 3 years ago by skyper

Summary: Resolve Wikipedia redirects when failing Wikidata lookup[Patch] Resolve Wikipedia redirects when failing Wikidata lookup

@nyurik: Please, additionaly to attaching a patch, always add a comment as single attachment are often missed. Thanks

comment:2 Changed 3 years ago by simon04

Resolution: fixed
Status: newclosed

Thanks for the patch.

Slightly adapted, tested and committed: [o33098:33099].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.