HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //workspace/retry_failed.sh
#!/bin/bash
WRAPPER="/root/clawd/skills/x-twitter/scripts/x_twitter.py"
PROFILE="datathrop"
OK=0
FAIL=0
TOTAL=0

while IFS= read -r tid; do
    TOTAL=$((TOTAL+1))
    URL="https://x.com/datathrop/status/$tid"
    
    # Try delete first
    RESULT=$(python3 "$WRAPPER" --profile-key "$PROFILE" delete "$URL" 2>&1)
    RC=$?
    
    if [ $RC -eq 0 ] && echo "$RESULT" | grep -q '"ok": true'; then
        OK=$((OK+1))
        echo "[$TOTAL/292] DELETE OK: $tid"
    else
        # Try unretweet as fallback
        RESULT2=$(python3 "$WRAPPER" --profile-key "$PROFILE" unretweet "$URL" 2>&1)
        RC2=$?
        if [ $RC2 -eq 0 ] && echo "$RESULT2" | grep -q '"ok": true'; then
            OK=$((OK+1))
            echo "[$TOTAL/292] UNRETWEET OK: $tid"
        else
            # Check if already gone
            if echo "$RESULT$RESULT2" | grep -qi "not found\|already\|does not exist\|no status"; then
                OK=$((OK+1))
                echo "[$TOTAL/292] ALREADY GONE: $tid"
            else
                FAIL=$((FAIL+1))
                echo "[$TOTAL/292] STILL FAILING: $tid"
                echo "  stderr: $(echo "$RESULT" | tail -1)"
            fi
        fi
    fi
    
    sleep 2
done < /tmp/failed_ids.txt

echo ""
echo "=== RETRY DONE: $OK ok, $FAIL still failing out of $TOTAL ==="