Tree of Savior for the "international" region does not have its own RSS feed, so I sought to make one manually. This code scrapes one page of the "News" section of the website per run and creates an appropriate RSS feed. (The feed.xml.original
file serves as the template, but doesn't contain entries.)
Run feed.py
. You may also run db.py
first to create the necessary database.
This code is designed around the following:
- Python 3.5+
bs4
and its dependencies, used for scrapingrequests
and its dependencies, used in conjunction withbs4
feedgen
and its dependencies, used for creating the RSS feedpendulum
and its dependencies, used for date and time- other requirements
Set up your environment for self-hosting. Read Requirements for dependencies.
Python venv
is highly recommended for managing your files, including dependencies.
Like so:
$ git clone <url> && cd tos_rss
$ # venv may be installable in package management.
$ # For Debian-like distros, `apt install python3-venv`
$ python -m venv venv
$ . venv/bin/activate
(venv) $ pip install -r requirements.txt
No other configuration is necessary.
See here. The file is generated every hour using cron
. You are free to use the live version however you see fit.
For example, I have used IFTTT to post automatic messages in Discord. (If RSS Feed, then Webhooks.)
This project is not affiliated with or endorsed by Tree of Savior. See LICENSE
for more detail.