Skip to content

Instantly share code, notes, and snippets.

@KMurphs
Last active September 6, 2021 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KMurphs/ee46db302901e631c7d1dc63d18ff446 to your computer and use it in GitHub Desktop.
Save KMurphs/ee46db302901e631c7d1dc63d18ff446 to your computer and use it in GitHub Desktop.
Scrappe History from Google Chrome
Array.from(document.querySelector("#history-app").shadowRoot.querySelector("#history").shadowRoot.querySelectorAll("history-item")).filter((u,i) => i < 17).map(u => u.shadowRoot.querySelector("a").href)
@KMurphs
Copy link
Author

KMurphs commented Sep 6, 2021

Why:

  • When researching a subject I might open a lot of tabs. This allows me to get all these articles and eventually list them as resources for whatever I'm trying to do.

To Use:

  • Open Chrome History with all the articles to be scrapped.
  • Count how many articles to scrappe, update the filter callback function .filter((u,i) => i < {your-number-here})
  • Open Dev Console (Press F12)
  • Paste script in Console and Press Enter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment