Giter VIP home page Giter VIP logo

google-trends-csv-downloader's People

Contributors

hugle avatar simonavril avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

google-trends-csv-downloader's Issues

Extracting Data Within Certain Date Ranges

I'm having trouble though with trying to download specific dates. Google Trends itself allows for this (for example: http://www.google.com/trends/explore#q=hi&date=1%2F2007%203m&cmpt=q). I'm having trouble passing this into get_csv however. Does anyone know how to handle this?

I made some changes to the code to try to hack this out.

    params.update(kwargs)
    params = urllib.urlencode(params)
    params = params.replace('+', '%20')

    #So what's going on is that urlencode wants to encode the space in the
    #trendsReport date variable as a +, when we want it encoded as a space,
    #which in HTMl encoding is %20.

    complete_url = self.url_download + params
    print complete_url

    r = urllib2.urlopen(complete_url)

My usage is:

    r.get_csv(q='job', geo='US-'+state, date='1/2012 7m')

When I put the url generated into the browser, it works. But I get the quota error when I try running it on python.

Thanks

Sanitizing downloaded filename when using 'date' query

While investigating/cross-checking about querying on the date search query I came across this problem.

test:
from pyGoogleTrendsCsvDownloader import pyGoogleTrendsCsvDownloader r = pyGoogleTrendsCsvDownloader(login, password') r.get_csv(cat='0-958',date='1/2006 12m', geo='US-ME-500')
error:
Traceback (most recent call last): File "test.py", line 6, in <module> r.get_csv(cat='0-958',date='1/2006 12m', geo='US-ME-500') File "/home/savril/workspace/google-trends-csv-downloader/pyGoogleTrendsCsvDownloader.py", line 134, in get_csv myFile = open('trends_%s.csv' % '_'.join(['%s-%s' % (key, value) for (key, value) in kwargs.items()]), 'w') IOError: [Errno 2] No such file or directory: 'trends_date-1/2006 12m_geo-US-ME-500_cat-0-958.csv'

not working as of 30th may 2013

Hello the code is not working for me as of today. :(

i always get "You've exceeded your quota. Continue tomorrow..." although i can still download csv via the browser and the same account.

Maybe you could try to make it working again.

THX

yours John

Not working on Python 3.5

Hi,

I tried to port this to 3.5 and can't get it to work after porting. I keep getting the error "You have exceeded today's quota". If you have a workaround or suggestion, please let me know. I can share the code too if you want.

Thanks,

Lack of PREF cookie results in "quota exceeded" error

When attempting to download Google Trends data, the authentication portion gets through fine (after #1), but get_csv() terminates, complaining that the quota has been exceeded.

However, manually logging in with a browser and clicking on the download CSV link appears to work. It looks like we aren't sending enough cookies back for some reason. Using Curl, I managed to narrow down the necessary cookies to:

  • PREF
  • HSID
  • SID

However, it looks like we're not getting the PREF cookie at all during the login process. Very weird..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.