diff --git a/lib/routes/newrank/utils.js b/lib/routes/newrank/utils.js index 29427278f..ff4d0e1e6 100644 --- a/lib/routes/newrank/utils.js +++ b/lib/routes/newrank/utils.js @@ -69,8 +69,8 @@ async function getCookie(ctx) { // Check if this key should be replace? every 30 times should be fine. await shouldUpdateCookie(ctx); let token = await ctx.cache.get(newrank_cookie_token); - const username = config.newrank.username; - const password = md5(md5(config.newrank.password) + 'daddy'); + const username = String(config.newrank.username); + const password = md5(md5(String(config.newrank.password)) + 'daddy'); const nonce = random_nonce(9); const xyz = decrypt_login_xyz(username, password, nonce); if (!token) { diff --git a/lib/routes/newrank/wechat.js b/lib/routes/newrank/wechat.js index 49afadeca..365591501 100644 --- a/lib/routes/newrank/wechat.js +++ b/lib/routes/newrank/wechat.js @@ -18,9 +18,11 @@ module.exports = async (ctx) => { }, }); const name = response.data.value.user.name; + const realTimeArticles = utils.flatten(response.data.value.realTimeArticles); const articles = utils.flatten(response.data.value.articles); + const newArticles = realTimeArticles.concat(articles); const items = await Promise.all( - articles.map(async (item) => ({ + newArticles.map(async (item) => ({ title: item.title, description: '', link: item.url,