-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
An idea: allow callbacks to request item classes directly. So, instead of writing one of those:
def parse_product(self, response: DummyResponse,
page: AutoExtractProductPage):
product = page.to_item()
def parse_product(self, response: DummyResponse,
produuct_data: AutoExtractProductData):
product = product_data.to_item()it would be possible to write
def parse_product(self, response: DummyResponse,
product: Product):Edge cases:
- If I'm not mistaken, to_item() might return None. It seems errback should be called in this case.
- There can be non-autoextract ways to get Product, so there should be a way to turn it off (or turn it on, depending on what the default we decide on). It could be a separate provider or an option.
ivanprado and BurnzZ
Metadata
Metadata
Assignees
Labels
No labels