GithubHelp home page GithubHelp logo

onarf / search2csv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theopolisme/search2csv

0.0 2.0 0.0 100 KB

Export your Google search history as a CSV

License: MIT License

Python 100.00%

search2csv's Introduction

search2csv

Export your Google search history as a CSV

Google just added the ability to export your complete search history as JSON. This is super cool! Unfortunately, the exported form is a series of JSON files that aren't very easy to work with. search2csv concatenates them all into a single CSV containing just timestamps and searches, so you can get to the fun part... analyzing it.

Usage

Having trouble with UnicodeEncodeErrors? This is probably because Python's CSV module doesn't support Unicode. Try pip install unicodecsv and then run the script again.

First, download your Google Search History by following these instructions. Unzip the file, and you should be left with a "Searches" directory, inside of which there should be another "Searches" directory. Run search2csv.py, passing in the path to the second Searches directory, and you're all done:

$ python search2csv.py /path/to/Searches/Searches /path/to/output.csv

Slightly more detailed:

$ python search2csv.py -h
usage: search2csv.py [-h] source [output]

positional arguments:
  source      Directory of Search JSON files to convert
  output      Where to write CSV output (default: stdout)

optional arguments:
  -h, --help  show this help message and exit

Output

search2csv produces a CSV file in the following format, ordered chronologically:

timestamp,query
2015-04-20T14:09:56.712142,example query
2015-04-20T14:40:37.117257,example query 2
...

Happy analyzing!

search2csv's People

Contributors

theopolisme avatar

Watchers

James Cloos avatar Frano I. avatar

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.