I followed this documentation, How to make a twitter bot for free in order to configure the lambda service that make the post of the tweet.
In the other hand, the main.py file is responsible for scraping the site, write the information into a file located at S3 Bucket, and call the AWS API Gateway. So, this module is executed on replit.com and stay alive thanks to uptimerobot.com. According to this, if the AWS API is triggered, the AWS Lambda function will be executed and the tweet will be posted.
- Atexit: It is executed, in case of the interpreter stop (built-in library).
- Boto3: Read, Write and Update the information on the bucket.
- Httpx: Make a GET request to an AWS API Gateway in order to make the tweet.
- Selenium: Scrap the site.
- Rocketry: Schedule the task to make all the process.
- Tweepy: Handle the twitter api. So, It post the tweet.
- Replit: Hold the project online.
- Uptimerobot: Keep the project alive using the replit url, previously generated with Flask.
- AWS Lambda: Handle the possibility of post the tweet, reading the bucket for updated information.
- AWS S3: Store the csv file with the scraped information.
- AWS API Gateway: Trigger that call de AWS Lambda function.
Posting a graphic
Posting a tweet
Posting a tweet with a different text