mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-06 06:36:31 +08:00
update scrapping options
This commit is contained in:
parent
8f25fe1d45
commit
c19ba65391
@ -396,7 +396,7 @@ export class CrawlerOptions extends AutoCastable {
|
||||
if (engine) {
|
||||
instance.engine = engine;
|
||||
}
|
||||
if (instance.noCache || !instance.isGeneralMarkdownRequest()) {
|
||||
if (instance.noCache || !instance.isTypicalRequest()) {
|
||||
instance.engine ??= ENGINE_TYPE.BROWSER;
|
||||
}
|
||||
|
||||
@ -489,8 +489,8 @@ export class CrawlerOptions extends AutoCastable {
|
||||
return !CONTENT_FORMAT_VALUES.has(this.respondWith);
|
||||
}
|
||||
|
||||
isGeneralMarkdownRequest() {
|
||||
if (this.respondWith !== CONTENT_FORMAT.CONTENT && this.respondWith !== CONTENT_FORMAT.MARKDOWN) {
|
||||
isTypicalRequest() {
|
||||
if (this.respondWith.includes(CONTENT_FORMAT.PAGESHOT) || this.respondWith.includes(CONTENT_FORMAT.SCREENSHOT)) {
|
||||
return false;
|
||||
}
|
||||
if (this.injectFrameScript?.length || this.injectPageScript?.length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user