Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get Bing's photo of the day?

Tags:

bing

Is there some way I could get the Bing background image programmatically?

Bing's API doesn't seem to provide such functionality, perhaps there's another way?

like image 240
Mahmoud Hanafy Avatar asked May 17 '12 16:05

Mahmoud Hanafy


People also ask

How do I get Bing image of the day?

The application will launch when you start your PC and automatically download and set a new desktop wallpaper image every day. To change your wallpaper, find the Bing icon in your notification area (system tray), click it, and use the “Change wallpaper” options. You can quickly cycle through a few available wallpapers.

Where is Bing Wallpaper of the day stored?

(C:\Users\%MYNAME%\AppData\Local\Microsoft\BingDesktop)

How do I get Bing screensaver?

Head to Bing.com/gallery (or click on the screenshot below). Look over on the left menu. Click download a wallpaper pack. Check your browser, or downloads folder, for the file.


1 Answers

I think the best way is immitating the way they do it themselves through their AJAX calls.

They call this URL and extract the information through XML deserialization.

XML: http://www.bing.com/HPImageArchive.aspx?format=xml&idx=0&n=1&mkt=en-US

JSON: http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt=en-US

RSS: http://www.bing.com/HPImageArchive.aspx?format=rss&idx=0&n=1&mkt=en-US

The mkt attribute can obviously be changed to a different region than ´en-US´, but can also be opted out of entirely if you don't care about a specific region.

Note that the _1366x768.jpg suffix that is added to the image names appears to be modifiable into different resolutions (like _1920x1080.jpg for full HD and possibly others).

Here's a dump of the data as of 9/28/2013, in XML format.

<?xml version="1.0" encoding="utf-8"?> <images>     <image>         <startdate>20130928</startdate>         <fullstartdate>201309280000</fullstartdate>         <enddate>20130929</enddate>         <url>/az/hprichbg/rb/LakeTurkana_EN-US15976511099_1366x768.jpg</url>         <urlBase>/az/hprichbg/rb/LakeTurkana_EN-US15976511099</urlBase>         <copyright>Lava rock pools at the southern end of Lake Turkana, in Kenya (© Nigel Pavitt/Corbis)</copyright>         <copyrightlink>http://www.bing.com/search?q=Lake+Turkana%2C+Kenya&amp;form=hpcapt</copyrightlink>         <drk>1</drk>         <top>1</top>         <bot>1</bot>         <hotspots>             <hotspot>                 <desc>These are the southern reaches of a lake...</desc>                 <link>http://www.bing.com/maps/?v=2&amp;cp=2.794725~37.335197&amp;lvl=7&amp;dir=0&amp;sty=b&amp;q=Lake%20Turkana%2C%20Kenya&amp;form=hphot1</link>                 <query>That stretches for 180 miles, up into another country</query>                 <LocX>15</LocX>                 <LocY>33</LocY>             </hotspot>             <hotspot>                 <desc>This body of water was once called the Jade Sea.</desc>                 <link>http://www.bing.com/search?q=green+algae&amp;form=hphot2</link>                 <query>What gives the water here its sometimes vibrant hue?</query>                 <LocX>37</LocX>                 <LocY>42</LocY>             </hotspot>             <hotspot>                 <desc>One of the world's most powerful predators lives here.</desc>                 <link>http://www.bing.com/videos/search?q=Underwater+Croc+Cams+National+Geographic&amp;FORM=hphot3#view=detail&amp;mid=D25E1909D3514A8732C5D25E1909D3514A8732C5</link>                 <query>See some rare underwater footage of the beast</query>                 <LocX>66</LocX>                 <LocY>33</LocY>             </hotspot>             <hotspot>                 <desc>Many fossils of ancient human ancestors have been uncovered in the surrounding area.</desc>                 <link>http://www.bing.com/search?q=Turkana+Boy&amp;form=hphot4</link>                 <query>One skeleton was so complete, paleoanthropologists gave him a name</query>                 <LocX>82</LocX>                 <LocY>41</LocY>             </hotspot>         </hotspots>         <messages></messages>     </image>     <tooltips>         <loadMessage>             <message>Indlæser...</message>         </loadMessage>         <previousImage>             <text>Forrige</text>         </previousImage>         <nextImage>             <text>Næste</text>         </nextImage>         <play>             <text>Afspil</text>         </play>         <pause>             <text>Pause</text>         </pause>     </tooltips> </images> 
like image 116
Mathias Lykkegaard Lorenzen Avatar answered Oct 15 '22 22:10

Mathias Lykkegaard Lorenzen