openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
17 stars 16 forks source link

Add a less generic subsclass of StaticItem #130

Closed benoit74 closed 4 months ago

benoit74 commented 4 months ago

As discussed in https://github.com/openzim/python-scraperlib/issues/109, we can benefit from creating a less generic subclass of StaticItem with more strongly typed arguments than the very generic **kwargs we have in StaticItem.

This less generic class would serve >80% of the scraper needs.

benoit74 commented 4 months ago

@rgaudin do you think there is something left to do on this issue after #132 last changes?

I had a look at all openZIM codebase and did not find anything which is not covered.

Most scrapers are using either add_item_for or add_redirect anyway.

The only thing we forgot to perform is the modification of add_item_for to use new StaticItem parameters. But this is not really related to this issue.

rgaudin commented 4 months ago

I agree ; we can close this

benoit74 commented 4 months ago

Fixed by #132