Comments (5)
Thank you very much. I will definitely perform tests on the relevant site and update it.
from puppeteer-real-browser.
The library has been updated, please check again.
from puppeteer-real-browser.
this update was amazing. but timezone was not updating using my ip address. i have writen a code to update my timezone using my ip. i thing you should add that in your nezt update as far you have done a nice work.
before:
after:
my next automation package..
from puppeteer-real-browser.
this update was amazing. but timezone was not updating using my ip address. i have writen a code to update my timezone using my ip. i thing you should add that in your nezt update as far you have done a nice work. before: after:
my next automation package..
Hello, this is a general problem caused by puppeteer. The reason it is detected is that the ip and browser timezone values do not match. Until then, you can check the values below and add the codes. Sites can read your browser language and timezone value in many values such as browser.languages and Intl.DateTimeFormat().resolvedOptions() in the header sent when requesting. You need to change this according to your ip address.
check: https://webbrowsertools.com/timezone/
Intl.DateTimeFormat().resolvedOptions()
add args: ['--lang=en-GB', '--timezone=Europe/London']
add code:
await Page.emulateTimezone('Europe/London');
await Page.setExtraHTTPHeaders({
'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8,en;q=0.7'
});
await page.evaluateOnNewDocument(() => {
Intl.DateTimeFormat.prototype.resolvedOptions = function () {
return {
locale: 'en-GB',
"calendar": "london",
"numberingSystem": "latn",
"timeZone": "Europe/London",
"year": "numeric",
"month": "2-digit",
"day": "2-digit"
};
};
});
await page.evaluateOnNewDocument(() => {
Object.defineProperty(navigator, "language", {
get: function () {
return "en-GB";
}
});
Object.defineProperty(navigator, "languages", {
get: function () {
return ["en-GB", "en"];
}
});
});
from puppeteer-real-browser.
I am using proxy. And each proxy has different country location. Can you help me how can i set different timezone in each browser?
from puppeteer-real-browser.
Related Issues (20)
- Linux non headless not working HOT 2
- Enable ad blocking feature HOT 2
- Does not consistently attempt to click Cloudflare Checkbox HOT 1
- Issue with consistency of Cloudfare turnstile HOT 3
- More suggestions HOT 5
- Creating a new page hangs. HOT 2
- Some websites never trigger load event HOT 3
- Huge Stealth Improvment. HOT 1
- Some questions HOT 2
- npm i puppeteer-real-browser doesnt work HOT 5
- captcha issue HOT 3
- cloudflare verify not work HOT 2
- StealthPlugin don't work with puppeteer-real-browser HOT 3
- Freezes on puppeteer.connect HOT 2
- "Error: target should exist before targetInfoChanged" on MacOS
- Error when Connecting to puppeteer-real-browser HOT 3
- How to hide "Browser Disconnected" logs HOT 2
- Request for new feature
- Missing Sec-CH-UA headers, no audio devices, some built-in Google Chrome functions missing
- is blocked by WAF Cloudflare firewall HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppeteer-real-browser.