Discord Job Bot (Python Automation)
A custom Python Discord bot that automates GIS job searching by pulling data from APIs and scraping sites that do not provide an API, then posting new opportunities directly into a Discord channel. I built this to help myself and my classmates keep up with new openings without refreshing job boards all day.
Summary
This project uses Python, the Discord API, and scheduled tasks to automatically fetch newly posted GIS related jobs from supported job APIs and from selected job sites that do not expose an API. The bot posts each new listing into a Discord channel with the job title, location, salary when available, and a direct link to the application page. The goal is to reduce the time spent manually checking job boards by routing the most relevant openings into one place.
The bot is designed to be flexible and easy to extend. New APIs, custom search filters, or scraped sites can be added without changing the core posting logic. The project also includes basic logging and a small SQLite database so that duplicate listings are not posted again, which keeps the channel clean and readable. The primary audience for this bot is my GIS classmates and me, but the structure makes it easy for other student groups to reuse.
Objective
Build an automated Discord bot that continuously searches for new GIS related job postings, including from sites that do not provide an API, and deliver them in a clean format to a shared Discord channel so that my classmates and I can discover opportunities more easily.
Data
- Job APIs: USAJobs and other job platforms that expose public or key based APIs for job search queries.
- Scraped job sites: Selected career pages and job boards that do not provide APIs, accessed through HTTP requests and HTML parsing.
- Query focus: GIS, remote sensing, geospatial analyst, cartography, and related job titles and keywords.
- Time frame: The most recent postings returned by each source, fetched on a regular schedule so only fresh jobs are shared.
- Storage: A small SQLite database that tracks previously posted job IDs to prevent duplicates.
Method
- Configure environment variables for Discord tokens, API keys, channel IDs, and search parameters using a .env file.
- Use the Requests library to call one or more job APIs with filters for location, keywords, and posting date.
- For selected sites that do not provide an API, send HTTP requests and parse the HTML to extract job cards, titles, locations, and links.
- Parse responses from both APIs and scraped pages, normalize the fields, and check each job against the SQLite database to skip duplicates.
- Format approved jobs into clear Discord messages that include the title, organization, location, pay information when available, and a direct link.
- Use discord.py to post the messages into the chosen channel on a schedule, with logging and basic error handling for reliability.
Gallery
Example of the bot running in the background and posting formatted GIS job listings into a Discord server for my classmates and me to review.