diff --git a/package.json b/package.json index e461d7b..20a8b0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "neo-scraper", - "version": "0.9.1", + "version": "0.9.2", "description": "Scrape a booru-like post object from the DOM.", "type": "module", "main": "dist/index.js", diff --git a/src/engines/Moebooru.ts b/src/engines/Moebooru.ts index 32b7131..eaf6d63 100644 --- a/src/engines/Moebooru.ts +++ b/src/engines/Moebooru.ts @@ -38,7 +38,7 @@ export default class Moebooru extends ScrapeEngineBase { const matches = el.innerText.match(regex); if (matches && matches.length == 3) { // If Source element - if (matches[1] == "Source") { + if (matches[1] == "Source" && el.children.length > 0) { post.sources = [(el.children[0] as HTMLAnchorElement).href]; } // If Rating element