Created
April 26, 2019 05:06
-
-
Save codesorter2015/2da8749c40fe0be7059bdb5724b3df0b to your computer and use it in GitHub Desktop.
Example for setting extra header on page in puppeteer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await page.setExtraHTTPHeaders({ | |
'Accept-Language': 'en-US,en;q=0.9' | |
}); | |
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment