Skip to content

Electronic-Mango/wowhead-news-rss-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wowhead news RSS filter

Wowhead does provide RSS feed for its news section, however it's categories selection is limited. For example - you cannot receive news only from live category, there's only live+PTR together. You are also always receiving sponsored posts.

This REST API wraps Wowhead's RSS, but allows for filtering out any category you like.

The API is created with Python3.11 and FastAPI.

Running the API

Manually

  1. Install all packages from requirements.txt
  2. Start the api via uvicorn
pip install -r requirements.txt
uvicorn src.main:app

Uvicorn will by default start the API on address 127.0.0.1:8000, you can change it via --host <new host> and --port <new port> parameters. More details are in Uvicorn documentation.

Docker

You can start the API via Docker Compose, without any additional configuration:

docker compose up -d --build

By default, Compose will forward local port 5021 to container port 8000, where the API is listening. You can change both ports in docker-compose.yml, just make sure, that environment variable UVICORN_PORT matches new forwarded port on container side.

environment:
  - UVICORN_PORT=8000
ports:
  - 5021:8000

You can remove ports section if you want to disable port forwarding.

Endpoints

You can access (automatically generated) docs via /, /docs or /redoc.

Besides docs, there's only one endpoint /news/{category}. You can check values for category at the bottom of Wowhead news page, there's a RSS button with all categories. Just make sure that you check the last value in URL, not the name on the page.

Some examples (case sensitive) are:

Without any additional parameters it will just forward Wowhead news RSS for a given category. You can remove articles from specific categories via remove query parameter. You can specify multiple remove parameters to remove multiple different categories.

Route Description
/news/all All unfiltered news
/news/retail?remove=PTR Retail WoW news without articles from "PTR" category
/news/classic-series?remove=Blizzard&remove=Wowhead Classic WoW news without articles from "Blizzard" or "Wowhead" category

Errors

If Wowhead responds with anything else than code 200, then API will forward received status code with message "Error when accessing Wowhead!". Response contents are not forwarded as Wowhead usually responds with full webpage.

Code 404 usually means, that value of passed category is incorrect. Keep in mind, that value for category is case sensitive, as it is case sensitive for Wowhead RSS links.

Disclaimer

This API is in no way affiliated, associated, authorized, endorsed by, or in any way officially connected with Wowhead. This is an independent and unofficial project. Use at your own risk.