ns-rss-spider 1.0.3 → 1.0.5
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.
|
@@ -59,7 +59,7 @@ var cnbeta = {
|
|
|
59
59
|
},
|
|
60
60
|
ignoreProbeImage: true,
|
|
61
61
|
getThumbs: async (items) => {
|
|
62
|
-
const res = await import_axios.default.get("
|
|
62
|
+
const res = await import_axios.default.get("http://m.cnbeta.com.tw/", {
|
|
63
63
|
responseType: "text",
|
|
64
64
|
headers: {
|
|
65
65
|
"User-Agent": import_constants.iosUA
|
|
@@ -83,6 +83,7 @@ var cnbeta = {
|
|
|
83
83
|
kv[guid] = thumb;
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
|
+
console.log("获取缩略图数据成功", Object.keys(kv).length);
|
|
86
87
|
return kv;
|
|
87
88
|
}
|
|
88
89
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/parsers/reactstatus.ts
|
|
20
|
+
var reactstatus_exports = {};
|
|
21
|
+
__export(reactstatus_exports, {
|
|
22
|
+
reactstatus: () => reactstatus
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(reactstatus_exports);
|
|
25
|
+
var reactstatus = {
|
|
26
|
+
parse: true
|
|
27
|
+
};
|
|
28
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
29
|
+
0 && (module.exports = {
|
|
30
|
+
reactstatus
|
|
31
|
+
});
|
|
@@ -22,9 +22,6 @@ __export(techrunch_exports, {
|
|
|
22
22
|
techrunch: () => techrunch
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(techrunch_exports);
|
|
25
|
-
var import_zx = require("zx");
|
|
26
|
-
var import_constants = require("../utils/constants");
|
|
27
|
-
var import_browser = require("../utils/browser");
|
|
28
25
|
var techrunch = {
|
|
29
26
|
parse: true,
|
|
30
27
|
fetcher: "http",
|
|
@@ -32,30 +29,28 @@ var techrunch = {
|
|
|
32
29
|
const el = $(".article-content");
|
|
33
30
|
return el;
|
|
34
31
|
},
|
|
35
|
-
ignoreProbeImage: true
|
|
36
|
-
getThumbs: async (items) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return void 0;
|
|
58
|
-
}
|
|
32
|
+
ignoreProbeImage: true
|
|
33
|
+
//getThumbs: async (items) => {
|
|
34
|
+
// const url = 'https://techcrunch.com/';
|
|
35
|
+
// const initialState = await runInPage(url, async (page) => {
|
|
36
|
+
// const data = await page.evaluate(async () => (window as any).tc_app_data);
|
|
37
|
+
// return data;
|
|
38
|
+
// } , {
|
|
39
|
+
// userAgent: iosUA,
|
|
40
|
+
// }).catch(e => {
|
|
41
|
+
// console.error(chalk.red(`获取 ${url} 错误`), e);
|
|
42
|
+
// });
|
|
43
|
+
// if (initialState?.entities?.posts?.length) {
|
|
44
|
+
// const idThumbKv = (initialState.entities.posts as Array<any>).reduce<Record<string, string>>((prev, item) => {
|
|
45
|
+
// if (item?.guid?.rendered && item.jetpack_featured_media_url) {
|
|
46
|
+
// prev[item.guid.rendered] = item.jetpack_featured_media_url;
|
|
47
|
+
// }
|
|
48
|
+
// return prev;
|
|
49
|
+
// }, {});
|
|
50
|
+
// return idThumbKv;
|
|
51
|
+
// }
|
|
52
|
+
// return undefined;
|
|
53
|
+
//}
|
|
59
54
|
};
|
|
60
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
56
|
0 && (module.exports = {
|