👨🏼‍💻개발/puppeteer

puppeteer - UserAgent와 UserAgentData 변경 하기

Janger 2022. 10. 11. 21:26
728x90
소스

 

const page = await browser.newPage();
await page.setUserAgent('MyBrowser', {
  architecture: 'My1',
  mobile: false,
  model: 'Mybook',
  platform: 'MyOS',
  platformVersion: '3.1',
});

 

클라이언트 요청 헤더 확인하는 사이트

 

https://www.httpbin.org/headers

 

 

 

 

 

 

출처: 

https://stackoverflow.com/questions/73344280/how-to-overwrite-the-user-agent-client-hints-in-puppeteer

 

How to overwrite the User-Agent Client Hints in puppeteer?

I am facing an issue with dealing with the user-agent-client-hints. If you have no idea what User-agent-client-hints are then think of them as some request headers. (See the image below) I tried to

stackoverflow.com

 

728x90