Easy Way to Get Data?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
fightcancer
Macro Veteran
Posts: 239
Joined: Fri Apr 15, 2005 8:32 am

Easy Way to Get Data?

Post by fightcancer » Thu Mar 30, 2017 7:20 am

This game I play has an advanced API that allows for the collection of data through API calls, Google sheets, MS Excel, etc. I'm trying to figure it out. Here's an example.

I can browse to this URL to get the info I want.
https://eve-marketdata.com/api/item_pri ... &buysell=s

Is there any way to get this info through MS without needing to go through the browser? I've looked at XMLParse and HTTPRequest, but I can't get it to work. Thanks!

PS Instead of "XML" above, one can change the format to TXT or JSON by swapping out XML for one or the other.

hagchr
Automation Wizard
Posts: 327
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Easy Way to Get Data?

Post by hagchr » Thu Mar 30, 2017 12:34 pm

I couldn't get it to work w HTTPRequest> (SSL problems?). With IE you could eg extract using TXT and then simply parse the info out.

Code: Select all

IECreate>IE[0]
IEShowIE>IE[0],1

Let>URL=https://eve-marketdata.com/api/item_prices2.txt?char_name=addict&type_ids=9941&station_ids=60003760&minmax=min&buysell=s
IENavigate>IE[0],URL,res
IEWaitDocumentComplete>IE[0],res

IEExtractTag>IE[0],,BODY,0,0,res
IEQuit>IE[0],tmpres
MDL>res

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Easy Way to Get Data?

Post by mightycpa » Thu Mar 30, 2017 3:21 pm

If you want to avoid opening the browser, I'd suggest this:

1) create a php webpage (if you don't have a server available, google FREE PHP WEB HOSTING) with this code:

Code: Select all

<?php
$html = file_get_contents('https://eve-marketdata.com/api/item_prices2.txt?char_name=addict&type_ids=9941&station_ids=60003760&minmax=min&buysell=s');
echo $html;
?>
2) Then do the http request against your webpage, instead of the original one.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

fightcancer
Macro Veteran
Posts: 239
Joined: Fri Apr 15, 2005 8:32 am

Re: Easy Way to Get Data?

Post by fightcancer » Thu Mar 30, 2017 5:14 pm

Thanks for the ideas.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts