Skip to content

Commit

Permalink
merge #3868: [shopify] fix 'collection' extractor
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Apr 3, 2023
2 parents 135ac9c + 96e3dd2 commit fd7ce4c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions gallery_dl/extractor/shopify.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,14 @@ def metadata(self):

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):
Expand Down

0 comments on commit fd7ce4c

Please sign in to comment.