I need a python script that does the following:
1. loops through list of query strings in text file (one query per line (LF))
* example queries: canon digital camera, cole haan air, pottery barn dresser
2. for each query:
1. URL encodes string and calls google product search API (public snippets feed)
1. eg http://www.google.com/base/feeds/snippets?bq=digital+camera
2. see: http://code.google.com/apis/base/docs/2.0/reference.html
3. must set attributes
1. max-results=250
2. condition is new
3. g:author is not eBay
2. receives xml or json file from google product search
3. parses xml/json results
* calculates statistical facts (as described below) of selling prices from g:price attribute in xml feed
4. writes summary results to new csv file with following columns
* timestamp
* query
* number of results
* max price
* min price
* mean price
* median price
* 25th percentile price
* 75th percentile price
Script must be in Python. Using Google Python client libraries are ok. Importing 3rd party modules also ok (as long as they are open souce). also Note: g:price attribute should be price for item, not shipping price (also g: price but within shipping attribute).
