Skip to content

[question] Why does SplashTextResponse inherits from TextResponse instead HtmlResponse? #159

@iAnanich

Description

@iAnanich

Why does scrapy_splash.reponse.SplashTextResponse inherits from scrapy.http.reponse.text.TextResponse and not from scrapy.http.reponse.html.HtmlResponse?

I understand that they are identical, and HtmlResponse uses TextResponse without any change, but they mean different things and Scrapy uses isinstance check to distinguish them.

In my case, it causes problem because I have type check for HtmlResponse where I expect to get HTML page and use css method to extract data from it, but SplashTextResponse doesn't pass it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions