Port potd (picture of the day) dataengine to KF5.
ClosedPublic

Authored by xuetianweng on Oct 27 2016, 10:44 PM.

Details

Summary

Osei site was discontinued, replace it with its successor which is also from
NOAA. Also fix flickr, wikipedia, national geography provider, which are
broken becauses of changes from providers. Use KPluginLoader to load plugin
instead of KServiceTypeTrader.

Test Plan

Manually with plasmaengineexplorer

Diff Detail

Repository
R114 Plasma Addons
Branch
arcpatch-D3183
Lint
No Linters Available
Unit
No Unit Test Coverage
xuetianweng retitled this revision from to Port potd (picture of the day) dataengine to KF5..
xuetianweng updated this object.
xuetianweng edited the test plan for this revision. (Show Details)
xuetianweng added a reviewer: mart.
Restricted Application added a project: Plasma. · View Herald TranscriptOct 27 2016, 10:44 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart edited edge metadata.Oct 28 2016, 9:02 AM

code looks good.
I tested the urls, annotated inline those that work and those that don't.
Unfortunately there are still two that don't, in flickr, where a no longer valid api key is used and the wikipedia one.

dataengines/potd/apodprovider.cpp
83

works, +1

dataengines/potd/epodprovider.cpp
82

this works, +1

dataengines/potd/flickrprovider.cpp
83–86

this one is valid, same api key should be used in the other queries

133

says "key has expired",
should have 11829a470557ad8e10b02e80afacb3af instead?

dataengines/potd/natgeoprovider.cpp
96

works, +1

dataengines/potd/noaaprovider.cpp
95

this one works, +1

dataengines/potd/wcpotdprovider.cpp
54

other copy of invalid url

73

this url doesn't seem to be valid anymore

maybe should web-scrape https://en.wikipedia.org/wiki/Wikipedia:Wikimedia_Commons/POTD ?
(don't know if there is a way to obtain directly the image)

mart added a comment.Nov 4 2016, 10:57 AM

any news on this?

xuetianweng marked 8 inline comments as done.
xuetianweng edited edge metadata.

Update flickr api key and wiki potd url

dataengines/potd/wcpotdprovider.cpp
54

emm.. I thought I fixed. nvm.

mart accepted this revision.Nov 15 2016, 9:42 AM
mart edited edge metadata.
This revision is now accepted and ready to land.Nov 15 2016, 9:42 AM
xuetianweng closed this revision.Nov 15 2016, 7:20 PM
hein added a subscriber: hein.Nov 15 2016, 8:59 PM

Sorry to react to this late, but I'm not happy about adding a non-optional build dependency on QtWebkit at this stage ...

I have to agree with Eike here and also apologies for chiming in at this late step.

From what I can tell a full-blown web-engine isn't needed here at all.

The NOAA one just looks for all script tags and extracts the URL from the _curPic call and the NatGeo one just looks for the meta og:image – both of which could be done by using plain Qt XML without any web engine involved.