Skip to content

Conversation

@brenopolanski
Copy link
Contributor

@brenopolanski brenopolanski commented Nov 3, 2025

Summary

Note: Merge this PR first #63

This PR fixes a critical bug in the impersonation detection logic that was incorrectly flagging legitimate tweets as impersonation attempts. Additionally, it improves the robustness of tweet container selectors to handle different Twitter/X localizations and UI variations.

Changes

  • Fixed incorrect flagging: The previous logic was comparing the impersonator's handle with the safe handle and then flagging tweets matching the safe handle (the legitimate account), which was backwards
  • Correct behavior: Now properly identifies and flags tweets from the impersonator's handle instead of the legitimate user's tweets
  • Added fallback selectors for localized versions of Twitter/X (e.g., Portuguese "Conversa", Japanese "会話")
  • Implemented graceful degradation: if timeline container isn't found, searches entire document for tweets

Preview

Screenshot from 2025-11-03 15-59-05 Screenshot from 2025-11-03 15-59-16 Screenshot from 2025-11-03 16-01-08 Screenshot from 2025-11-03 16-54-35 Screenshot from 2025-11-03 16-58-29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant