mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-01 14:57:14 +08:00
fix(route): tidy sis001 articles (#16619)
This commit is contained in:
@@ -29,7 +29,7 @@ async function handler(ctx) {
|
||||
const response = await got(url);
|
||||
const $ = load(response.data);
|
||||
|
||||
const username = $('div.username').text();
|
||||
const username = $('div.bg div.title').text().replace('的个人空间', '');
|
||||
|
||||
let items = $('div.center_subject ul li a[href^=thread]')
|
||||
.toArray()
|
||||
|
||||
@@ -22,8 +22,15 @@ async function getThread(item) {
|
||||
),
|
||||
8
|
||||
);
|
||||
$('div[id^=postmessage_] table, fieldset, .posttags, strong').remove();
|
||||
item.description = $('div[id^=postmessage_]').eq(0).remove('strong').html() + ($('.defaultpost .postattachlist').html() ?? '');
|
||||
$('div[id^=postmessage_] table, fieldset, .posttags, strong font').remove();
|
||||
item.description =
|
||||
$('div[id^=postmessage_]')
|
||||
.eq(0)
|
||||
.html()
|
||||
?.replaceAll('\n', '')
|
||||
.replaceAll(/\u3000{2}.+?(((?:<br>){2})|( ))/g, (str) => `<p>${str.replaceAll('<br>', '')}</p>`)
|
||||
.replaceAll(' ', '')
|
||||
.replace(/^.+?((?:作者)|(?:<p>))/, '$1') + ($('.defaultpost .postattachlist').html() ?? '');
|
||||
return item;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user