fix(route): nmpa stealth puppeteer (#11279)

This commit is contained in:
Tony
2022-11-15 18:46:34 +08:00
committed by GitHub
parent 7b478e124e
commit 493b2baafa
+1 -1
View File
@@ -7,7 +7,7 @@ const baseUrl = 'https://www.nmpa.gov.cn';
module.exports = async (ctx) => {
const path = ctx.params[0];
const url = `${baseUrl}/${path.endsWith('/') ? path.slice(0, -1) : path}/index.html`;
const browser = await require('@/utils/puppeteer')();
const browser = await require('@/utils/puppeteer')({ stealth: true });
const data = await ctx.cache.tryGet(
url,
async () => {