Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Add-ons
Commits
1cfbffb7
Commit
1cfbffb7
authored
Mar 18, 2021
by
George Dietrich
Committed by
Yunhe Guo
Mar 23, 2021
Browse files
Be a bit less strict when trying to extract natgeo potd URL
Update doc comment to point to proper URL
parent
db07392a
Changes
2
Hide whitespace changes
Inline
Side-by-side
dataengines/potd/natgeoprovider.cpp
View file @
1cfbffb7
...
...
@@ -42,7 +42,7 @@ void NatGeoProvider::pageRequestFinished(KJob *_job)
QString
url
;
re
.
setPattern
(
QStringLiteral
(
"
^
<meta
\\
s
+property=
\"
og:image
\"\\
s+content=
\"
(.*)
\"
.*/>
$
"
));
re
.
setPattern
(
QStringLiteral
(
"<meta
.
+property=
\"
og:image
\"\\
s+content=
\"
(.*
?
)
\"
.*/>"
));
for
(
int
i
=
0
;
i
<
lines
.
size
();
i
++
)
{
QRegularExpressionMatch
match
=
re
.
match
(
lines
.
at
(
i
));
...
...
dataengines/potd/natgeoprovider.h
View file @
1cfbffb7
...
...
@@ -17,13 +17,8 @@
class
KJob
;
/**
* This class provides the image for APOD
* "Astronomy Picture Of the Day"
* located at http://antwrp.gsfc.nasa.gov/apod.
* Direct link to the picture of the day page is
* http://antwrp.gsfc.nasa.gov/apod/apYYMMDD.html
* where YY is the year last 2 digits,
* MM is the month and DD the day, in 2 digits.
* This class provides the image for the National Geographic's photo of the day.
* Image URL is obtained from https://www.nationalgeographic.com/photo-of-the-day.
*/
class
NatGeoProvider
:
public
PotdProvider
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment