Skip to content

Commit

Permalink
dteviot#1346 - Update ChaleuriaParser.js to handle multiple formats
Browse files Browse the repository at this point in the history
Bugfix to handle multiple page formats used by paid content.
  • Loading branch information
Kiradien authored Jun 14, 2024
1 parent 97dca7c commit cdae7ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/js/parsers/ChaleuriaParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ class ChaleuriaParser extends WordpressBaseParser{
}

findContent(dom) {
return dom.querySelector(".entry-content");
return dom.querySelector(".entry-content, div.elementor-widget-theme-post-content div.elementor-widget-container");
}

extractTitleImpl(dom) {
return dom.querySelector("h1.entry-title");
return dom.querySelector("h1.entry-title, h1.elementor-heading-title");
}

findChapterTitle(dom) {
return dom.querySelector("h1.entry-title");
return dom.querySelector("h1.entry-title, h1.elementor-heading-title");
}

getInformationEpubItemChildNodes(dom) {
return [...dom.querySelectorAll(".entry-content p")];
return [...dom.querySelectorAll(".entry-content p, div.elementor-widget-theme-post-content div.elementor-widget-container p")];
}

cleanInformationNode(node) {
Expand Down

0 comments on commit cdae7ca

Please sign in to comment.