npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

highlights-scraper

v0.0.10

Published

Scrapes public Kindle highlights on Goodreads.

Downloads

37

Readme

Highlights Scraper npm version

Scrape Kindle highlights from public Goodreads pages (example).

Installation

npm install --save highlights-scraper

Usage

const {scrapeHighlights} = require("highlights-scraper");

const url = "https://www.goodreads.com/notes/69252350-max-heinritz";
scrapeHighlights(url).then(
  highlights => console.log(highlights),
  error => console.error(error)
);
  • Find your Kindle highlights URL by logging into Goodreads and clicking "Kindle Notes & Highlights" under "Your Reading Activity" in the left panel.
  • Load the URL in an incognito window to ensure the highlights you expect to be public actually are.
  • You can toggle your individual highlights to be public or not in the web UI for a given book.

Command-line interface

npm run scrape -- https://www.goodreads.com/notes/69252350-max-heinritz

Result format

[
  {
    link: string,
    title: string,
    author: string,
    highlights: [string],
  },
  ...
]

Example

[
  {
    link: 'https://www.goodreads.com/notes/19028079-a-splendid-exchange/69252350-max-heinritz?ref=abp',
    title: 'A Splendid Exchange: How Trade Shaped the World',
    author: 'William J. Bernstein',
    highlights: [
      'Although world trade grew in tandem with the technological innovations of land and sea transport, political stability was even more important.',
      'To this day, success or failure in the global marketplace depends not on size but on advanced political, legal, and financial institutions;'
    ]
  },
  {
    link: 'https://www.goodreads.com/notes/20576437-crossing-to-safety/69252350-max-heinritz?ref=abp',
    title: 'Crossing to Safety (Modern Library Classics)',
    author: 'Wallace Stegner',
    highlights: [
      'It is a relationship that has no formal shape, there are no rules or obligations or bonds as in marriage or the family, it is held together by neither law nor property nor blood, there is no glue in it but mutual liking. It is therefore rare.',
      'She’s simply incredible, the way she can organize a day. But one thing, I don’t think I ever saw her pick up one of those cute kids and give him a big squeeze, just because he’s himself, and hers, and she loves him. When we get ours, don’t let me have an agenda every time I’m with him.”',
    ],
  },
]