sigma19
asked on
How to browse from command prompt.
I want to write a program in java,
which takes aruguments, gets the output and takes some links from that.
Example:
My program should go to google.com
give some string I have and search.
once i get the output: I want to query the first 3 pages and get the data to console?
I used wget in link to get a page.
I used curl to put and get in linux.
is there easy way to do all the steps I mentioned in java
which takes aruguments, gets the output and takes some links from that.
Example:
My program should go to google.com
give some string I have and search.
once i get the output: I want to query the first 3 pages and get the data to console?
I used wget in link to get a page.
I used curl to put and get in linux.
is there easy way to do all the steps I mentioned in java
or if you need to send a post request
http://helpdesk.objects.com.au/java/how-do-i-send-a-post-request-using-java
http://helpdesk.objects.com.au/java/how-do-i-send-a-post-request-using-java
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
One of the common ways to parse is to calean HTML using or number of similar packages like
HTML Tidy - and then parse cleaned HTML using XML parsing methods
HTML Tidy - and then parse cleaned HTML using XML parsing methods
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
theres no need to parse html pages to get links from google search
theres already an api available
http://code.google.com/apis/customsearch/v1/overview.html
theres already an api available
http://code.google.com/apis/customsearch/v1/overview.html
or you can use HttpUnit