{"id":13798028,"url":"https://github.com/plcnk/TwitterFlightBot","last_synced_at":"2025-05-13T05:31:29.415Z","repository":{"id":56799054,"uuid":"522727976","full_name":"plcnk/TwitterFlightBot","owner":"plcnk","description":"(ARCHIVED) A Twitter bot that tells you information about a flight by it's number or callsign.","archived":true,"fork":false,"pushed_at":"2023-10-02T18:46:09.000Z","size":79,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-15T04:34:26.067Z","etag":null,"topics":["aviation","bot","flight","flight-radar","flightradar24","flightradar24-api","python","python3","tweepy","twitter","twitter-api","twitter-bot"],"latest_commit_sha":null,"homepage":"https://twitter.com/FlightStatusBot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plcnk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-08-08T22:38:51.000Z","updated_at":"2023-10-02T18:46:33.000Z","dependencies_parsed_at":"2023-02-17T10:16:03.625Z","dependency_job_id":"310611d8-bac9-4ff8-b6ba-c20485059ceb","html_url":"https://github.com/plcnk/TwitterFlightBot","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plcnk%2FTwitterFlightBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plcnk%2FTwitterFlightBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plcnk%2FTwitterFlightBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plcnk%2FTwitterFlightBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plcnk","download_url":"https://codeload.github.com/plcnk/TwitterFlightBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253883050,"owners_count":21978597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aviation","bot","flight","flight-radar","flightradar24","flightradar24-api","python","python3","tweepy","twitter","twitter-api","twitter-bot"],"created_at":"2024-08-04T00:00:38.026Z","updated_at":"2025-05-13T05:31:29.052Z","avatar_url":"https://github.com/plcnk.png","language":"Python","funding_links":[],"categories":["Fightradar/Trackers"],"sub_categories":["Other"],"readme":"# (ARCHIVED) Twitter Flight Bot\n\nThis bot will return information about a flight when you tag it with its flight number or its callsign.\nTo use it, you need to tag it by its Twitter handle [@FlightStatusBot](https://twitter.com/FlightStatusBot) and follow with a flight number / callsign like so: `.@FlightStatusBot U2189`.\n\nThe bot will reply to you with the following information:\n\n* The airline name with the flight number / callsign\n* The origin airport name\n* The actual departure time in UTC timezone\n* The arrival airport name\n* The Estimated Time of Arrival in UTC timezone\n* The altitude in feet\n\n\u003e **Note** -\n\u003e Be aware that the flight must be active for the bot to work, meaning the plane's transponder must be on.\n\nThe code is written in Python and uses [Tweepy](https://pypi.org/project/tweepy/) for the Twitter connection and [FlightRadarAPI](https://pypi.org/project/FlightRadarAPI/) for the Flghtradar24 API.\nThis bot is not affiliated with [Flightradar24](https://www.flightradar24.com/) in any way.\n\n## Setup\n\nTo run the code yourself, you will need to create an App on the [Twitter Developer Portal](https://developer.twitter.com/en/portal/dashboard) and generated your tokens to be able to use the API.\n\nAfter that, there are multiple methods to run this bot.\n\n### First method: Use the Docker image (recommended)\n\nA [Docker image](https://hub.docker.com/r/plck/twitterflightbot) is available for this project, which makes it easier for production environment and is the method I would recommend. You will first need to have [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/) installed on your machine for this to work.\n\nFirst, cd into this repository:\n\n```shell\ncd ./TwitterFlightBot\n```\n\nThen, edit the `docker-compose.yml` file with your Twitter API credentials:\n\n```yaml\nenvironment:\n    TWITTER_API_KEY: \"XXXXX\"\n    TWITTER_API_KEY_SECRET: \"XXXXX\"\n    TWITTER_ACCESS_TOKEN: \"XXXXX\"\n    TWITTER_ACCESS_TOKEN_SECRET: \"XXXXX\"\n    TWITTER_BEARER_TOKEN: \"XXXXX\"\n```\n\nFinally, start the bot using this command:\n\n```shell\ndocker compose up -d\n```\n\nIf you want to stop the bot, use this command:\n\n```shell\ndocker compose down\n```\n\n### Second method: Directly run the code\n\nYou can directly run the code on your machine or your VM. You will need to have Python3 installed, which comes by default on most Linux distros.\n\nIf you don't have it, install pip:\n\n```shell\nsudo apt install python3-pip\n```\n\nFirst, cd into this repository:\n\n```shell\ncd ./TwitterFlightBot\n```\n\nI recommend using a virtual environment to run the code, you can find out how to use this [here](https://docs.python.org/3/tutorial/venv.html). It is not required, but I highly recommend virtualenvs to avoid breaking your main environment.\n\nAfter that, install the required packages with this command:\n\n```shell\npip install -r requirements.txt\n```\n\nNext, you will need to export your Twitter API credentials as environment variables:\n\n```shell\nexport TWITTER_API_KEY=\"XXXXX\"\nexport TWITTER_API_KEY_SECRET=\"XXXXX\"\nexport TWITTER_ACCESS_TOKEN=\"XXXXX\"\nexport TWITTER_ACCESS_TOKEN_SECRET=\"XXXXX\"\nexport TWITTER_BEARER_TOKEN=\"XXXXX\"\n```\n\nFinally, start the bot with `python main.py`.\n\n## License\n\nThis project is licensed under MIT License. See [LICENSE](https://github.com/plcnk/TwitterFlightBot/blob/master/LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplcnk%2FTwitterFlightBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplcnk%2FTwitterFlightBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplcnk%2FTwitterFlightBot/lists"}