* fix(route): 色花堂 with duplicate magnets * fix typo * refactor: use WHATWG URL
20 lines
747 B
JavaScript
20 lines
747 B
JavaScript
module.exports = {
|
|
'sehuatang.net': {
|
|
_name: '色花堂',
|
|
'.': [
|
|
{
|
|
title: '分区帖子',
|
|
docs: 'https://docs.rsshub.app/multimedia.html#se-hua-tang-fen-qu-tie-zi',
|
|
source: ['/:category', '/'],
|
|
target: (params, url) => {
|
|
const theUrl = new URL(url);
|
|
const matches = String(theUrl).match(/forum-(\d)+-\d+/);
|
|
const fid = theUrl.searchParams.get('fid') || (matches ? matches[1] : '');
|
|
const tid = theUrl.searchParams.get('typeid');
|
|
return `/dsndsht23${fid ? `/${fid}` : ''}${tid ? `/${tid}` : ''}`;
|
|
},
|
|
},
|
|
],
|
|
},
|
|
};
|