diff --git a/pkg/scraper/scrapers.go b/pkg/scraper/scrapers.go index a1a93fc..b0b37f4 100644 --- a/pkg/scraper/scrapers.go +++ b/pkg/scraper/scrapers.go @@ -78,6 +78,10 @@ func (bs *BaseScraper) Scrape(maxWorkers int) ([]models.Product, error) { break // Exit loop if there's no next URL } + if nextURL == currentURL { + break // Exit loop if the next URL is the same as the current URL + } + currentURL = nextURL } }(url)