Skip to content

twitter search returns empty results (INTERCEPT strategy not catching SearchTimeline) #86

@light202505

Description

@light202505

Description

opencli twitter search consistently returns empty results, while other twitter commands (e.g. trending, timeline) work fine.

Environment

  • opencli v0.9.8
  • macOS (Darwin 25.3.0)
  • opencli doctor --live all OK, browser connectivity confirmed

Steps to Reproduce

# Simple search — returns nothing
opencli twitter search --query "AI" --limit 10 --verbose

# Output:
# [opencli] Mode: extension
# [opencli] Extension token: fingerprint a2e4613e
# [Verbose] Warning: Command returned an empty result.
# (no data)

Tried various queries (English, Chinese, with/without advanced operators) — all return empty.

Working commands for comparison

# trending works perfectly (uses YAML/DOM strategy)
opencli twitter trending
# → returns 13 items successfully

Root Cause Analysis

Looked at the source (src/clis/twitter/search.ts):

  • search uses Strategy.INTERCEPT with page.installInterceptor('SearchTimeline')
  • The interceptor navigates to x.com, waits 2s, installs interceptor, then navigates to search URL and waits 5s
  • page.getInterceptedRequests() returns empty — the SearchTimeline API response is not being captured

Possible causes:

  1. Twitter/X may have changed the API endpoint name (no longer SearchTimeline)
  2. Timing issue — the API call may fire before the interceptor is installed
  3. The intercept strategy may not be compatible with the current Playwright MCP Bridge version

Expected Behavior

Should return search results matching the query, similar to what the Twitter web UI shows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions