Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request fingerprint does not work with other item types except scrapy.item.Item #49

Open
InzamamAnwar opened this issue May 18, 2023 · 1 comment

Comments

@InzamamAnwar
Copy link

Testing with latest version of Scrapy, I found out that yielding Dataclass objects do not work with scrapy-deltafetch. If the object type is changed to scrapy.item.Item the plugin works as intended.

Has anyone else tried it?

What if using dataclass is necessary?

@palvarezcordoba
Copy link

palvarezcordoba commented Oct 29, 2023

Hi @InzamamAnwar
Check this: https://github.com/scrapy-plugins/scrapy-deltafetch/blob/master/scrapy_deltafetch/middleware.py#L74
You could add a check for dataclasses.
It can be done like this:

import dataclasses
dataclasses.is_dataclass(r)

This repo seems to be unmaintained. You could make a fork and use your own version. I think it's unlikely that if you make a MR it will be merged, but you could try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants