Created
June 4, 2020 16:24
-
-
Save shantanuo/6a99afc87d83597c1d0a50f7d6d3c110 to your computer and use it in GitHub Desktop.
Extract google search history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import json | |
with open("BrowserHistory.json", "r") as read_file: | |
developer = json.load(read_file) | |
df = pd.DataFrame(developer["Browser History"]) | |
df["UNIXTIME"] = pd.to_datetime(df["time_usec"], unit="us") | |
df = df.sort_values("UNIXTIME") | |
ndf = df[ | |
(df["favicon_url"] == "https://www.google.com/favicon.ico") | |
& (df["page_transition"] == "LINK") | |
& (df["UNIXTIME"] > "2020-06-01 09:40:00") | |
& (df["UNIXTIME"] < "2020-06-01 19:40:00") | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment