X-POSTS-READER-BOT
X-POSTS-READER-BOT simulates humans logging into an X account and navigating to a search bar. One can instruct this bot to read posts for a user or the latest or top posts for a keyword. The bot scrolls through posts, reading, printing, and collecting data.
The bot is run from a terminal. It prints exceptions and ‘posts’ information on the terminal. It creates a CSV file with the ‘posts’ information.
NOTE: The bot and the ‘posts’ data files are not for sale.
The bot uses Python3 (selenium, getpass, time, and a custom pyXPost class). The code is neat, DRY, modular, and follows OOP principles.
Input:
1. X login
2. X password
3. Number of posts to read (default, 5)
4. LOOKUP or USER Search type
5. User handle (required if #4 is USER)
6. Lookup term (required if #4 is LOOKUP)
7. TOP or LATEST tweets to read (default, LATEST)
Output (POSTS):
1. Poster name
2. Poster handle
3. Poster verified status
4. Post date and time
5. Post text
6. Post comment count
7. Post retweet cout
8. Post heart count
9. Post view count