diff --git a/lib/routes/jandan/article.js b/lib/routes/jandan/article.js index e8d4e2f341..531310b371 100644 --- a/lib/routes/jandan/article.js +++ b/lib/routes/jandan/article.js @@ -17,7 +17,7 @@ module.exports = async (ctx) => { const summary = $('div.indexs').clone().children().remove().end().text().trim(); const author = $('div.time_s > a').first().text(); let imgUrl = 'http:' + ($('img').attr('src') || $('img').attr('data-original')); - if (imgUrl.slice(-7,) === "!square") { + if (imgUrl.slice(-7) === '!square') { imgUrl = imgUrl.slice(0, -7); } @@ -32,7 +32,7 @@ module.exports = async (ctx) => { const content = $('.f.post').first(); content.find('h1').prevAll().remove().end().remove(); content.find('div').nextAll().remove().end().remove(); - content.contents().each(function() { + content.contents().each(function () { if (this.nodeType === 8) { $(this).remove(); } @@ -48,10 +48,11 @@ module.exports = async (ctx) => { description: description, link: link, pubDate: time, - author: author + author: author, }; return Promise.resolve(single); - })); + }) + ); ctx.state.data = { title: `็…Ž่›‹ - ้ฆ–้กต`, link: `http://jandan.net/`,