Skip to content

Commit 14e9cc3

Browse files
possible fix : page count bug on PDL
1 parent da67668 commit 14e9cc3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/helper.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ module.exports = {
114114
const keys = $(".ubhypers");
115115
const values = $(".dhypers");
116116
const downloadPdfLink = $("#downloadpdf a")[0]?.attribs.href;
117+
let pagesLabel = $(".ubhypers:contains('Pages')");
118+
let pagesValue = pagesLabel.parent().next().find(".dhypers").text();
117119
let contentType = "zip";
118120
function addOtherMetaData(limit, keys, values, PNdetails) {
119121
let value;
@@ -187,8 +189,8 @@ module.exports = {
187189
PNdetails.pdfUrl = `http://www.panjabdigilib.org/webuser/searches/${downloadPdfLink}`;
188190
}
189191
PNdetails.contentType = contentType;
192+
PNdetails.Pages = pagesValue;
190193
delete PNdetails[""];
191-
192194
return PNdetails;
193195
},
194196

0 commit comments

Comments
 (0)