Giter VIP home page Giter VIP logo

Comments (3)

pedrofaustino avatar pedrofaustino commented on July 29, 2024

Hi @hershiyer
Unfortunately I'm not actively supporting the code. If you've ported to 3.5, please don't hesitate to make a pull request since it seems the code is working.
That error message comes from a very "dumb" check on the return response on L139. I propose you print out all the headers before L141 to understand if that's indeed the error reported by Google.

from google-trends-csv-downloader.

hershiyer avatar hershiyer commented on July 29, 2024

Hi @pedrofaustino ,

Thanks for the reply. I did check the content in r.info() on L139 and it seems to be different than what we get in the original version which runs on 2.7. I have included the data below for both versions. I am not able to figure out why I am seeing different responses. If you can think of something I can check, please let me know.

-------------------3.5---------------------------------------------------------------------
Content-Type: text/html; charset=utf-8
Strict-Transport-Security: max-age=10893354; includeSubDomains
X-Frame-Options: DENY
Cache-control: no-cache, no-store
Pragma: no-cache
Expires: Mon, 01-Jan-1990 00:00:00 GMT
P3P: CP="This is not a P3P policy! See https://support.google.com/accounts/answer/151657?hl=en for more info."
Content-Encoding: gzip
Date: Thu, 26 Nov 2015 05:19:45 GMT
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Server: GSE
Set-Cookie: GoogleAccountsLocale_session=en; Path=/; Secure; HttpOnly
Set-Cookie: GAPS=1:Ca-VdJS6vxDFrK05IaseVdJAgpJhEw:6OMo9BVgBQqpOG4J;Path=/;Expires=Sat, 25-Nov-2017 05:19:45 GMT;Secure;HttpOnly;Priority=HIGH
Set-Cookie: SID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: HSID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: SSID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: APISID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: SAPISID=EXPIRED;Domain=.google.com;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: LSID=EXPIRED;Path=/;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Set-Cookie: NID=73=g5KnYT-Y1jT43_DDTC3Q874RFPyvVf-xE31uhTbN_-HW0TpgMXkUQph4FGu5Ee33OwPEZVxdoZEWFRxRiHhTXIYsRLZKx9ATaNGMD9eEy55OGynSft7bAYqsAdOODPQb;Domain=.google.com;Path=/;Expires=Fri, 27-May-2016 05:19:45 GMT;HttpOnly
Set-Cookie: TAID=EXPIRED;Domain=.google.com;Path=/ads/measurement;Expires=Mon, 01-Jan-1990 00:00:00 GMT
Alternate-Protocol: 443:quic,p=1
Alt-Svc: quic=":443"; ma=604800; v="30,29,28,27,26,25"
Connection: close
Transfer-Encoding: chunked

----------------------------2.7-----------------------------------------------------
Content-Type: text/csv; charset=UTF-8
Content-Disposition: Attachment; Filename="report.csv"
Content-Encoding: gzip
Transfer-Encoding: chunked
Date: Thu, 26 Nov 2015 06:38:05 GMT
Expires: Thu, 26 Nov 2015 06:38:05 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
Server: GSE
Set-Cookie: S=izeitgeist-ad-metrics=HGSkPcf5NYc; Domain=.google.com; Path=/; HttpOnly
Connection: close

from google-trends-csv-downloader.

pedrofaustino avatar pedrofaustino commented on July 29, 2024

The idea of the script is that it allows the download of a CSV file, which would be downloaded in any case with the help of a browser if it weren't for the script. The response that you're getting with 3.5 is text/html so it's not a CSV. Maybe an idea to further troubleshoot would be to save the response body to a file and then open it on a browser?

from google-trends-csv-downloader.

Related Issues (9)

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.