Multiple keyword search in google|yahoo etc.

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jaymax
Posts: 1
Joined: 06 Feb 2014 19:50

Multiple keyword search in google|yahoo etc.

#1 Post by jaymax » 06 Feb 2014 21:07

I would like to create a *.bat file to perform a multiple keyword search in google|yahoo etc. The individual keyword(s) are in a single *.txt file delimited either by a white space, ' ', or a \n delimiter. The words are of a coded form of amino acids in a peptide such as 'AGHLFKVT' and the list contains about 300+ of these keywords. The output could be redirected to a file, stdout or piped to another program.

Can this be easily accomplished as a *.bat file?

My reading seems to indicate that each of these codes have to placed in individual files ???

I am just trying to read each code separately and pass them in as arguments to a
START http://www.google.com/search?q=arg
statement code

Suggestions welcomed

Thanks!

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Multiple keyword search in google|yahoo etc.

#2 Post by foxidrive » 06 Feb 2014 23:47

Put your search terms one per line in file.txt and download wget

There is a delay between requests so google doesn't auto-ban your IP address or similar.

Code: Select all

@echo off
for /f "delims=" %%a in (file.txt) do (
wget "http://www.google.com.au/search?q=%%a" -U=xy -O "%%a.htm"
ping -n 10 localhost >nul
)

Post Reply