(I fail at this every two years, here we go again, now with your help).
I want to take screenshots of a few news websites for a little fake news project of mine, and most approaches return something completely different than what I'm seeing when I open Chrome.
Limited height would be better/ok (something like the first 3000 pixels). Those news websites many times have infinite scrolling.
I've tried:
- phantomJS (rendering sucked, tried every technique I could find to wait for JS to load)
- wkhtmltopdf (almost ok, generates a huge 30M image with all the height, no antialiasing it seems)
- https://github.com/gen2brain/url2img (this was the best so far, uses Qt bindings but not the latest version)
- actually run a headless browser in DigitalOcean with xvfb-run and take a screenshot: I failed at this
What I didn't tried was Selenium, because it seemed even harder.
How would you do it?