highlights-scraper
Advanced tools
Comparing version 0.0.2 to 0.0.4
const {scrapeHighlights} = require("../index.js"); | ||
// node example/scrape.js | ||
const URL = "https://www.goodreads.com/notes/69252350-max-heinritz"; | ||
scrapeHighlights(URL).then(highlights => console.log(highlights)); | ||
const url = "https://www.goodreads.com/notes/69252350-max-heinritz"; | ||
scrapeHighlights(url).then( | ||
highlights => console.log(highlights), | ||
error => console.error(error) | ||
); |
@@ -49,4 +49,2 @@ const {Builder, By} = require('selenium-webdriver'); | ||
return books; | ||
} catch(e) { | ||
console.error(e); | ||
} finally { | ||
@@ -53,0 +51,0 @@ await driver.quit(); |
{ | ||
"name": "highlights-scraper", | ||
"version": "0.0.2", | ||
"version": "0.0.4", | ||
"description": "Scrapes public Kindle highlights on Goodreads.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"scrape": "node cli.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/maxh/highlights-scraper" | ||
}, | ||
"author": "Max Heinritz", | ||
@@ -10,0 +14,0 @@ "license": "ISC", |
@@ -6,17 +6,25 @@ # Highlights Scraper | ||
## Usage | ||
Find your Kindle highlights URL by logging into Goodreads and clicking | ||
```js | ||
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 | ||
- 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. | ||
```js | ||
const {scrapeHighlights} = require("highlights-scraper"); | ||
### Command-line interface | ||
const URL = "https://www.goodreads.com/notes/69252350-max-heinritz"; | ||
scrapeHighlights(URL).then(highlights => console.log(highlights)); | ||
``` | ||
npm run scrape -- https://www.goodreads.com/notes/69252350-max-heinritz | ||
``` | ||
(You can toggle your individual highlights to be public or not in the web UI for | ||
a given book.) | ||
## Result format | ||
@@ -23,0 +31,0 @@ |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
4937
5
63
2
67
0