@@ -25,17 +25,15 @@ module.exports = async (ctx) => {
|
||||
wb = {};
|
||||
item = $(ele);
|
||||
titleEle = item.find('.wgtCell_txt');
|
||||
wb.title = titleEle
|
||||
.text()
|
||||
.replace(/^\s+|\s+$/g, '')
|
||||
.replace(/\u200B/g, '');
|
||||
wb.title = titleEle.text().trim();
|
||||
if (wb.title === '') {
|
||||
wb.title = '[图片]';
|
||||
}
|
||||
wb.description = titleEle
|
||||
.html()
|
||||
.replace(/^\s+|\s+$/g, '')
|
||||
.replace(/(\r\n|\r|\n)/g, '<br>')
|
||||
.trim()
|
||||
.replace(/(\r\n|\r|\n)+/g, '<br>')
|
||||
.replace(/(( ?)+<br>( ?)+){2,}/g, '')
|
||||
.replace(/thumbnail/, 'large');
|
||||
wb.pubDate = date(item.find('.link_d').html(), 8);
|
||||
wb.link = item.find('.wgtCell_tm a').attr('href');
|
||||
|
||||
Reference in New Issue
Block a user