DannyBen / snapcrawl

Crawl a website and take screenshots
MIT License
58 stars 12 forks source link

Try catch error instead of stopping script #19

Closed szydloit closed 5 years ago

szydloit commented 5 years ago

Hello, maybe there's option to catch error / igonre url if it's not valid, instead of stopping script . Here's example when somebody put utf letter for mistake:

image

URI::InvalidURIError URI must be ascii only "https://www.obowi\u0105zki-informacyjne.pl/"

DannyBen commented 5 years ago

That is an easy fix. Will work on it later today.

DannyBen commented 5 years ago

Ok. I have added some handling of unicode URLs, + catching some exceptions. Since I do not want to catch ALL exceptions, some errors might still occur in cases that we haven't encountered yet. When they do, we will adjust the rescue blocks.

Version 0.3.1 is live on RubyGems and the docker image is being built right now and should be ready soon.