1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Scrapy Playwright removed cookie when using proxy

Discussão em 'Python' iniciado por Stack, Setembro 9, 2025.

  1. Stack

    Stack Membro Participativo

    I tried setting up Scrapy Playwright.

    Without proxy, cookie applied correctly. But when I use proxy (brightdata), then the cookie is not applied. Did I miss anything?

    class ScrapyTest(scrapy.Spider):
    name = 'scrapy test'

    def start_requests(self):

    cookies = {
    'cookieconsent_dismissed': 'yes'
    }

    url = 'https://example.com'

    yield scrapy.Request(url, cookies=cookies, meta={"playwright": True}, callback=self.parse)


    settings.py

    PLAYWRIGHT_LAUNCH_OPTIONS = {
    "proxy": {
    'server': 'http://zproxy.lum-superproxy.io:22225',
    'username': 'lum-customer-user',
    'password': 'password'
    }
    }

    COOKIES_ENABLED = True

    Continue reading...

Compartilhe esta Página