🏀 The NBA LINE Bot with 9 features!
Watch NBA games, check the schedule, lookup the stats, search for players by using Daily-NBA. Button carousel templates are designed and implemented in every feature. Instead of directly typing the commands to the LINE bot, users can just simply press buttons on the carousel template to browse the features and access the NBA information!
There are four main componenets in this project
- LINE Bot: Built by the official LINE Messaging API
- Web Scraping: Use BeutifulSoup to scrape several websites to retrieve NBA information
- Backend: Built the backend with Flask to handle the webhook
- FSM: Create FSMs with pytransitions for the users state management
Finite State Machine is implemented for the state management of the users. A FSM is maintained for each individual user. This way, every user has their own independent state, and the operations between two different users will not affect each other.
Finite state machine is a model in Theory of Computation. This model is implemented in Daily-NBA. Each feature is represented by a state, and the button that user pressed on the carousel template will trigger the transitions between states. The FSM graph is drawn by GraphMachine in transitions.extensions.
Checking out all the scores of the games on that day. (Today / Yesterday / Manually input date)
Searching for a specific player. (Manually input player name)
Searching for a specific team. (Manually input team name)
Showing the team standing from both Eastern and Western conference.
Showing the game schedule tomorrow.
Showing the stat leaders. (Most Points / Assist / Rebound / 3PM / Steal / Block)
Checking out the box score of a specific game. (Manually input date and team)
My favoritie feature! Brininging the best and newest NBA meme to you by pressing one button.
Bringing the hottest NBA news to you by pressing one button.
All data comes from basketball-reference.com.
NBA memes come from twitter@NBAMemes.
NBA news come from realgm.
MIT © chonyy