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,
@@ -42,7 +42,8 @@ var cnbeta = {
42
42
  description: rich.description.replace(`
43
43
  阅读全文`, "")
44
44
  };
45
- }
45
+ },
46
+ ignoreProbeImage: true
46
47
  };
47
48
  // Annotate the CommonJS export names for ESM import in node:
48
49
  0 && (module.exports = {
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ns-rss-spider",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",