mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-19 12:39:16 +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) {
|
if (engine) {
|
||||||
instance.engine = engine;
|
instance.engine = engine;
|
||||||
}
|
}
|
||||||
if (instance.noCache || !instance.isGeneralMarkdownRequest()) {
|
if (instance.noCache || !instance.isTypicalRequest()) {
|
||||||
instance.engine ??= ENGINE_TYPE.BROWSER;
|
instance.engine ??= ENGINE_TYPE.BROWSER;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,8 +489,8 @@ export class CrawlerOptions extends AutoCastable {
|
|||||||
return !CONTENT_FORMAT_VALUES.has(this.respondWith);
|
return !CONTENT_FORMAT_VALUES.has(this.respondWith);
|
||||||
}
|
}
|
||||||
|
|
||||||
isGeneralMarkdownRequest() {
|
isTypicalRequest() {
|
||||||
if (this.respondWith !== CONTENT_FORMAT.CONTENT && this.respondWith !== CONTENT_FORMAT.MARKDOWN) {
|
if (this.respondWith.includes(CONTENT_FORMAT.PAGESHOT) || this.respondWith.includes(CONTENT_FORMAT.SCREENSHOT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.injectFrameScript?.length || this.injectPageScript?.length) {
|
if (this.injectFrameScript?.length || this.injectPageScript?.length) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user