Skip to content
Discussion options

You must be logged in to vote

Thank you for your interest in language support! While browsers don't directly support changing the language of web content, our library does support setting the Accept-Language header, which many websites use to serve content in different languages.

You can set the language preference in a few ways:

  1. When creating the crawler:

    crawler = AsyncWebCrawler(
        crawler_strategy=AsyncPlaywrightCrawlerStrategy(
            headers={"Accept-Language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7"}
        )
    )
  2. Before crawling:

    crawler.crawler_strategy.headers["Accept-Language"] = "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7"
  3. When calling the arun method:

    result = await crawler.arun(
        url,
        headers={"Accept-L…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by aravindkarnam
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants
Converted from issue

This discussion was converted from issue #118 on January 21, 2025 04:35.