Code Monkey home page Code Monkey logo

Comments (3)

abmathewks avatar abmathewks commented on June 27, 2024

Here's an example of how I'm using it. Keys is something like baseball or football.

def GT_Daily_Run(keys):
# connect to Google
connector = pyGTrends(google_username, google_password)
# make request
connector.request_report(keys, date="today 90-d", geo="US")
# wait a random amount of time between requests to avoid bot detection
time.sleep(randint(5, 10))
# download file
connector.save_csv(path, '' + "GT_Daily" + '' + keys)

from pytrends.

dreyco676 avatar dreyco676 commented on June 27, 2024

Hmm if I try different terms I get 88days. Still not 90. I'll look into this.

from pytrends.

dreyco676 avatar dreyco676 commented on June 27, 2024

Ok I think I figured this out. Today is March 7th. If I use 'today 90-d' it actually does 2015-12-10 to 2016-03-08 which is 90days inclusive. This might be because it is already the 8th in UTC time. Google does not respect the user timezone for the today #-d.

If you are referring to blanks for the last 1-3 days Google seems to hold off on reporting those. Not much I can do.

from pytrends.

Related Issues (20)

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.