fix: use gpt bot UA

This commit is contained in:
Yanlong Wang 2024-04-13 08:13:50 +08:00
parent 950338261a
commit 95799988da
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -100,6 +100,7 @@ export class PuppeteerControl extends AsyncService {
const preparations = [];
// preparations.push(page.setUserAgent(`Slackbot-LinkExpanding 1.0 (+https://api.slack.com/robots)`));
preparations.push(page.setUserAgent(`Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.0; +https://openai.com/gptbot)`));
preparations.push(page.setBypassCSP(true));
preparations.push(page.setViewport({ width: 1920, height: 1080 }));
preparations.push(page.exposeFunction('reportSnapshot', (snapshot: any) => {