[PR #131] [MERGED] Fix Twitter posting flow for X compose UI #127

Closed
opened 2026-03-02 04:06:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/FujiwaraChoki/MoneyPrinterV2/pull/131
Author: @FujiwaraChoki
Created: 3/1/2026
Status: Merged
Merged: 3/1/2026
Merged by: @FujiwaraChoki

Base: mainHead: fix/twitter-compose-resilience


📝 Commits (2)

  • 4cdc6f0 Fix Twitter posting flow for X compose UI
  • 05620a4 Avoid unnecessary tweet generation for manual posts

📊 Changes

1 file changed (+78 additions, -50 deletions)

View changed files

📝 src/classes/Twitter.py (+78 -50)

📄 Description

Summary

  • make the Twitter bot post from https://x.com/compose/post instead of relying on stale timeline selectors
  • add robust textarea and post-button selector fallbacks with explicit waits to tolerate X UI variations
  • validate Firefox profile directories early and prevent recursive over-generation when post text exceeds the char limit
  • correct twitter cache bootstrap to use accounts shape and always return a list from get_posts

Why this change

Issue reports show repeated failures where the bot cannot find the new tweet button/text box after X UI updates, then crashes or loops. This update makes the posting path resilient to current compose patterns and improves error messages so setup mistakes are actionable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/FujiwaraChoki/MoneyPrinterV2/pull/131 **Author:** [@FujiwaraChoki](https://github.com/FujiwaraChoki) **Created:** 3/1/2026 **Status:** ✅ Merged **Merged:** 3/1/2026 **Merged by:** [@FujiwaraChoki](https://github.com/FujiwaraChoki) **Base:** `main` ← **Head:** `fix/twitter-compose-resilience` --- ### 📝 Commits (2) - [`4cdc6f0`](https://github.com/FujiwaraChoki/MoneyPrinterV2/commit/4cdc6f0721a7878c02790fd0adda196b4a092d16) Fix Twitter posting flow for X compose UI - [`05620a4`](https://github.com/FujiwaraChoki/MoneyPrinterV2/commit/05620a490f3e8af2a890dcc42cbb5193f4c83d6a) Avoid unnecessary tweet generation for manual posts ### 📊 Changes **1 file changed** (+78 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `src/classes/Twitter.py` (+78 -50) </details> ### 📄 Description ## Summary - make the Twitter bot post from `https://x.com/compose/post` instead of relying on stale timeline selectors - add robust textarea and post-button selector fallbacks with explicit waits to tolerate X UI variations - validate Firefox profile directories early and prevent recursive over-generation when post text exceeds the char limit - correct twitter cache bootstrap to use `accounts` shape and always return a list from `get_posts` ## Why this change Issue reports show repeated failures where the bot cannot find the new tweet button/text box after X UI updates, then crashes or loops. This update makes the posting path resilient to current compose patterns and improves error messages so setup mistakes are actionable. ## Related issues - #100 - #111 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 04:06:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/MoneyPrinterV2#127
No description provided.