Skip to content

Commit

Permalink
fix(route/douban): remove parameter to avoid duplicate (#17251)
Browse files Browse the repository at this point in the history
  • Loading branch information
haowenwu authored Oct 22, 2024
1 parent 18deadc commit 39d83bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/routes/douban/other/topic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function handler(ctx) {
let link;
let title;
if (type === 'status') {
link = item.target.status.sharing_url;
link = item.target.status.sharing_url.split('&')[0];
author = item.target.status.author.name;
title = author + '的广播';
date = item.target.status.create_time;
Expand All @@ -67,7 +67,7 @@ async function handler(ctx) {
}
}
} else if (type === 'topic') {
link = item.target.group.sharing_url;
link = item.target.sharing_url;
author = item.target.status.author.name;
title = item.target.title;
date = item.target.create_time;
Expand Down
4 changes: 4 additions & 0 deletions lib/routes/douban/people/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ function tryFixStatus(status) {
}
}

if (status.sharing_url) {
status.sharing_url = status.sharing_url.split('&')[0];
}

if (!result.isFixSuccess) {
status.sharing_url = 'https://www.douban.com?rsshub_failed=' + now.getTime().toString();
if (!status.create_time) {
Expand Down

0 comments on commit 39d83bc

Please sign in to comment.