remy / inliner

Node utility to inline images, CSS and JavaScript for a web page - useful for mobile sites
MIT License
1.1k stars 165 forks source link

Retrying on 503 errors #193

Open adamkerz opened 5 years ago

adamkerz commented 5 years ago

Some slow/low powered servers throw lots of 503 errors when trying to scrape a bunch of images at once. It would be nice for Inliner to either retry on 503 or for me to set an option to limit the number of requests being made at once.

adamkerz commented 5 years ago

I worked around the issue by "saving as" "webpage complete" with chrome, then inlining that file.

Still, a way to limit the number of synchronous requests would be nice.

remy commented 5 years ago

Makes sense - I'd take a PR if you want to take a shot.

adamkerz commented 5 years ago

Sorry remy, unfortunately it's beyond my time abilities at the moment - my JS isn't that strong and the Stackoverflow page that I found made it look complicated. Perhaps it would be simpler to make the code only make a single request at a time, but still, I just don't have the time and I found a workaround, as detailed above. Thanks for the great tool, though!