diff options
| author | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 13:39:30 +0100 |
|---|---|---|
| committer | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 13:47:00 +0100 |
| commit | ee7b2ba718c47fa7f4ef67af08e5906f3d5333b5 (patch) | |
| tree | 98262ffeed7f1676d9bbea285048a65bc8fbfc49 /site/2023-11-15-scraping-images-from-open-tabs.md | |
| parent | 34154a73b321c5a9b8f35fb2d3682b93333242ca (diff) | |
replace zola with soupault
Diffstat (limited to 'site/2023-11-15-scraping-images-from-open-tabs.md')
| -rw-r--r-- | site/2023-11-15-scraping-images-from-open-tabs.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/site/2023-11-15-scraping-images-from-open-tabs.md b/site/2023-11-15-scraping-images-from-open-tabs.md new file mode 100644 index 0000000..b0aebb6 --- /dev/null +++ b/site/2023-11-15-scraping-images-from-open-tabs.md @@ -0,0 +1,25 @@ +# Scraping images from open tabs + +<time id="post-upload-date">2023-11-15</time> +<time id="post-update-date">2023-11-15</time> + +```zsh +cat export.json \ + | jaq --raw-output '..["url"]? | strings' \ + | rg --fixed-strings "wallhaven.cc/w" \ + | gallery-dl --input-file - +``` +I exported my current session to json with tab session manager. This command +takes that json export (referred to as `export.json`), finds all the urls +that contain `wallhaven.cc/w` (i.e. all urls that are wallhaven images) and +passes them to gallery-dl. Gallery-dl then neatly downloads all of those images +in their original quality. + +This workflow could be made better by creating a version of tab session manager +that exports in a simpler (or more configurable format), and I could also turn +this into a script that takes the wanted website formats as an argument. +Invocation of the script might look something like: +```zsh +tabsession-dl --format "wallhaven.cc/w" --format "reddit.com/r" \ + --input-file export.json +``` |
