Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AnythingLinux/642bba896d358c2c3ef3c47d12bbb0b0 to your computer and use it in GitHub Desktop.

Select an option

Save AnythingLinux/642bba896d358c2c3ef3c47d12bbb0b0 to your computer and use it in GitHub Desktop.
Download any Website form Claude Platform
Go to platform.claude.com → switch to workspace wrkspc_012A6P52BYVhwVTH (top-left workspace switcher)
Go to Settings → API Keys within that workspace
Create a new key there
Use it:
cd /var/www/html
nano download.py
import anthropic
client = anthropic.Anthropic()
SESSION_ID = "sesn_015nK5qMCEk98ZLw"
# List all output files from the session
files = client.beta.files.list(
scope_id=SESSION_ID,
betas=["managed-agents-2026-04-01"], # required alongside the auto-added files beta
)
# Download each file
import os
for f in files:
os.makedirs(os.path.dirname(f.filename) if os.path.dirname(f.filename) else ".", exist_ok=True)
resp = client.beta.files.download(f.id)
with open(f.filename, "wb") as out:
out.write(resp.read())
print(f"Downloaded: {f.filename} ({f.size_bytes} bytes)")
# save and exit
source /var/www/env/bin/activate
python3 download_site.py
pip install anthropic --break-system-packages
export ANTHROPIC_API_KEY="sk-ant-<new-key-from-that-workspace>"
python3 download_site.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment