From 96e3dd2128e0943e9eddf010b599354c3c365aee Mon Sep 17 00:00:00 2001 From: enduser420 <91022934+enduser420@users.noreply.github.com> Date: Mon, 3 Apr 2023 12:19:09 +0530 Subject: [PATCH] [shopify] fix 'collection' extractor --- gallery_dl/extractor/shopify.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gallery_dl/extractor/shopify.py b/gallery_dl/extractor/shopify.py index 278ad147..f6e8bc03 100644 --- a/gallery_dl/extractor/shopify.py +++ b/gallery_dl/extractor/shopify.py @@ -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):