diff --git a/lib/routes/dykszx/news.js b/lib/routes/dykszx/news.js index 604a24050..1d7feedd1 100644 --- a/lib/routes/dykszx/news.js +++ b/lib/routes/dykszx/news.js @@ -4,10 +4,13 @@ const { parseDate } = require('@/utils/parse-date'); const timezone = require('@/utils/timezone'); const host = 'https://www.dykszx.com'; +// disable ssl check +const options = { https: { rejectUnauthorized: false } }; + const getContent = (href, caches) => { const newsPage = `${host}${href}`; return caches.tryGet(newsPage, async () => { - const response = await got.get(newsPage); + const response = await got.get(newsPage, options); const data = response.data; const $ = cheerio.load(data); const newsTime = $('body > div:nth-child(3) > div.page.w > div.shuxing.w') @@ -31,7 +34,7 @@ const newsTypeObj = { module.exports = async (ctx) => { const newsType = ctx.params.type || 'all'; - const response = await got.get(host); + const response = await got(host, options); const data = response.data; const $ = cheerio.load(data); const newsList = $(newsTypeObj[newsType].selector).toArray();