diff --git a/README.md b/README.md
index fc631a953..923f30a71 100644
--- a/README.md
+++ b/README.md
@@ -32,12 +32,12 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以
### Special Sponsors
### Sponsors
-[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [NeverBehave](https://never.pet/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
+[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
[](https://docs.rsshub.app/en/support/)
diff --git a/assets/radar-rules.js b/assets/radar-rules.js
index 5f4e63625..c712f1769 100644
--- a/assets/radar-rules.js
+++ b/assets/radar-rules.js
@@ -1829,6 +1829,12 @@
source: '/mp/homepage',
target: (params, url) => `/wechat/mp/homepage/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('hid')}/${new URL(url).searchParams.get('cid') ? new URL(url).searchParams.get('cid') : ''}`,
},
+ {
+ title: '微信公众号话题',
+ docs: 'https://docs.rsshub.app/new-media.html#wei-xin-gong-zhong-hao-wen-zhang-hua-ti-tag',
+ source: '/mp/appmsgalbum',
+ target: (params, url) => `/wechat/mp/msgalbum/${new URL(url).searchParams.get('__biz')}/${new URL(url).searchParams.get('album_id')}`,
+ },
],
egame: [
{
@@ -2251,9 +2257,9 @@
},
],
},
- 'manxiaosi.com': {
+ 'pknbc.com': {
_name: '漫小肆',
- '.': [
+ www: [
{
title: '漫画更新',
docs: 'https://docs.rsshub.app/anime.html#man-xiao-si',
@@ -2278,6 +2284,29 @@
target: '/wenxuecity/blog/:id',
},
],
+ bbs: [
+ {
+ title: '最新主题',
+ docs: 'https://docs.rsshub.app/bbs.html#wen-xue-cheng-zui-xin-zhu-ti',
+ source: '/:cat',
+ target: '/wenxuecity/bbs/:cat',
+ },
+ {
+ title: '最新主题 - 精华区',
+ docs: 'https://docs.rsshub.app/bbs.html#wen-xue-cheng-zui-xin-zhu-ti',
+ source: '/:cat',
+ target: '/wenxuecity/bbs/:cat/1',
+ },
+ {
+ title: '最热主题',
+ docs: 'https://docs.rsshub.app/bbs.html#wen-xue-cheng-zui-re-zhu-ti',
+ source: '/?cid=*',
+ target: (params, url, document) => {
+ const cid = document && new URL(document.location).searchParams.get('cid');
+ return `/wenxuecity/hot/${cid}`;
+ },
+ },
+ ],
},
'buaq.net': {
_name: '不安全资讯',
diff --git a/docs/README.md b/docs/README.md
index 97ea97466..fc1ae2b22 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -26,12 +26,10 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以
### Special Sponsors
-
-
### Sponsors
-[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [NeverBehave](https://never.pet/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
+[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
[](/support/)
diff --git a/docs/bbs.md b/docs/bbs.md
index 9458bd32c..718394c7f 100644
--- a/docs/bbs.md
+++ b/docs/bbs.md
@@ -357,6 +357,16 @@ pageClass: routes
## 水木社区
+### 分区文章
+
+
+
+| 社区管理 | 国内院校 | 休闲娱乐 | 五湖四海 | 游戏运动 | 社会信息 | 知性感性 | 文化人文 | 学术科学 | 电脑技术 |
+| --------- | ---------- | ------------- | -------- | -------- | -------- | -------- | -------- | -------- | ---------- |
+| community | university | entertainment | location | game | society | romance | culture | science | technology |
+
+
+
### 用户文章
@@ -405,6 +415,14 @@ pageClass: routes
+### 最热主题
+
+
+
+### 最新主题
+
+
+
## 小米社区
### 圈子
diff --git a/docs/en/README.md b/docs/en/README.md
index ee668f5bd..82ce8a466 100644
--- a/docs/en/README.md
+++ b/docs/en/README.md
@@ -24,12 +24,10 @@ RSSHub delivers millions of contents aggregated from all kinds of sources, our v
### Special Sponsors
-
-
### Sponsors
-[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [NeverBehave](https://never.pet/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
+[Sayori Studio](https://t.me/SayoriStudio) . [Sion Kazama](https://blog.sion.moe) . [琚致远](https://www.shaoyaoju.org/) . [Rolly RSS 阅读器](https://www.coolapk.com/apk/239500) . [mokeyjay](https://www.mokeyjay.com/) . [tkaray](https://rayray.moe/) . [萌开源联盟](https://www.moeunion.com) . [hooke007](https://github.com/hooke007/MPV_lazy) . [feeds.pub](https://feeds.pub)
[](/en/support/)
diff --git a/docs/en/multimedia.md b/docs/en/multimedia.md
index c2304c013..4430883ca 100644
--- a/docs/en/multimedia.md
+++ b/docs/en/multimedia.md
@@ -76,6 +76,10 @@ Official RSS: https://eztv.io/ezrss.xml
+### Users
+
+
+
### Verified amateur / Model
diff --git a/docs/en/shopping.md b/docs/en/shopping.md
index ac409701b..e3f36ab0e 100644
--- a/docs/en/shopping.md
+++ b/docs/en/shopping.md
@@ -10,6 +10,32 @@ pageClass: routes
+## AppSales
+
+### Apps
+
+
+
+Category
+
+| Highlights | Active Sales | Now Free | Watchlist Charts |
+| ---------- | ------------ | -------- | ---------------- |
+| highlights | activesales | nowfree | mostwanted |
+
+Time
+
+| the latest 24 hours | the latest week | all the time |
+| ------------------- | --------------- | ------------ |
+| 24h | week | alltime |
+
+::: tip Tip
+
+Parameter `time` only works when `mostwanted` is chosen as the category.
+
+:::
+
+
+
## Guiltfree.pl
### Onsale
diff --git a/docs/game.md b/docs/game.md
index c81153901..fcbc1d0f9 100644
--- a/docs/game.md
+++ b/docs/game.md
@@ -15,7 +15,7 @@ pageClass: routes
| 新闻 | 攻略 | 下载资源 | 区块链快讯 |
-| ---- | ---- | -------- | ---------- |
+|------|------|----------|------------|
| news | gl | resource | blockchain |
@@ -30,6 +30,10 @@ pageClass: routes
+### 主題
+
+
+
## a9vgNews 游戏新闻
### a9vgNews 游戏新闻
@@ -81,19 +85,19 @@ pageClass: routes
支持的主机平台:
| PS 4 | Xbox One | Switch | PC | Wii U | 3DS | PS Vita | iOS |
-| ---- | -------- | ------ | -- | ----- | --- | ------- | --- |
+|------|----------|--------|----|-------|-----|---------|-----|
| ps4 | xboxone | switch | pc | wii-u | 3ds | vita | ios |
发行类型,默认为 `new`:
| 新游发行 | 即将发行 | 全部 |
-| -------- | -------- | ---- |
+|----------|----------|------|
| new | coming | all |
排序类型,默认为`date`:
| 日期 | Metacritic 评分 | 用户评分 |
-| ---- | --------------- | --------- |
+|------|-----------------|-----------|
| date | metascore | userscore |
@@ -186,7 +190,7 @@ pageClass: routes
| 游戏代码 | 游戏名称 |
-| -------- | ------------ |
+|----------|----------|
| GTAV | 侠盗猎车手 5 |
| RDR2 | 荒野大镖客 2 |
@@ -233,7 +237,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 全部 | 精华 | 官方 |
-| ---- | ----- | -------- |
+|------|-------|----------|
| all | elite | official |
### 游戏更新
@@ -245,7 +249,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 最新 | 最热 | 游戏时长 |
-| ------ | ---- | -------- |
+|--------|------|----------|
| update | hot | spent |
## 二柄 APP
@@ -275,7 +279,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 精选 | 海外 | 原创 | PS4 | Xboxone | PC | Switch | 掌机 | 手游 | 新闻 | 评测 | 文化 | 视频 | 音频 | 折扣 |
-| ---------- | -------- | ------- | --- | ------- | -- | ------ | -------- | ---------- | ---- | ------ | ------- | ----- | ----- | -------- |
+|------------|----------|---------|-----|---------|----|--------|----------|------------|------|--------|---------|-------|-------|----------|
| choiceness | overseas | orignal | ps4 | xboxone | pc | switch | handheld | mobilegame | news | review | culture | video | audio | discount |
@@ -301,11 +305,11 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 主页资讯 | 炉石传说 | 万智牌 | 昆特牌 | 游戏王 | 电子游戏 | 手机游戏 | 桌面游戏 |
-| -------- | -------- | ------ | ------ | ------ | -------- | -------- | -------- |
+|----------|----------|--------|--------|--------|----------|----------|----------|
| 1 | 2 | 3 | 14 | 16 | 4 | 22 | 9 |
| 影之诗 | Artifact | 玩家杂谈 | 营地电台 | 2047 | 魂武 |
-| ------ | -------- | -------- | -------- | ---- | ---- |
+|--------|----------|----------|----------|------|------|
| 17 | 67 | 21 | 5 | 62 | 68 |
@@ -317,7 +321,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 最新公告 | 版本信息 | 祈愿信息 | 活动介绍 |
-| -------- | -------- | -------- | -------- |
+|----------|----------|----------|----------|
| new | version | gach | event |
@@ -327,7 +331,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 最新 | 动态 | 公告 | 活动 | 补给 |
-| ------ | ---- | ------ | -------- | -------- |
+|--------|------|--------|----------|----------|
| latest | news | notice | activity | strategy |
@@ -371,7 +375,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| Steam | PlatStation4 | Switch |
-| ----- | ------------ | ------ |
+|-------|--------------|--------|
| pc | ps4 | switch |
@@ -393,7 +397,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 趣囧时间 | 游民影院 | 游观天下 | 壁纸图库 | 游民盘点 | 游民福利 |
-| -------- | -------- | -------- | -------- | -------- | -------- |
+|----------|----------|----------|----------|----------|----------|
| qysj | ymyy | ygtx | bztk | ympd | ymfl |
@@ -405,7 +409,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| Steam 最新折扣 | Steam 热门游戏折扣 | Steam 热门中文游戏折扣 | Steam 历史低价 | Steam 中文游戏历史低价 |
-| -------------- | ------------------ | ---------------------- | -------------- | ---------------------- |
+|----------------|--------------------|------------------------|----------------|------------------------|
| new | hot | hot_chinese | low | low_chinese |
@@ -431,7 +435,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 推游 | 游戏史 | 大事件 | 文化 | 趣闻 | 经典回顾 |
-| --------- | ------- | ------ | ------- | ---- | -------- |
+|-----------|---------|--------|---------|------|----------|
| recommend | history | big | culture | news | retro |
@@ -449,7 +453,7 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的
| 新闻 | 公告 | 活动 | 广告 | 所有 |
-| ---- | -------- | ------ | --------- | ---- |
+|------|----------|--------|-----------|------|
| news | announce | events | advertise | all |
## きららファンタジア|奇拉拉幻想曲
diff --git a/docs/multimedia.md b/docs/multimedia.md
index 9bb9cbf04..50cb939d5 100644
--- a/docs/multimedia.md
+++ b/docs/multimedia.md
@@ -279,6 +279,10 @@ pageClass: routes
+### 用户
+
+
+
### 素人(Verified amateur /model)
diff --git a/docs/new-media.md b/docs/new-media.md
index 810f39eeb..40c029561 100644
--- a/docs/new-media.md
+++ b/docs/new-media.md
@@ -1277,6 +1277,14 @@ area 分区选项
+### 公众号文章话题 Tag
+
+
+
+一些公众号(如看理想)会在微信文章里添加 Tag ,点入 Tag 的链接如 ,其中`biz` 为 `MzA3MDM3NjE5NQ==`,`aid` 为 `1375870284640911361`。
+
+
+
### 公众平台系统公告栏目
diff --git a/docs/other.md b/docs/other.md
index ca3d5148e..0e86ecb49 100644
--- a/docs/other.md
+++ b/docs/other.md
@@ -247,7 +247,7 @@ type 为 all 时,category 参数不支持 cost 和 free
### 最近更新
-
+
## 爱发电
diff --git a/docs/shopping.md b/docs/shopping.md
index 1a9403887..5305f8201 100644
--- a/docs/shopping.md
+++ b/docs/shopping.md
@@ -10,6 +10,32 @@ pageClass: routes
+## AppSales
+
+### Apps
+
+
+
+分类
+
+| Highlights | Active Sales | Now Free | Watchlist Charts |
+| ---------- | ------------ | -------- | ---------------- |
+| highlights | activesales | nowfree | mostwanted |
+
+时间
+
+| 最近一天 | 最近一周 | 所有时间 |
+| -------- | -------- | -------- |
+| 24h | week | alltime |
+
+::: tip 提示
+
+参数 `time` 仅在选择 `mostwanted` 作为分类的时候有效。
+
+:::
+
+
+
## Furstar
### 最新售卖角色列表
diff --git a/docs/university.md b/docs/university.md
index 6fd571989..3f6a20ac8 100644
--- a/docs/university.md
+++ b/docs/university.md
@@ -1766,11 +1766,11 @@ type 列表:
### 设计与建筑学院
-
+
-| 学术科研 | 学院新闻 | 公告通知 | 学术交流 |
-| -------- | -------- | -------- | -------- |
-| 5 | 16 | 18 | 20 |
+| 学院新闻 | 公告通知 | 学术交流 |
+| -------- | -------- | -------- |
+| 16 | 18 | 20 |
diff --git a/lib/router.js b/lib/router.js
index f6e74d18a..84fbb9f7a 100644
--- a/lib/router.js
+++ b/lib/router.js
@@ -306,6 +306,7 @@ router.get('/konachan.net/post/popular_recent/:period', require('./routes/konach
router.get('/pornhub/category/:caty', require('./routes/pornhub/category'));
router.get('/pornhub/search/:keyword', require('./routes/pornhub/search'));
router.get('/pornhub/category_url/:url?', require('./routes/pornhub/category_url'));
+router.get('/pornhub/users/:username', require('./routes/pornhub/users'));
router.get('/pornhub/model/:username/:sort?', require('./routes/pornhub/model'));
router.get('/pornhub/pornstar/:username/:sort?', require('./routes/pornhub/pornstar'));
@@ -501,6 +502,7 @@ router.get('/wechat/uread/:userid', require('./routes/tencent/wechat/uread'));
router.get('/wechat/ershicimi/:id', require('./routes/tencent/wechat/ershcimi'));
router.get('/wechat/wjdn/:id', require('./routes/tencent/wechat/wjdn'));
router.get('/wechat/mp/homepage/:biz/:hid/:cid?', require('./routes/tencent/wechat/mp'));
+router.get('/wechat/mp/msgalbum/:biz/:aid', require('./routes/tencent/wechat/msgalbum'));
// All the Flight Deals
router.get('/atfd/:locations/:nearby?', require('./routes/atfd/index'));
@@ -2173,6 +2175,7 @@ router.get('/dengekionline/:type?', require('./routes/dengekionline/new'));
// 4Gamers
router.get('/4gamers/category/:category', require('./routes/4gamers/category'));
router.get('/4gamers/tag/:tag', require('./routes/4gamers/tag'));
+router.get('/4gamers/topic/:topic', require('./routes/4gamers/topic'));
// 大麦网
router.get('/damai/activity/:city/:category/:subcategory/:keyword?', require('./routes/damai/activity'));
@@ -3095,6 +3098,7 @@ router.get('/telecompaper/news/:caty/:year?/:country?/:type?/:keyword?', require
// 水木社区
router.get('/newsmth/account/:id', require('./routes/newsmth/account'));
+router.get('/newsmth/section/:section', require('./routes/newsmth/section'));
// Kotaku
router.get('/kotaku/story/:type', require('./routes/kotaku/story'));
@@ -3126,7 +3130,8 @@ router.get('/nasa/apod-ncku', require('./routes/nasa/apod-ncku'));
router.get('/nasa/apod-cn', require('./routes/nasa/apod-cn'));
// 爱Q生活网
-router.get('/iqshw/latest', require('./routes/iqshw/latest'));
+router.get('/iqshw/latest', require('./routes/3k8/latest'));
+router.get('/3k8/latest', require('./routes/3k8/latest'));
// JustRun
router.get('/justrun', require('./routes/justrun/index'));
@@ -3163,8 +3168,10 @@ router.get('/mingjian', require('./routes/mingjian/index'));
// hentaimama
router.get('/hentaimama/videos', require('./routes/hentaimama/videos'));
-// 文学城博客
+// 文学城
router.get('/wenxuecity/blog/:id', require('./routes/wenxuecity/blog'));
+router.get('/wenxuecity/bbs/:cat/:elite?', require('./routes/wenxuecity/bbs'));
+router.get('/wenxuecity/hot/:cid', require('./routes/wenxuecity/hot'));
// 不安全
router.get('/buaq', require('./routes/buaq/index'));
@@ -3209,4 +3216,7 @@ router.get('/1x/:type?/:caty?', require('./routes/1x/index'));
// CGTN
router.get('/cgtn/most/:type?/:time?', require('./routes/cgtn/most'));
+// AppSales
+router.get('/appsales/:caty?/:time?', require('./routes/appsales/index'));
+
module.exports = router;
diff --git a/lib/routes/iqshw/latest.js b/lib/routes/3k8/latest.js
similarity index 95%
rename from lib/routes/iqshw/latest.js
rename to lib/routes/3k8/latest.js
index 28eb7deac..7c72bd865 100644
--- a/lib/routes/iqshw/latest.js
+++ b/lib/routes/3k8/latest.js
@@ -3,7 +3,7 @@ const cheerio = require('cheerio');
const iconv = require('iconv-lite');
module.exports = async (ctx) => {
- const rootUrl = 'https://www.iqshw.com';
+ const rootUrl = 'https://www.3k8.com';
const currentUrl = `${rootUrl}/post/new_100/`;
const response = await got({
method: 'get',
@@ -13,7 +13,7 @@ module.exports = async (ctx) => {
const $ = cheerio.load(iconv.decode(response.data, 'gb2312'));
const list = $('ul.list-item li')
- .slice(0, 15)
+ .slice(0, 10)
.map((_, item) => {
item = $(item);
const a = item.find('a');
diff --git a/lib/routes/4gamers/tag.js b/lib/routes/4gamers/tag.js
index cda07e1e6..bc9878bc2 100644
--- a/lib/routes/4gamers/tag.js
+++ b/lib/routes/4gamers/tag.js
@@ -7,7 +7,7 @@ module.exports = async (ctx) => {
const list = response.data.data.results;
ctx.state.data = {
- title: `4Gamers- #${tag}`,
+ title: `4Gamers - #${tag}`,
link: `https://www.4gamers.com.tw/news/tag/${encodeURIComponent(tag)}`,
item: list.map((item) => ({
title: item.title,
diff --git a/lib/routes/4gamers/topic.js b/lib/routes/4gamers/topic.js
new file mode 100644
index 000000000..abad24d4e
--- /dev/null
+++ b/lib/routes/4gamers/topic.js
@@ -0,0 +1,20 @@
+const got = require('@/utils/got');
+
+module.exports = async (ctx) => {
+ const topic = ctx.params.topic;
+
+ const response = await got.get(`https://www.4gamers.com.tw/site/api/news/option-cfg/${topic}?pageSize=25`);
+ const list = response.data.data.results;
+
+ ctx.state.data = {
+ title: `4Gamers - ${topic}`,
+ link: `https://www.4gamers.com.tw/news/option-cfg/${topic}`,
+ item: list.map((item) => ({
+ title: item.title,
+ author: item.author.nickname,
+ description: `
${item.intro}
`,
+ pubDate: new Date(item.createPublishedAt * 1),
+ link: item.canonicalUrl,
+ })),
+ };
+};
diff --git a/lib/routes/appsales/index.js b/lib/routes/appsales/index.js
new file mode 100644
index 000000000..403b1a85c
--- /dev/null
+++ b/lib/routes/appsales/index.js
@@ -0,0 +1,66 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ ctx.params.caty = ctx.params.caty || 'highlights';
+ ctx.params.time = ctx.params.time || '24h';
+
+ const times = ['24h', 'week', 'alltime'];
+ const rootUrl = `https://www.app-sales.net/${ctx.params.caty}/#!`;
+ const response = await got({
+ method: 'get',
+ url: rootUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ if (ctx.params.caty === 'mostwanted') {
+ times.forEach((i) => {
+ if (i !== ctx.params.time) {
+ $(`#charts-${i}`).remove();
+ }
+ });
+ }
+
+ $('i,img.play-icon-small').remove();
+
+ const items = $('div.sale-list-item')
+ .map((_, item) => {
+ item = $(item);
+
+ const icon = item.find('div.app-icon').html();
+ const name = item.find('p.app-name').text();
+ const developer = item.find('p.app-dev').text();
+ const oldPrice = item.find('div.price-old').text();
+ const newPrice = item.find('div.price-new').text();
+ const discount = item.find('div.price-disco').text();
+ const rating = item.find('p.rating').text();
+ const downloads = item.find('p.downloads').text();
+ const bookmarks = item.find('p.bookmarks').text();
+
+ const description =
+ `${icon}${name}
` +
+ `| Developer | ${developer} |
` +
+ `| Bookmarks | ${bookmarks} |
` +
+ (rating ? `| Rating | ${rating} |
` : '') +
+ (downloads ? `| Downloads | ${downloads} |
` : '') +
+ (discount ? `| Discount | ${discount} |
` : '') +
+ (oldPrice ? `| Old Price | ${oldPrice} |
` : '') +
+ (newPrice ? `| New Price | ${newPrice} |
` : '') +
+ '
';
+
+ return {
+ title: `${name} ${newPrice ? '[' + newPrice + ']' : ''}`,
+ link: item.find('a.waves-effect').attr('href'),
+ description,
+ author: developer,
+ };
+ })
+ .get();
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: rootUrl,
+ item: items,
+ };
+};
diff --git a/lib/routes/coolapk/dyh.js b/lib/routes/coolapk/dyh.js
index eeb46e3da..e8419f484 100644
--- a/lib/routes/coolapk/dyh.js
+++ b/lib/routes/coolapk/dyh.js
@@ -27,8 +27,7 @@ module.exports = async (ctx) => {
if (item.type === 12) {
// 图文内容
return utils.parseTuwen(item, ctx);
- } else if (item.type === 0) {
- // 动态
+ } else if (String(item.type) in utils.dynamicTpye) {
return utils.parseDongtai(item, ctx);
} else {
return null;
diff --git a/lib/routes/coolapk/huati.js b/lib/routes/coolapk/huati.js
index 0757cc34c..804b46cb9 100644
--- a/lib/routes/coolapk/huati.js
+++ b/lib/routes/coolapk/huati.js
@@ -16,8 +16,7 @@ module.exports = async (ctx) => {
if (item.type === 12) {
// 图文内容
return utils.parseTuwen(item, ctx);
- } else if (item.type === 0 || item.type === 20) {
- // 0:动态内容,20:交易动态
+ } else if (String(item.type) in utils.dynamicTpye) {
return utils.parseDongtai(item, ctx);
} else {
return null;
diff --git a/lib/routes/coolapk/userDynamic.js b/lib/routes/coolapk/userDynamic.js
index 618f5ff30..221642f8f 100644
--- a/lib/routes/coolapk/userDynamic.js
+++ b/lib/routes/coolapk/userDynamic.js
@@ -23,8 +23,7 @@ module.exports = async (ctx) => {
if (item.type === 12) {
// 图文内容
return utils.parseTuwen(item, ctx);
- } else if (item.type === 0) {
- // 动态
+ } else if (String(item.type) in utils.dynamicTpye) {
return utils.parseDongtai(item, ctx);
} else {
return null;
diff --git a/lib/routes/coolapk/utils.js b/lib/routes/coolapk/utils.js
index 658434003..0de2776e3 100644
--- a/lib/routes/coolapk/utils.js
+++ b/lib/routes/coolapk/utils.js
@@ -2,6 +2,8 @@ const md5 = require('@/utils/md5');
const cheerio = require('cheerio');
const got = require('@/utils/got');
+const dynamicTpye = { 0: '基本动态', 9: '评论', 20: '交易动态' };
+
const getRandomDEVICE_ID = () => {
let id = [8, 4, 4, 4, 12];
id = id.map((i) => Math.random().toString(36).substr(2, i));
@@ -66,7 +68,7 @@ const parseDongtai = async (item, ctx) => {
});
} else {
const picArr = item.picArr.filter((i) => i).map((i) => `
`);
- description = item.message + picArr.join('');
+ description = `` + item.message + `
` + picArr.join('');
}
const $ = cheerio.load('' + description + '
');
const title = $('.title-filter').text().slice(0, 30).trim() + '...';
@@ -96,7 +98,7 @@ const parseTuwen = async (item, ctx) => {
const tags = parseTuwenFromRaw(raw);
- return tags.join('');
+ return `
` + tags.join('');
});
return {
@@ -114,4 +116,5 @@ module.exports = {
getHeaders,
parseTuwen,
parseDongtai,
+ dynamicTpye,
};
diff --git a/lib/routes/douban/people/status.js b/lib/routes/douban/people/status.js
index 789e25aac..4f6c1173f 100644
--- a/lib/routes/douban/people/status.js
+++ b/lib/routes/douban/people/status.js
@@ -26,9 +26,10 @@ function getContentByActivity(status) {
break;
default:
+ description = `${status.text ? `${status.text}
` : ''}`;
+ title = `${status.author.name}${status.activity}: ${description}`;
if (status.card) {
let image;
- description = `${status.text ? `${status.text}
` : ''}`;
if (status.card.image && (status.card.image.large || status.card.image.normal)) {
image = (status.card.image.large || status.card.image.normal).url;
}
@@ -40,6 +41,14 @@ function getContentByActivity(status) {
title = `${status.author.name} ${status.activity}:「${status.card.title}」${status.text}`;
}
}
+ if (status.video_card) {
+ const videoCover = status.video_card.video_info && status.video_card.video_info.cover_url;
+ const videoSrc = status.video_card.video_info && status.video_card.video_info.video_url;
+ description += `${videoSrc ? `
` : ''}
${
+ status.video_card.title ? `${status.video_card.title}` : ''
+ }`;
+ title = `${status.author.name}${status.activity}:《${status.video_card.title}》`;
+ }
break;
}
return { title, description };
diff --git a/lib/routes/dytt/index.js b/lib/routes/dytt/index.js
index 43e284899..8266c0619 100644
--- a/lib/routes/dytt/index.js
+++ b/lib/routes/dytt/index.js
@@ -1,7 +1,7 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
const iconv = require('iconv-lite');
-const baseURL = 'https://www.ygdy8.net';
+const baseURL = 'https://www.ygdy8.net/index.html';
async function load(link, ctx) {
const cache = await ctx.cache.get(link);
if (cache) {
@@ -33,9 +33,9 @@ module.exports = async (ctx) => {
list.splice(0, 1);
// const list = $('.co_content8 table tr:not(:first-child)').get();
const process = await Promise.all(
- list.map(async (item) => {
+ list.slice(0, 20).map(async (item) => {
const link = $(item).find('a:nth-of-type(2)');
- const itemUrl = baseURL + link.attr('href');
+ const itemUrl = 'https://www.ygdy8.net' + link.attr('href');
const other = await load(itemUrl, ctx);
return {
diff --git a/lib/routes/gcores/category.js b/lib/routes/gcores/category.js
index de144f3d1..ee0e0169f 100644
--- a/lib/routes/gcores/category.js
+++ b/lib/routes/gcores/category.js
@@ -9,45 +9,70 @@ module.exports = async (ctx) => {
url: url,
});
const data = res.data;
- let $ = cheerio.load(data);
- const list = $('.original.am_card.original-normal');
- const count = [];
+ const $ = cheerio.load(data);
const feedTitle = $('title').text();
- for (let i = 0; i < Math.min(list.length, 10); i++) {
- count.push(i);
- }
+ const list = $('.original.am_card.original-normal')
+ .map(function () {
+ const item = {
+ url: $(this).find('a.am_card_content.original_content').attr('href'),
+ title: $(this).find('h3.am_card_title').text(),
+ };
+ return item;
+ })
+ .get();
+
const out = await Promise.all(
- count.map(async (i) => {
- const item = list[i];
- let itemUrl = $(item).find('a.am_card_content.original_content').attr('href');
- itemUrl = 'https://www.gcores.com' + itemUrl;
- const cache = await ctx.cache.get(itemUrl);
+ list.map(async (item) => {
+ const articleUrl = `https://www.gcores.com${item.url}`;
+
+ const cache = await ctx.cache.get(articleUrl);
if (cache) {
return Promise.resolve(JSON.parse(cache));
}
- const title = $(item).find('h3.am_card_title').text();
- let itemRes;
- try {
- itemRes = await got({
- method: 'get',
- url: itemUrl,
- });
- } catch (e) {
- return Promise.resolve();
- }
- const itemPage = itemRes.data;
- $ = cheerio.load(itemPage);
+ const itemRes = await got({
+ method: 'get',
+ url: articleUrl,
+ });
+
+ const itemPage = itemRes.data;
+ const $ = cheerio.load(itemPage);
+
+ let articleData = await got(`https://www.gcores.com/gapi/v1${item.url}?include=media`);
+ articleData = articleData.data.data;
+ let cover;
+ if (articleData.attributes.cover) {
+ cover = `
`;
+ } else if (articleData.attributes.thumb) {
+ cover = `
`;
+ } else {
+ cover = '';
+ }
+
+ // replace figure with img
+ const articleContent = JSON.parse(articleData.attributes.content);
+ const imgs = Object.values(articleContent.entityMap)
+ .filter((e) => e.type === 'IMAGE')
+ .map((e) => e.data.path);
+ $('figure').each((i, elem) => {
+ if (imgs[i]) {
+ $(elem).replaceWith($(`
`));
+ }
+ });
+
+ // remove editor toolbar img
+ $('.md-editor-toolbar').replaceWith('');
+ // remove hidden tip block
+ $('.story_hidden').replaceWith('');
- const cover = $('img.newsPage_cover');
const content = $('.story.story-show').html();
const single = {
- title: title,
+ title: item.title,
description: cover + content,
- link: itemUrl,
- guid: itemUrl,
+ link: articleUrl,
+ guid: articleUrl,
};
- ctx.cache.set(itemUrl, JSON.stringify(single));
+ ctx.cache.set(articleUrl, JSON.stringify(single));
return Promise.resolve(single);
})
);
diff --git a/lib/routes/kongfz/people.js b/lib/routes/kongfz/people.js
index 673b8b7cb..d83f1e3b8 100644
--- a/lib/routes/kongfz/people.js
+++ b/lib/routes/kongfz/people.js
@@ -7,12 +7,33 @@ module.exports = async (ctx) => {
url: userUrl,
});
- const list = response.data.result.feedList.map((item) => ({
- title: item.title || item.postTime,
- link: `https://t.kongfz.com/detail/${item.feedId}`,
- description: item.type === 'text' ? item.content : `商品上架`,
- pubDate: new Date(item.postDateTime).toUTCString(),
- }));
+ const list = response.data.result.feedList.map((item) => {
+ let description;
+ if (item.content === '件商品') {
+ description = '';
+ for (const i of item.itemList) {
+ const link = i.defaultItem.linkUrl;
+ const name = i.product.itemName;
+ const author = i.product.author;
+ const quality = i.product.quality;
+ const price = i.product.price;
+ const image = i.product.imgBig;
+ description += `- ${name}
- 作者:${author}
- 品相:${quality}
- 价格:${price}

`;
+ }
+ description += '
';
+ } else {
+ if (item.content === '转发动态') {
+ item = item.itemList[0].feed;
+ }
+ description = item.content;
+ }
+ return {
+ title: item.title || item.postTime,
+ link: `https://t.kongfz.com/detail/${item.feedId}`,
+ description,
+ pubDate: new Date(item.postDateTime).toUTCString(),
+ };
+ });
const userInfo = response.data.result.userInfo;
diff --git a/lib/routes/manxiaosi/book.js b/lib/routes/manxiaosi/book.js
index c801882ea..bdb1f7433 100644
--- a/lib/routes/manxiaosi/book.js
+++ b/lib/routes/manxiaosi/book.js
@@ -1,7 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const host = 'http://www.manxiaosi.com';
-const ua = 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Mobile Safari/537.36';
+const host = 'http://www.pknbc.com';
module.exports = async (ctx) => {
const id = ctx.params.id;
@@ -19,15 +18,17 @@ module.exports = async (ctx) => {
link: itemLink,
};
const details = await ctx.cache.tryGet(itemLink, async () => {
- // 具体页面限制手机UA
- const response = await got.get(itemLink, {
- headers: {
- 'user-agent': ua,
- },
- });
+ const response = await got.get(itemLink);
const $ = cheerio.load(response.body);
+ const imgs = $('div.comicpage img');
+ let pics = '';
+ imgs.each((_, ele) => {
+ const $ele = $(ele);
+ const src = $ele.attr('data-original');
+ pics += `
`;
+ });
return {
- description: $('div#cp_img').html(),
+ description: `${pics}
`,
};
});
return Promise.resolve(Object.assign({}, simple, details));
diff --git a/lib/routes/newsmth/section.js b/lib/routes/newsmth/section.js
new file mode 100644
index 000000000..bf72265c4
--- /dev/null
+++ b/lib/routes/newsmth/section.js
@@ -0,0 +1,100 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const date = require('@/utils/date');
+
+const config = {
+ community: {
+ link: '/section/7fba65e45f678eb8c605d4107de04185',
+ title: '社区管理',
+ },
+ university: {
+ link: '/section/4fcab28694a0be93d9297d8cede052d9',
+ title: '国内院校',
+ },
+ entertainment: {
+ link: '/section/3497e48bb537373d0f738b41fe53a41b',
+ title: '休闲娱乐',
+ },
+ location: {
+ link: '/section/353fdfda1dfe7a714e592bab99c762cd',
+ title: '五湖四海',
+ },
+ game: {
+ link: '/section/c8d614e56acb8a192ec4af8b375a5eea',
+ title: '游戏运动',
+ },
+ society: {
+ link: '/section/5b634fdc9ecddf6042561c959176c077',
+ title: '社会信息',
+ },
+ romance: {
+ link: '/section/1c455a5dccf4242008d188f9676e3f4e',
+ title: '知性感性',
+ },
+ culture: {
+ link: '/section/12af235486fde6684e4b9e83f5d2b779',
+ title: '文化人文',
+ },
+ science: {
+ link: '/section/4ed7f0d8b621c8ccf9e11eca9991d6dc',
+ title: '学术科学',
+ },
+ technology: {
+ link: '/section/4dda79c64b3ffb61f8048d745292ff5d',
+ title: '电脑技术',
+ },
+};
+
+module.exports = async (ctx) => {
+ const cfg = config[ctx.params.section];
+ if (!cfg) {
+ throw Error('Bad section. See docs');
+ }
+
+ const rootUrl = `https://exp.newsmth.net/statistics/hot`;
+ const currentUrl = `${rootUrl}${cfg.link}`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+ const $ = cheerio.load(response.data);
+
+ const list = $('ul.article-list li')
+ .slice(0, 15)
+ .map((_, item) => {
+ item = $(item);
+ const a = item.find('a.article-subject');
+ const pubDate = date(item.find('div.article-account-name span').text());
+
+ return {
+ title: a.text(),
+ link: `https://exp.newsmth.net${a.attr('href')}`,
+ pubDate: pubDate,
+ };
+ })
+ .get();
+
+ const items = await Promise.all(
+ list.map(
+ async (item) =>
+ await ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+ const content = cheerio.load(detailResponse.data);
+
+ item.description = content('div.show-content').html();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: cfg.title + ' - 水木社区',
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/routes/oschina/news.js b/lib/routes/oschina/news.js
index 32d2edff7..86b4d9efd 100644
--- a/lib/routes/oschina/news.js
+++ b/lib/routes/oschina/news.js
@@ -80,8 +80,8 @@ module.exports = async (ctx) => {
});
const content = cheerio.load(detail.data);
content('.ad-wrap').remove();
- item.description = content('#articleContent').html();
- item.author = content('a.__user').find('span').text();
+ item.description = content('.article-detail').html();
+ item.author = content('.article-box__meta .item').first().text();
ctx.cache.set(key, item.description);
}
}
diff --git a/lib/routes/oschina/u.js b/lib/routes/oschina/u.js
index 7f13152f6..2e3b6179e 100644
--- a/lib/routes/oschina/u.js
+++ b/lib/routes/oschina/u.js
@@ -42,7 +42,7 @@ module.exports = async (ctx) => {
});
const content = cheerio.load(detail.data);
content('#articleContent .ad-wrap').remove();
- item.description = content('#articleContent').html();
+ item.description = content('.article-detail').html();
ctx.cache.set(key, item.description);
}
return Promise.resolve(item);
diff --git a/lib/routes/oschina/user.js b/lib/routes/oschina/user.js
index b685a66c4..936b4de61 100644
--- a/lib/routes/oschina/user.js
+++ b/lib/routes/oschina/user.js
@@ -42,7 +42,7 @@ module.exports = async (ctx) => {
});
const content = cheerio.load(detail.data);
content('.ad-wrap').remove();
- item.description = content('#articleContent').html();
+ item.description = content('.article-detail').html();
ctx.cache.set(key, item.description);
}
return Promise.resolve(item);
diff --git a/lib/routes/pornhub/users.js b/lib/routes/pornhub/users.js
new file mode 100644
index 000000000..7351c6ede
--- /dev/null
+++ b/lib/routes/pornhub/users.js
@@ -0,0 +1,29 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+
+module.exports = async (ctx) => {
+ const username = ctx.params.username;
+ const link = `https://www.pornhub.com/users/${username}/videos`;
+
+ const response = await got.get(link);
+ const $ = cheerio.load(response.data);
+ const list = $('.videoUList .videoBox');
+
+ ctx.state.data = {
+ title: $('title').first().text(),
+ link: link,
+ item:
+ list &&
+ list
+ .map((_, e) => {
+ e = $(e);
+
+ return {
+ title: e.find('span.title a').text(),
+ link: `https://www.pornhub.com` + e.find('span.title a').attr('href'),
+ description: `
`,
+ };
+ })
+ .get(),
+ };
+};
diff --git a/lib/routes/ssmh/index.js b/lib/routes/ssmh/index.js
index f25558ad9..2cb922d69 100644
--- a/lib/routes/ssmh/index.js
+++ b/lib/routes/ssmh/index.js
@@ -19,7 +19,7 @@ module.exports = async (ctx) => {
item: list
.map((index, item) => {
item = $(item);
- thumbnail_url = 'https://wnacg.org' + `${item.find('a > img').attr('src')}`;
+ thumbnail_url = 'https:' + `${item.find('a > img').attr('data-original')}`;
link_url = 'https://wnacg.org' + `${item.find('a').attr('href')}`;
return {
title: item.find('a').attr('title'),
diff --git a/lib/routes/tencent/wechat/msgalbum.js b/lib/routes/tencent/wechat/msgalbum.js
new file mode 100644
index 000000000..4bc711c17
--- /dev/null
+++ b/lib/routes/tencent/wechat/msgalbum.js
@@ -0,0 +1,59 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const dayjs = require('dayjs');
+module.exports = async (ctx) => {
+ const { biz, aid } = ctx.params;
+ const aidurl = `&album_id=${aid}`;
+
+ const HTMLresponse = await got({
+ method: 'get',
+ url: `https://mp.weixin.qq.com/mp/appmsgalbum?__biz=${biz}&action=getalbum${aidurl}`,
+ });
+ const $ = cheerio.load(HTMLresponse.data);
+ const list = $('li').get();
+ const mptitle = $('.album__author-name').text() + `|` + $('.album__label-title').text();
+ const articledata = await Promise.all(
+ list.map(async (item) => {
+ const link = $(item).attr('data-link').replace('http://', 'https://');
+ const title = $(item).attr('data-title');
+ const cache = await ctx.cache.get(link);
+ if (cache) {
+ return Promise.resolve(JSON.parse(cache));
+ }
+ const response2 = await got({
+ method: 'get',
+ url: link,
+ });
+ const articleHtml = response2.data;
+ const $2 = cheerio.load(articleHtml);
+ $2('img').removeAttr('src');
+ $2('div#js_profile_qrcode').remove();
+
+ const content = $2('div#js_content.rich_media_content')
+ .html()
+ .replace('iframe/preview.html?width=500&height=375&', 'txp/iframe/player.html?')
+ .replace('