mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix content not getting parsed by linkedom properly without <html> tag by replacing innerHtml with outerHtml
This commit is contained in:
parent
8f0447ed3f
commit
0cc7e84a82
2 changed files with 4 additions and 4 deletions
|
|
@ -497,7 +497,7 @@ async function retrievePage(url) {
|
|||
logRecord.finalUrl = response.url();
|
||||
logRecord.contentType = response.headers()['content-type'];
|
||||
|
||||
return { context, page, response, finalUrl: finalUrl, contentType: contentType };
|
||||
return { context, page, response, finalUrl, contentType };
|
||||
} catch (error) {
|
||||
if (lastPdfUrl) {
|
||||
return { context, page, finalUrl: lastPdfUrl, contentType: 'application/pdf' };
|
||||
|
|
@ -609,7 +609,7 @@ async function retrieveHtml(page) {
|
|||
}
|
||||
}
|
||||
});
|
||||
return document.documentElement.innerHTML;
|
||||
return document.documentElement.outerHTML;
|
||||
}, iframes);
|
||||
logRecord.puppeteerSuccess = true;
|
||||
logRecord.timing = {
|
||||
|
|
|
|||
|
|
@ -678,7 +678,7 @@ async function retrievePage(url) {
|
|||
logRecord.finalUrl = response.url();
|
||||
logRecord.contentType = response.headers()['content-type'];
|
||||
|
||||
return { context, page, response, finalUrl: finalUrl, contentType: contentType };
|
||||
return { context, page, response, finalUrl, contentType };
|
||||
} catch (error) {
|
||||
if (lastPdfUrl) {
|
||||
return { context, page, finalUrl: lastPdfUrl, contentType: 'application/pdf' };
|
||||
|
|
@ -790,7 +790,7 @@ async function retrieveHtml(page) {
|
|||
}
|
||||
}
|
||||
});
|
||||
return document.documentElement.innerHTML;
|
||||
return document.documentElement.outerHTML;
|
||||
}, iframes);
|
||||
logRecord.puppeteerSuccess = true;
|
||||
logRecord.timing = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue