merge #3868: [shopify] fix 'collection' extractor

pull/3871/head
Mike Fährmann 1 year ago
commit fd7ce4c081
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -119,15 +119,14 @@ class ShopifyCollectionExtractor(ShopifyExtractor):
def products(self):
url = self.item_url + "/products.json"
params = {"page": 1}
while url:
response = self.request(url)
yield from response.json()["products"]
url = response.links.get("next")
if not url:
while True:
data = self.request(url, params=params).json()["products"]
if not data:
return
url = url["url"]
yield from data
params["page"] += 1
class ShopifyProductExtractor(ShopifyExtractor):

Loading…
Cancel
Save