πŸ“… 2023-01-14 β€” Session: Developed Python scripts for Twitter automation

πŸ•’ 21:20–22:20
🏷️ Labels: Python, Twitter Api, Automation, File Management
πŸ“‚ Project: Dev
⭐ Priority: MEDIUM

Session Goal

The goal of this session was to develop and refine Python scripts for automating Twitter interactions, specifically focusing on managing followers and file operations.

Key Activities

  • Implemented a Python function to write follower data to a file with a line limit to prevent overflow.
  • Developed a function to save followers of users from a β€˜followers_list’ file to a β€˜fu_candidates’ file using the Tweepy API.
  • Created a function to write unique followers to a file, ensuring no duplicates by utilizing a set.
  • Modified a function to follow users based on follower count, organizing user information into separate files based on follow status.
  • Implemented a script to follow users with 1000 to 10000 followers, categorizing them into different files based on follow status.
  • Developed a method to remove processed lines from a file using Python libraries linecache and os.

Achievements

  • Successfully created a suite of Python scripts to automate Twitter follower management and file operations.
  • Enhanced functionality to ensure efficient data handling and user categorization.

Pending Tasks

  • Further testing and optimization of scripts for edge cases and performance improvements.