need help with automating a CMD java tool which queries alexa AWS using batch

Posted by Eli.C on Server Fault See other posts from Server Fault or by Eli.C
Published on 2010-04-14T14:51:18Z Indexed on 2010/04/14 20:54 UTC
Read the original article Hit count: 570

Filed under:
|
|
|

Hi everyone,

I need to get all available info on 600 URLs from "Alexa Web Information Service", I downloaded the java tool and I'm able to run a single query each time with a single switch/Response Group.

I would like to ask how to write a batch file that would automate the process?

The java tool runs from the CMD with the following:

C:\>java UrlInfo (key1) (key2) (URL) (Response Group)

UrlInfo - constant
key1 - constant
key2 -constant
URL - variable (I guess I need to use the "(" sign to read from a file)
Response Group - variable - (14 total, and I need to run each Response Group on each of the URLs once )

the app returns data in clear text formatted as XML after each query, here is an example:

C:\>java UrlInfo (key1) (key2) www.url.com Rank

Response:

(?xml version="1.0"?)
(aws:UrlInfoResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/")
(aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11")
(aws:OperationRequest)
(aws:RequestId)ec2b6-e8ae-b392(/aws:RequestId)
(/aws:OperationRequest)
(aws:UrlInfoResult)
(aws:Alexa)

  (aws:TrafficData)
    (aws:DataUrl type="canonical")url.com/(/aws:DataUrl)
    (aws:Rank)**472906**(/aws:Rank)
  (/aws:TrafficData)
(/aws:Alexa)
(/aws:UrlInfoResult)
(aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/")
(aws:StatusCode)Success(/aws:StatusCode)
(/aws:ResponseStatus)
(/aws:Response)
(/aws:UrlInfoResponse) 

Any help would be really appreciated

Thanks and regards Eli.C

© Server Fault or respective owner

Related posts about batch

Related posts about java