Files
workspace/skills/deep-scraper/scripts/launch-chrome-debug.sh
Case 8638500190 Feed Hunter: deep scraper skill, pipeline, simulator, first investigation
- Built deep-scraper skill (CDP-based X feed extraction)
- Three-stage pipeline: scrape → triage → investigate
- Paper trading simulator with position tracking
- First live investigation: verified kch123 Polymarket profile ($9.3M P&L)
- Opened first paper position: Seahawks Super Bowl @ 68c
- Telegram alerts with inline action buttons
- Portal build in progress (night shift)
2026-02-07 23:58:40 -06:00

43 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Launch Chrome with remote debugging for deep scraping
# Uses a copy of the user's profile to enable debug port
PROFILE_SRC="/home/wdjones/.config/google-chrome"
PROFILE_DBG="/home/wdjones/.config/google-chrome-debug"
PORT=${1:-9222}
# Kill any existing debug chrome
pkill -f "chrome-debug" 2>/dev/null
# Create/sync debug profile
if [ ! -d "$PROFILE_DBG" ]; then
echo "Creating debug profile (first time, this takes a moment)..."
cp -r "$PROFILE_SRC" "$PROFILE_DBG"
else
# Sync cookies and local storage
cp "$PROFILE_SRC/Default/Cookies" "$PROFILE_DBG/Default/Cookies" 2>/dev/null
cp -r "$PROFILE_SRC/Default/Local Storage" "$PROFILE_DBG/Default/Local Storage" 2>/dev/null
fi
rm -f "$PROFILE_DBG/SingletonLock" "$PROFILE_DBG/SingletonSocket" "$PROFILE_DBG/SingletonCookie" 2>/dev/null
DISPLAY=:0 /usr/bin/google-chrome-stable --no-sandbox \
--user-data-dir="$PROFILE_DBG" \
--remote-debugging-port=$PORT \
--remote-allow-origins=* \
https://x.com/home &>/dev/null &
echo "Chrome launched (PID $!, debug port $PORT)"
echo "Waiting for port..."
for i in $(seq 1 15); do
if curl -s "http://127.0.0.1:$PORT/json" >/dev/null 2>&1; then
echo "Ready!"
exit 0
fi
sleep 1
done
echo "ERROR: Port $PORT not ready after 15s"
exit 1