Skip to content

Instantly share code, notes, and snippets.

@cmj
Created November 10, 2025 15:53
Show Gist options
  • Select an option

  • Save cmj/7533621d4e0b1f47135169143be7d2b9 to your computer and use it in GitHub Desktop.

Select an option

Save cmj/7533621d4e0b1f47135169143be7d2b9 to your computer and use it in GitHub Desktop.
Create Bluesky post screenshot
#!/bin/bash
# Grab a bluesky post screenshot
# ex: https://bsky.app/profile/gamingonlinux.com/post/3m5bsgkarya23?ref_src=embed
input=$1
usage() { echo "$0 <bluesky_url>"; exit 1; }; [ -z "$input" ] && usage
handle=$(cut -d/ -f5 <<< "${input}")
post=${input##*/}
did_url="https://bsky.social/xrpc/com.atproto.identity.resolveHandle"
did=$(curl -s -G \
-d "handle=$handle" \
"$did_url" | jq -r .did)
file="${handle}-${post%%\?*}-$(date +%Y-%m-%d_%H%M%S).png"
shot-scraper "https://embed.bsky.app/embed/${did}/app.bsky.feed.post/${post%%\?*}?colorMode=dark" \
-p -4 \
--retina \
--wait 2000 \
-s '.max-w-full.pb-2\.5.pt-3.px-4.flex-1' \
-o "$file" 2>&1 | sed 's/.* written /Screenshot written /'
# upload to imgur
#imgur "$file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment