0

I am currently writing my master thesis and want to use this unofficial google api to automatically download some search queries.

https://github.com/elibus/j-google-trends-client/blob/master/README.md

I am very new to this stuff, so I would need some help to specify some inputs to get the data I need.

I have a list of queries in the same folder as the .jar which I want to use as imput for the API. But I fail to tell the program to use this folder as I do not know the proper command.

The creator of this API told me that the following would work on Linux (I use windows 8.1 (unfortunately)) but I could not transfer it to comands appropriate for my system.

for i in cat query_list.txt;do java -jar

java -jar j-google-trends-client.jar -u user -p pass -q "$i";done

More specifaclly, i got the msg that "i was unexpeted in that place". Does someone know that have to do?

Help would be much appreciated!

Thanks a lot and best regards Micha

Micha
  • 23
  • 1
  • 2
  • 7
  • That looks like a shell script. Windows batch files are not up to replicating that. You could write a java wrapper or use something like cygwin. – BevynQ Feb 18 '14 at 23:03

1 Answers1

0

Those linux programs don't exist in Windows. Perhaps the following works (Java has to be in your path variable):

for /F "tokens=*" %A in (query_list.txt) do java -jar j-google-trends-client.jar -u user -p pass -q %A

I used How to do multiple things to each file in a directory with a batch script for this.

Community
  • 1
  • 1
Rick
  • 443
  • 2
  • 10