Hello All,
I need to write a program which interacts with a search site. It can
be divided into two parts.
Part1: I am given a list of words (in a text file) that I need to
search in a search site. I need to extract a word from the text file,
modify the URL according to the word and then insert it in a browser
and search.
Part2: When the search is done I direct the output to a text file.
I dont have any web programming experience so if anybody can help me
with this it would be of great help.
Thank You
Pradnya.
|
|
0
|
|
|
|
Reply
|
pdr24 (6)
|
11/4/2003 7:54:40 PM |
|
On Tue, 04 Nov 2003 11:54:40 -0800, Pradnya Rodge wrote:
> Hello All,
> I need to write a program which interacts with a search site. It can
> be divided into two parts.
> Part1: I am given a list of words (in a text file) that I need to
> search in a search site. I need to extract a word from the text file,
> modify the URL according to the word and then insert it in a browser
> and search.
> Part2: When the search is done I direct the output to a text file.
> I dont have any web programming experience so if anybody can help me
> with this it would be of great help.
> Thank You
Forget the "insert it in a browser" bit. All a browser is is a program
that sends HTTP requests, gets responses, and displays the response
prettily. You can do the same thing: submit an HTTP request, get the
response, and then format and display the "interesting" data in the
response.
Most search engines utilize the querystring from a GET request to receive
the search criteria. Experiment with the search engine you want to use (or
read the doc, if available), and figure out how to construct the
querystring yourself.
Figure out the format of the response from the search engine, and devise
an algorithm to extract the interesting data from that response.
This isn't "web programming", btw.
Josh
|
|
0
|
|
|
|
Reply
|
curien (113)
|
11/5/2003 12:24:49 AM
|
|
pdr24@drexel.edu (Pradnya Rodge) wrote in message news:<aa71d370.0311041154.1d1f7fee@posting.google.com>...
> I need to write a program which interacts with a search site. It can
> be divided into two parts.
> Part1: I am given a list of words (in a text file) that I need to
> search in a search site. I need to extract a word from the text file,
> modify the URL according to the word and then insert it in a browser
> and search.
> Part2: When the search is done I direct the output to a text file.
> I dont have any web programming experience so if anybody can help me
> with this it would be of great help.
Use cURL ("http://curl.haxx.se"), a library for sending/receiving
HTTP requests. A library is provided under C, and some plugins exist
for other languages.
Then, you will be able to throw away the step with the browser.
-- Cedric
--------------------------------------------------------------------
CodeWorker, a scripting language for parsing text and for generating
code, available under LGPL at "http://www.codeworker.org"
|
|
0
|
|
|
|
Reply
|
codeworker (40)
|
11/5/2003 6:59:23 AM
|
|