Skip to content

DummyResponse #226

@bulatbulat48

Description

@bulatbulat48

When we add a type hint DummyResponse to the response as it mentioned here:

The scrapy doesn't send the actions, experimental, cookies or other additional settings added to the settings or the the request:

Maybe it's a cloudflare related issue, idk.

cookies = {
    'bh_cookies_accepted': True,
    'bh_cookies_allow_all': True,
    'bh_cookies_allow_marketing': True,
    'bh_cookies_allow_statistic': True,
    'bh_cookies_allow_thirdcountries': True,
},
@classmethod
def update_settings(cls, settings: BaseSettings) -> None:
    settings["ZYTE_API_EXPERIMENTAL_COOKIES_ENABLED"] = True
    settings["ZYTE_API_LOG_REQUESTS"] = True
    settings["ZYTE_API_LOG_REQUESTS_TRUNCATE"] = 1000
    return super().update_settings(settings)
2024-09-26 20:40:50 [scrapy_poet.downloadermiddlewares] DEBUG: Using DummyResponse instead of downloading <GET https://www.example.com/>
2024-09-26 20:40:50 [scrapy_zyte_api.handler] DEBUG: Sending Zyte API extract request: {"browserHtml": true, "url": "https://www.example.com"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions