Skip to content

Commit

Permalink
feat: ign
Browse files Browse the repository at this point in the history
  • Loading branch information
Soontao committed Aug 10, 2024
1 parent b3de2a8 commit 0ceb86f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ const value = {
debugInfo: envs.DEBUG_INFO || true,
disallowRobot: envs.DISALLOW_ROBOT !== "0" && envs.DISALLOW_ROBOT !== "false",
titleLengthLimit: parseInt(envs.TITLE_LENGTH_LIMIT) || 150,
maxOldItemPubDateInDays: parseInt(envs.MAX_OLD_ITEM_PUB_DATE_IN_DAYS) || 1,
maxOldItemPubDateInDays: parseInt(envs.MAX_OLD_ITEM_PUB_DATE_IN_DAYS ?? 1),
redis: {
url: envs.REDIS_URL ?? envs.RSSHUB_REDIS_URL ?? "redis://localhost:6379/",
},
fsCache: {
basePath: process.env?.FS_CACHE_DIR ?? os.tmpdir(),
prefix: process.env?.FS_CACHE_PREFIX ?? "rsshub_fs_cache_"
prefix: process.env?.FS_CACHE_PREFIX ?? "rsshub_fs_cache_",
},
nodeName: envs.NODE_NAME,
suffix: envs.SUFFIX,
Expand Down
11 changes: 11 additions & 0 deletions lib/customize/ign/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const { createGenericEndpoint, linkExtractors, contentExtractors } = require("@/utils/common-utils");

const endpoint = createGenericEndpoint({
endpointPath: "/ign",
feedTitle: "IGN中国",
entryUrl: "https://www.ign.com.cn/article/review",
linkExtractor: linkExtractors.domAElementLinkExtractor(".broll article a"),
contentExtractor: contentExtractors.js,
});

module.exports = endpoint;

0 comments on commit 0ceb86f

Please sign in to comment.