[shopify] skip consecutive duplicate products

Not filtering duplicate URLs anymore caused the archive ID uniqueness
test to fail.
This commit is contained in:
Mike Fährmann
2019-07-01 20:04:57 +02:00
parent b89f0d8d3c
commit bc6b0cfddc

View File

@@ -89,10 +89,14 @@ class ShopifyCollectionExtractor(ShopifyExtractor):
while True: while True:
page = self.request(self.item_url, params=params).text page = self.request(self.item_url, params=params).text
urls = search_re.findall(page) urls = search_re.findall(page)
last = None
if not urls: if not urls:
return return
for path in urls: for path in urls:
if last == path:
continue
last = path
yield self.root + path yield self.root + path
params["page"] += 1 params["page"] += 1