Closed OlivierDa closed 3 years ago
I can't seem to reproduce it. Can you see what happens visually with the option headless: false
? I check for the button "Looks like you've reached the end" to see if the end is reached. I suspect that it might be a caused by an internationalization difference.
Unfortunately, i'm using the scrapper in a node js REST API on a remote debian server. So i can't have a visual verification... I'll try to reproduce the problem later!
Hi, I get the same issue when I try to get 800 images, the script try too scroll down to get more results but google wont give more, so the script is stuck .
Hmm it might be a better idea to just check wether we were able to fetch more results. I think it is flaky because of localization.
So I created this PR: https://github.com/pevers/images-scraper/pull/48/files
Hopefully this fixes it for you.
Thanks, for me it's working well now !
I can also confirm that trying to get larger number of images fails. Running the example from README with limit
set to 1000, the results
always contains a smaller number of items (300, 400, depending on the run).
I'm closing this one. If anyone is still having issues please let me know.
Hi, I just ran in a bug, it seems that the scrapper goes crazy when changing pages. I added some logs and monitored the results and it seems the results array in the while loop is doing something like :
let SEARCH_SCRAPPER = new Scraper({ puppeteer: { headless: true, args: ['--no-sandbox', '--disable-setuid-sandbox'] } });
let res = await SEARCH_SCRAPPER.scrape(patternSearch, 250);