Skip to content

Commit

Permalink
Merge pull request #112 from hadynz/fix-metadata-scrape
Browse files Browse the repository at this point in the history
Fix meta data scraping regression
  • Loading branch information
hadynz authored Nov 16, 2021
2 parents 5b684b8 + 87de46f commit 65728ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-kindle-plugin",
"name": "Kindle Highlights",
"version": "1.4.0",
"version": "1.4.1",
"minAppVersion": "0.10.2",
"description": "Sync your Kindle book highlights using your Amazon login or uploading your My Clippings file",
"author": "Hady Osman",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-kindle-plugin",
"version": "1.4.0",
"version": "1.4.1",
"description": "Sync your Kindle book highlights using your Amazon login or uploading your My Clippings file",
"main": "src/index.ts",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/scraper/scrapeBookMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const parseDetailsList = ($: Root): Omit<BookMetadata, 'authorUrl'> => {
const key = $('span:first-child', currentEl)
.text()
.replace(/[\n\r]+/g, '')
.replace(':', '');
.replace(':', '')
.replace(/[^\w\s]/gi, ''); // Strip all chars except alpha numeric and spaces

const value = $('span:nth-child(2)', currentEl).text();

Expand Down

0 comments on commit 65728ad

Please sign in to comment.