A simple python code to track planes and notify you via discord webhooks
Warning
This should be used for your own educational purposes. If you are interested in accessing Flightradar24 data commercially, please contact business@fr24.com. See more information at Flightradar24's terms and conditions.
Firstly clone repository and install dependencies:
git clone https://github.com/KonradowyPL/planeTracker.git
cd planeTracker
pip install -r requirements.txt
mkdir dump
touch config.jsonThen install FlareSolverr
In config.json add following:
{
"webhook": "WEBHOOK URL",
"name": "Plane Spotter",
"icon": "https://example.com/icon.png",
"color": "blue",
"embedColor": "2CA3DA",
"planes": ["HB-LUN", "HB-LUZ"],
"font": "/path/to/font.ttf",
"userAgent": "PlaneTracker/0.0 (example@example.com)",
"flareSolver": "http://localhost:8191/v1",
"dump": "FLIGHT,TILE"
}where:
webhookis your Discord webhook URL.nameis the username of your Discord bot.iconis the link to your Discord bot avatar.coloris the color of the plane trace in hex or from Pillow's list of colors. If you remove this field, line color will be calculated according to thisembedColoris the hex color of the sidebar of the embed. In this case, light blue.planesis an array of plane registration numbers that you want to track.fontis path to ttf font file. If not specifed defeault one will be used.userAgentis User-Agent sent with requests to OpenStreetMap. To prevent blocking it is recommended to put here Your contact email.flareSolveris link to Your FlareSolverr instancedumpoptional: specifies what requests do dump and cache for future use:FLIGHTwill cache all flights,TILEwill cache map tiles andALLwhich isn't recommended and should be used only when debugging
I recommend launching it via cron every day:
0 23 * * * bash -c 'cd /path/to/planeTracker && python /path/to/planeTracker/main.py' 2>&1 >> /path/to/errors.log
Feel free to open issues and make PRs.
This repository is under MIT license. See license file.