From 818f24222142ce5274e6fec432dc0f0954dd98cf Mon Sep 17 00:00:00 2001 From: Li Date: Mon, 13 Apr 2020 19:49:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Rockstar=20Games=20Social=20Club=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=BE=93=E5=87=BA=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=20(#4431)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/socialclub/events.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/socialclub/events.js b/lib/routes/socialclub/events.js index 4c53fb1275..1535e096df 100644 --- a/lib/routes/socialclub/events.js +++ b/lib/routes/socialclub/events.js @@ -2,7 +2,7 @@ const gameList = ['GTAV', 'RDR2']; module.exports = async (ctx) => { const gameId = gameList.includes(ctx.params.game) ? ctx.params.game : ''; - const baseUrl = `https://zh.socialclub.rockstargames.com/events/eventlisting?pageId=1&gameId=${gameId}`; + const baseUrl = `https://zh-cn.socialclub.rockstargames.com/events/eventlisting?pageId=1&gameId=${gameId}`; // R星的傻逼防爬 const browser = await require('@/utils/puppeteer')(); const page = await browser.newPage(); @@ -14,8 +14,8 @@ module.exports = async (ctx) => { const { events } = JSON.parse(jsonStr); ctx.state.data = { - title: 'Online Events - Rockstar Games Social Club', - link: 'https://zh.socialclub.rockstargames.com/events?gameId=' + gameId, + title: '在线活动 - Rockstar Games Social Club', + link: 'https://zh-cn.socialclub.rockstargames.com/events?gameId=' + gameId, item: events && events.map((x) => ({ @@ -23,7 +23,7 @@ module.exports = async (ctx) => { category: x.eventType, description: (x.imgUrl ? `
` : '') + x.description, pubDate: new Date(x.startDate).getTime() / 1000, - link: `https://zh.socialclub.rockstargames.com/events/${x.urlHash}/${x.slug}/1`, + link: `https://zh-cn.socialclub.rockstargames.com/events/${x.urlHash}/${x.slug}/1`, })), }; };