This project is read-only.

National Geographic POTD not being downloaded....


All the other images from the various sites seem to download just fine, however, I have not been able to get anything new from National Geographic in a very long time. Is there an ongoing issue with this?

file attachments


ajmoor wrote Sep 11, 2014 at 11:59 AM


The National Geographic POTD is not being downloaded because of a small fault in the program. In the html code that gets downloaded from the NG website, the img tag for the photo of the day does not start with 'http' but rather with just a double slash '//'

In normal use this makes no difference, since http is the default transport for html web pages. But the Picturethrill code determines that if the img tag does not start with http then it must be a relative link, it then prepends it with the domain name which then makes a totally invalid URL.

A simple fix can be made by modifying the HtmlUtilities.cs file.

After the lines
string imgPath = urlRegex.Match(pageHtml).Groups[1].Value;
if (imgPath.StartsWith("http"))
    return imgPath;
add another test like below
if (imgPath.StartsWith("//"))
    return "http:" + imgPath;
I have attached my modified HtmlUtilities.cs file so you can download the source code, add my modification and compile it

Hope this helps


malicecristof wrote Sep 13, 2014 at 7:42 AM

Thank you very much for the response, however, I do not know anything about editing source code or modifying anything, much less compiling. I simply thought there would be some sort of update to the program itself that would fix this. If there is not anything in the works to fix this, then I will deal with it.

Thanks for your time.

ajmoor wrote Sep 13, 2014 at 4:35 PM


I have made the change in a forked copy of the source code and submitted a pull request for the project administrator to merge my fix into the main code.

If (and when) the project administrator gets around to doing this, he should then make an update available.

Kind regards

ajmoor wrote Sep 3, 2016 at 11:12 AM

Hello again

I have again fixed the National Geographic provider, and also the Bing provider so they all work correctly once more.

The providers occasionally make changes in their webpages which stop the downloaders working.

The fully functioning version is attached to this post