I need access an site that block request if you is navigating with desktop browser
Generating user-agent compatible with mobile is not sufficient, the only way to can view website is in inspect mode and set mobile device
How to do it in OB2?
const devices = require('puppeteer/DeviceDescriptors');
const iPhonex = devices['iPhone X'];
puppeteer.launch({headless:false}).then(async browser => {
const page = await browser.newPage();
await page.emulate(iPhonex);
await page.goto('https://www.webkul.com');
await page.screenshot({ path: 'webkul.png'});
await browser.close();
});
Thanks