mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 02:08:55 +08:00
fix(route/caixin): filter out articles that does not have ID (#17495)
This commit is contained in:
@@ -12,6 +12,10 @@ export async function getFulltext(url: string) {
|
||||
if (!config.caixin.cookie) {
|
||||
return;
|
||||
}
|
||||
if (!/(\d+)\.html/.test(url)) {
|
||||
return;
|
||||
}
|
||||
const articleID = url.match(/(\d+)\.html/)[1];
|
||||
|
||||
const nonce = crypto.randomUUID().replaceAll('-', '').toUpperCase();
|
||||
|
||||
@@ -20,7 +24,6 @@ export async function getFulltext(url: string) {
|
||||
.find((e) => e.includes('SA_USER_UID'))
|
||||
?.split('=')[1]; //
|
||||
|
||||
const articleID = url.match(/(\d+)\.html/)[1];
|
||||
const rawString = `id=${articleID}&uid=${userID}&${nonce}=nonce`;
|
||||
|
||||
const sig = new KJUR.crypto.Signature({ alg: 'SHA256withRSA' });
|
||||
|
||||
Reference in New Issue
Block a user