Apify Discord Mirror

Updated 3 weeks ago

Force language?

Hello,

In general on Apify, it is possible to force the browser language? (example: fr or es or en)

I have tested with:

Plain Text
"proxy": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "countryCode": "FR",
    "apifyProxyCountry": "FR"
  },
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "countryCode": "FR",
    "apifyProxyCountry": "FR"
  },
P
N
4 comments
Hi @Nico64 , code sample that you mentioned is related to the setup of Proxy configuration.

You should be able to set a a browser language via launch arguments in Crawler defition.

For example for Chrome and German language it should be:
Plain Text
const crawler = new PuppeteerCrawler({
    proxyConfiguration,
    requestHandler: router,
    launchContext: {
        launchOptions: {
            args: [
                '--accept-lang=de',
                '--lang=de',
            ],
        },
    },
});


There are also other ways how to set the browser language https://stackoverflow.com/a/47292022
Hi @Pepa J

Thanks for your answer. I should have specified, I'm talking about when launching an Actor from the Apify API.

It seems to be possible to specify the configuration of a proxy in the HTTP request to an Actor, is it possible to specify the browser language? Maybe it depends on the Actor?
I asked the developer of an Actor I use but he doesn't answer.
Ah yes, in case you are not the developer of the Actor there is not default way to do this from the API/Actor's Input. This needs to be directly developed.
Ok I understand. Thank you for your help πŸ‘
Add a reply
Sign up and join the conversation on Discord