The reason I need to be able to save the data in an image is so that we can overlay it on the stream of an all sky cam at this remote observatory.
Perhaps someone here can point me in the right direction, Maybe there is an easier way to go about this.
Is it possible to retrieve text from a query address? I need to be able to have a script run once a minute to grab the planes+overhead result, save the text or jpg to a folder and rename it.
We are running Windows so I can use robocoby to take care of the data once it comes in. I just need to be able to send some sort of query to Wolfram Alpha and have it return me a viable format.
I had gotten it to work late last night after many hours of work, but then Wolfram Alpha blocked my ip and I thought it didn’t work in the morning and erased it only to find out it wasn’t the program it was my IP being blocked due to all the activity from constant parsing and retrieving.
Now I can’t get it to at all, I’m on a VPN, have been using teamviewer with different IPs testing.
But whatever code I had written last night will probably be lost to me for a long long time!
Maybe someone here is familiar with wget or can point me in the right direction?
Most probably it is impossible to get this data using Wget but you have two possibilities:
Try to automate you browser in such a way that it will save this image or take a screenshot of what the browser displays.
Try free Mathematica Player. I cannot say for sure but this free application probably can access Wolfram|Alpha in the way shown in my previous answer. If it can, you can retrieve the data and take a screenshot of what is displayed in the player (the free version does not allow Exporting).
Home Edition of Mathematica is not that expensive. Also have you looked at Wolfram|Alpha API ? We think this might be exactly what you need and might not be expensive for your usage, but you will need to contact them for exact pricing via form on the linked page.
Here is a rudimentary solution using Phantom.js, which grabs a screen shot of an area of the webpage and outputs it to a file.
var page = new WebPage();
page.viewportSize = { width: 1920, height: 1080 };
//the clipRect is the portion of the page you are taking a screenshot of
page.clipRect = { top: 450, left: 660, width: 470, height: 300 };
page.open('http://www5b.wolframalpha.com/input/?i=flights+seen+from+current+geoIP+location',
function (status) {
just_wait();
});
function just_wait() {
setTimeout(function() {
page.render('planesoverhead.png');
phantom.exit();
}, 6000);
}
I will update a more well thought out code in a few days that will grab the planes+overhead gif by element ID and save it as a whole.
The planes+overhead result gif changes size based on the total number of planes overhead at any particular time, meaning that a fixed resolution may not always include the full results.