parent
e2867bb3ff
commit
4b48e686bc
|
|
@ -11,13 +11,13 @@ async function grabPost(): Promise<ScrapedPost | null> {
|
||||||
console.log(`Using ${loaderName} importer to scrape this page`)
|
console.log(`Using ${loaderName} importer to scrape this page`)
|
||||||
return await loader.grabPost(document);
|
return await loader.grabPost(document);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Try using the Fallback loader if no other loader can scrape this page
|
// Try using the Fallback loader if no other loader can scrape this page
|
||||||
const post = new loaders.Fallback().grabPost(document);
|
const post = new loaders.Fallback().grabPost(document);
|
||||||
if (post) {
|
if (post) {
|
||||||
return post;
|
return post;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue