mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #925 from omnivore-app/fix/scrapingbee-url
Create a scrapingbee url when using the fallback
This commit is contained in:
commit
6b1f21398e
1 changed files with 3 additions and 3 deletions
|
|
@ -358,18 +358,18 @@ async function fetchContent(req, res) {
|
|||
|
||||
// fallback to scrapingbee
|
||||
const sbResult = await fetchContentWithScrapingBee(url);
|
||||
const url = finalUrl || sbResult.url;
|
||||
const sbUrl = finalUrl || sbResult.url;
|
||||
const content = sbResult.domContent;
|
||||
logRecord.fetchContentTime = Date.now() - functionStartTime;
|
||||
|
||||
const apiResponse = await sendCreateArticleMutation(userId, {
|
||||
url,
|
||||
url: sbUrl,
|
||||
articleSavingRequestId,
|
||||
preparedDocument: {
|
||||
document: content,
|
||||
pageInfo: {
|
||||
title: sbResult.title,
|
||||
canonicalUrl: url,
|
||||
canonicalUrl: sbUrl,
|
||||
},
|
||||
},
|
||||
skipParsing: !content,
|
||||
|
|
|
|||
Loading…
Reference in a new issue