Skip to content

Creating a Twitter Bot for Stafford SK Modified Race Results

License

Notifications You must be signed in to change notification settings

JacobMannix/stafford-racing-twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stafford Motor Speedway Racing Results Twitter Bot

GitHub GitHub top language GitHub last commit

This script posts tweets to twitter in order to share the most recent racing results from Stafford Motor Speedway's SK Modified Feature Events. The tweet includes the date of the race, the race title, the top 5 finishers and the link to the full article on the tracks website.

Stafford Motor Speedway Website                                                                                   Twitter @TheKingTC13

StaffordandTwitter

Environment Variables

  • See the docs: python-dotenv.
  • Change the below variables in '.env'. Using environment variables to secure api keys.

Twitter API Variables

API_ACCESS_SECRET: <API_ACCESS_SECRET_base64_encoded>
API_ACCESS_TOKEN: <API_ACCESS_TOKEN_base64_encoded>
API_KEY: <API_KEY_base64_encoded>
API_SECRET: <API_SECRET_base64_encoded>

Twitter Account Variable

The twitter account username used in the API.

TWITTER_ACCOUNT: <TWITTER_ACCOUNT_base64_encoded>

Webhook Variable

The webhook URL if you want to send messages using webhooks.

WEBHOOK_DISCORD: <WEBHOOK_DISCORD_base64_encoded>

Other Variable

The URL that contains a list of posts.

ARCHIVE_WEBSITE: <ARCHIVE_WEBSITE_base64_encoded>

Functions in Script

  • tweepyThread - Function using tweepy in order to send multiple tweets in a thread fashion.
  • discordMessage - Function using requests to send messages over webhooks, this one is used mainly for discord.
  • staffordResults - The main part of this script

About

Creating a Twitter Bot for Stafford SK Modified Race Results

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages