diff --git a/lib/v2/zimuxia/portfolio.js b/lib/v2/zimuxia/portfolio.js
index b4888c27d5..148b2eb0be 100644
--- a/lib/v2/zimuxia/portfolio.js
+++ b/lib/v2/zimuxia/portfolio.js
@@ -1,8 +1,12 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
+const allowlinktypes = [ 'all', 'magnet', 'ed2k', 'baidu', 'subhd', 'quark', '115' ];
module.exports = async (ctx) => {
const id = ctx.params.id;
+ let linktype = ctx.query.linktype ?? 'magnet';
+ linktype = allowlinktypes.includes(linktype) ? linktype : 'magnet';
+ linktype = linktype === "all" ? "." : linktype;
const rootUrl = 'https://www.zimuxia.cn';
const currentUrl = `${rootUrl}/portfolio/${id}`;
@@ -17,16 +21,13 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
const items = $('a')
- .filter((_, el) => $(el).attr('href')?.startsWith('magnet:'))
+ .filter((_, el) => $(el).attr('href')?.match(RegExp(linktype)))
.toArray()
.map((item) => {
item = $(item);
- const title = item
- .parent()
- .contents()
- .filter((_, el) => el.type === 'text')
- .text()
- .trim();
+ const tmpstr2match = $.html(item.parent().children()[item.prevAll("br").first().index() + 1]);
+ const tmphtml = item.parent().contents().toArray().map((item) => $.html($(item)));
+ const title = tmphtml[tmphtml.indexOf(tmpstr2match) - 1].trim().replace(/\s.*| .*/, "");
return {
link: currentUrl,
diff --git a/website/docs/routes/multimedia.mdx b/website/docs/routes/multimedia.mdx
index 2685f82389..4b936b5bed 100644
--- a/website/docs/routes/multimedia.mdx
+++ b/website/docs/routes/multimedia.mdx
@@ -535,6 +535,12 @@ Official RSS: [https://eztv.io/ezrss.xml](https://eztv.io/ezrss.xml)
+:::tip
+
+本路由以 `magnet` 为默认linktype,可以通过在路由后方加上 `?linktype=链接类型` 指定导出的链接类型。比如路由为 [`/zimuxia/portfolio/我们这一天?linktype=baidu`](https://rsshub.app/zimuxia/portfolio/我们这一天?linktype=baidu) 来导出百度盘链接. 目前,你可以选择的 `链接类型` 包括: `magnet`(默认), `all`(所有), `ed2k`(电驴), `baidu`(百度盘), `quark`(夸克盘), `115`(115盘), `subhd`(字幕).
+
+:::
+
### Lookup Torrents by IMDB ID {#fix-zi-mu-xia-lookup-torrents-by-imdb-id}