1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-26 12:42:29 +01:00

[shopify] fix 'collection' extractor

This commit is contained in:
enduser420 2023-04-03 12:19:09 +05:30
parent 82f83c18e8
commit 96e3dd2128

View File

@ -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):