ns-rss-spider 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -55,6 +55,13 @@ async function parseContent($, $element, item, strategy) {
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
for (let item2 of srcs) {
|
|
58
|
+
if (strategy == null ? void 0 : strategy.ignoreProbeImage) {
|
|
59
|
+
images.push({
|
|
60
|
+
url: item2.src,
|
|
61
|
+
title: item2.title
|
|
62
|
+
});
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
58
65
|
console.log(import_zx.chalk.green("正在解析图片", item2.src));
|
|
59
66
|
const result = await (0, import_probe_image_size.default)(item2.src, {
|
|
60
67
|
rejectUnauthorized: false,
|
package/dist/cjs/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface ParseStrategy {
|
|
|
10
10
|
getContentElementFromArticle?: (aritcle: CheerioAPI) => Cheerio<AnyNode>;
|
|
11
11
|
getContentFromHtml?: ($: CheerioAPI, node: Cheerio<AnyNode>) => string;
|
|
12
12
|
getExtraItems?: ($: CheerioAPI, current: RichArticle, item: Item) => Promise<Record<string, any>>;
|
|
13
|
+
ignoreProbeImage?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export interface SimpleArticle {
|
|
15
16
|
type: 'simple';
|