Discord Bot that web-scraps U-Cursos and U-Campus to get information about engineering courses from the Universidad de Chile.
Discord.py bot that uses beautifulsoup to embed information obtained from both U-Cursos and U-Campus according to the given course, it uses public data and does not require to log in.
I suggest that you don't overuse this bot since U-Cursos gets a lot of traffic depending on the time of year. This project is both for entertainment and learning purposes only.
Check the self-hosting section to get more information about the project's structure and how to run this by yourself.
The bot is currently being hosted at Heroku, not very efficient and runs out of Dynos by the end of the month but gets the job done (might make new schedules to turn it on and off). You can invite it to your server by using this link.
Gets you general info about the bot and how to use it to your discord DMs.
Information about the bot: ping, guilds and version.
This embeds the last post in said course and section if it's publicly available, you can click it if logged in your browser to get to the post inmediately. The syntax is as follows:
u post required_course_code (optional_section=1)
This embeds the course's section schedule for the current, previous or next week. The syntax is a follows:
u post required_course_code required_section (optional_week = prev|act|sig)
This embeds general course information, such as credits, requirements and the program if available. The syntax is as follows:
u info required_course_code
First of all you need to create a virtual python evironment or pip install all the dependencies. You might need to check which python version works fine with discord.py. Then clone this repository.
- Python 3
- BeautifulSoup
- Discord
You need to get your own discord bot token at discord's developer portal and replace it in the bot.py file:
# bot.run(YOUR_TOKEN)
bot.run(os.environ['token'])
Invite the bot you created to your server and run bot.py, you should be good to go.
Polarisu
This project is licensed under the [MIT] License - see the LICENSE.md file for details