Browser Download Workaround
The browser tool doesn't support direct file downloads. Use this workaround to download files from authenticated sessions.
Method
- Extract cookies from the browser session
- Use curl with those cookies to download
Step 1: Extract Cookies
// In browser act → evaluate
document.cookie
Step 2: Download with curl
curl -L -b "cookie1=value1; cookie2=value2" -o /path/to/output.file "https://url/to/download"
Gmail Attachment Example
# 1. Get cookies from Gmail session
# browser act → evaluate → document.cookie
# 2. Download attachment
curl -L \
-b "GMAIL_AT=xxx; SID=yyy; HSID=zzz" \
-o ~/Downloads/attachment.pdf \
"https://mail.google.com/mail/u/0?ui=2&ik=xxx&attid=0.1&disp=safe&realattid=xxx&zw"
Google Drive Example
curl -L \
-b "SID=xxx; HSID=yyy" \
-o ~/Downloads/file.pdf \
"https://drive.google.com/uc?export=download&id=FILE_ID"
Tips
- Use
-Lto follow redirects - Use
-oto specify output filename - Some sites require additional headers:
-H "User-Agent: Mozilla/5.0..." - For large files, add
--progress-barto see download progress
Alternative: Browser Screenshot/Print
For documents that can't be downloaded:
- Navigate to the document in browser
- Use
browser screenshot --fullPageto capture - Or use
browser pdfto save as PDF (if supported)