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

Bump scrapy-poet #156

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Bump scrapy-poet #156

merged 3 commits into from
Jan 5, 2024

Conversation

wRAR
Copy link
Contributor

@wRAR wRAR commented Dec 26, 2023

Fixes #91

Not sure if we should make a new release just with this.

@wRAR wRAR requested review from Gallaecio and kmike December 26, 2023 13:58
Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Merging #156 (8952e06) into main (0536f42) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #156   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files          11       11           
  Lines         812      812           
=======================================
  Hits          801      801           
  Misses         11       11           

@wRAR
Copy link
Contributor Author

wRAR commented Dec 26, 2023

There is another thing we need to change here though: https://scrapy-zyte-api.readthedocs.io/en/latest/usage/scrapy-poet.html#default-parameters says "Note that the built-in scrapy_poet.page_input_providers.ItemProvider has a priority of 2000, so when you have page objects producing zyte_common_items.Product items you should use higher values for ZyteApiProvider if you want these items to come from these page objects, and lower values if you want them to come from Zyte API."

Now I think the items will always come from the page objects and if you want to get them directly you need to change the rules?

@Gallaecio
Copy link
Contributor

Gallaecio commented Dec 26, 2023

I think to get them directly you should disable the corresponding rule altogether. But honestly, I think the “right” behavior is for items to come from a page object when one exists, so I think we can simply remove that paragraph altogether and not document what to do for the other behavior, at least until we find a real use case for it that we want to support (which might require code changes).

@wRAR wRAR merged commit 789867b into main Jan 5, 2024
19 checks passed
@wRAR wRAR deleted the double-requests branch January 5, 2024 14:11
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

Successfully merging this pull request may close these issues.

ZyteApiProvider could make an unneeded API request
4 participants