[potd dataengine] Fix Wikimedia Picture of the Day provider
ClosedPublic

Authored by kossebau on Apr 6 2018, 12:20 AM.

Details

Summary

The used service no longer existed. While the pointers listed e.g. at
https://commons.wikimedia.org/wiki/Commons:Press_releases/Picture_of_the_Day_RSS
are outdated, and any currently existing RSS feeds would need complicated parsing of
unspecified feed content (so prone to change and fail) I found a nice though seemingly
proper hack in the code of https://github.com/simison/WikimediaCommonsPotd to first
get the filename of the current potd by using the Web API to have the wiki macro
"{{Potd}}" be resolved and then get it fetched by Wikimedia Commons'
Redirect/file tool.

Test Plan

Select wallpaper "Picture of the Day", select as provider "Wikimedia Picture
of the Day", click Apply and see a picture fetched, matching the one listed
as picture of the day on the wikimedia website like
https://commons.wikimedia.org/wiki/Commons:Picture_of_the_day

Diff Detail

Repository
R114 Plasma Addons
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Apr 6 2018, 12:20 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 6 2018, 12:20 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
kossebau requested review of this revision.Apr 6 2018, 12:20 AM

Target branch: 5.12

ngraham added a subscriber: ngraham.Apr 6 2018, 2:16 AM

Can confirm that it works again, yay! +1 for that. Is there really no longer a working feed or some sort for this?

kossebau retitled this revision from [potd dataengine] Fix Wikimedia Picture of the Day provicer to [potd dataengine] Fix Wikimedia Picture of the Day provider.Apr 6 2018, 10:10 AM
kossebau edited the summary of this revision. (Show Details)

Can confirm that it works again, yay! +1 for that.

Thanks for testing.

Is there really no longer a working feed or some sort for this?

None that I had found at least. Those documented at https://commons.wikimedia.org/wiki/Commons:Feeds#Picture_of_the_Day have content which is not really straightforward and reliable to use for our very purpose to just get the download link for the very image of "today". Updated the commit message to make that more clear.

If there are no further comments, will push on Fri, April 13th.

ngraham accepted this revision.Apr 10 2018, 9:34 PM
This revision is now accepted and ready to land.Apr 10 2018, 9:34 PM
This revision was automatically updated to reflect the committed changes.