This repo parses the relevant pages from the Animal Crossing WiKi to a JSON object that is front-end friendly to parse and use. The end goal is to create a REST API for the data.
As the wiki updates, there is a high chance that the script will be incompatible with the newest wiki's structure. If the new wiki updates to break the script, the plan is to incorporate caching to use the last successful set of data that was converted as the data until the scripts can be updated.
- BeautifulSoup: parsing the AC:NH Wiki
- Flask: web framework
- Heroku: cloud platform service
- Fossils
- Villagers
- Events
The parser is written in Python. There are a couple ways to access the data.
- Downloading the static
json
files under thedata
directory manually. These files get updated when I push changes to the repo, so it might not be as up to date. - Through the API endpoints. These endpoints scrapes the latest Wiki at runtime therefore the informcation is as up to date as possible.
- Running the heroku app locally and accessing the API endpoints via localhost. This method also scrapes the latest wiki at runtime so should also be up do date.
In the case that the Wiki has made structural/content changes to the page that the scraper is broken, it's set to return the static json files in the repo as backup.
python3 -m venv env
source env/bin/activate
export APP_SETTINGS="config.DevelopmentConfig"
pip3 install -r requirements.txt
python3 app.py
- go to
http://localhost/{ENDPOINT}
This is an in progress work, so feel free to reach out to me for any rooms for improvement, or feel free to open a PR to contribute!
Contact me @KirinSoo#9364 on Discord!