simonw / shot-scraper

A command-line utility for taking automated screenshots of websites
https://shot-scraper.datasette.io
Apache License 2.0
1.57k stars 70 forks source link

Option to provide headers and cookies #122

Closed nekromoff closed 8 months ago

nekromoff commented 8 months ago

Would it be possible to add an option to provide any generic HTTP headers (currently only User-agent is available) and cookies via CLI?

Cookies could be included as files or in other reasonable way. Even YAML could work for this similar to existing authentication options.

nekromoff commented 8 months ago

I needed this mostly for cookies, but I found solution by using Javascript to hide cookie banners: https://shot-scraper.datasette.io/en/stable/screenshots.html#executing-custom-javascript https://shot-scraper.datasette.io/en/stable/screenshots.html#tips-for-executing-javascript