diff --git a/routes/t66y/index.js b/routes/t66y/index.js index 7c67333bd..96cd6898e 100644 --- a/routes/t66y/index.js +++ b/routes/t66y/index.js @@ -55,6 +55,7 @@ module.exports = async (ctx) => { time = regRes === null ? new Date() : new Date(regRes[0]); time.setTime(time.getTime() + (sourceTimezoneOffset - time.getTimezoneOffset() / 60) * 60 * 60 * 1000); + const author = $('#main > div:nth-child(4) > table > tbody > tr.tr1.do_not_catch > th.r_two > b').text(); const content = $('#main > div:nth-child(4) > table > tbody > tr.tr1.do_not_catch > th:nth-child(2) > table > tbody > tr > td > div.tpc_content.do_not_catch').html(); // Change the image tag to display image in rss reader @@ -94,6 +95,7 @@ module.exports = async (ctx) => { } return { + author: author, description: $('body').html(), pubDate: time.toUTCString(), }; @@ -152,6 +154,7 @@ module.exports = async (ctx) => { return Promise.resolve(''); } + single.author = result.author; single.description = result.description; single.pubDate = result.pubDate; } catch (err) { diff --git a/routes/t66y/post.js b/routes/t66y/post.js index 678769c06..7dd004fa8 100644 --- a/routes/t66y/post.js +++ b/routes/t66y/post.js @@ -39,6 +39,7 @@ function parseContent(htmlString) { time = regRes === null ? new Date() : new Date(regRes[0]); time.setTime(time.getTime() + (sourceTimezoneOffset - time.getTimezoneOffset() / 60) * 60 * 60 * 1000); + const author = $('th.r_two > b').text(); const content = $('.tpc_content').html(); // Change the image tag to display image in rss reader @@ -78,6 +79,7 @@ function parseContent(htmlString) { } return { + author: author, description: $('body').html(), pubDate: time.toUTCString(), }; @@ -154,11 +156,7 @@ module.exports = async (ctx) => { // 如果没有读到内容,则读取下一页。 return load(page + 1); } else { - return { - title: title, - link: url.resolve(base, `/read.php?tid=${tid}`), - item: items, - }; + return { title: title, link: url.resolve(base, `/read.php?tid=${tid}`), item: items }; } };