TI JOBS BOT is an automated tool built with NestJS that scrapes LinkedIn for information on job offers in the IT and software development sectors in Colombia. It uses a Telegram bot to send these offers to a channel, facilitating quick access to tech job opportunities.
- Features
- Technologies Used
- Installation
- Configuration
- Usage
- Scraping
- Database
- File Handling
- Telegram Service
- Maintenance
- Contributing
- LinkedIn Scraping: Automatically extracts IT and software development jobs from LinkedIn.
- Automated Notifications: Uses a Telegram bot to send alerts to a channel with the latest job offers.
- Data Storage: Utilizes QuickDB to store already sent jobs, avoiding duplicates and keeping a log of fetched jobs.
- Periodic Updates: Performs scraping every 10 minutes and sends updated job posts every half hour.
- Flexible Integration: Easy to configure and modify based on your needs.
- NestJS: Backend framework used for the project.
- Cheerio: Tool used for LinkedIn scraping.
- QuickDB: Local database used to manage jobs and avoid duplicates in the Telegram bot.
- Telegram Bot API: To send job offers to a specific Telegram channel.
- TypeScript: For writing typed, robust, and maintainable code.
-
Clone the repository
git clone https://github.com/your_user/ti-jobs-bot.git
-
Navigate to the project directory
cd ti-jobs-bot -
Install dependencies
Make sure you have
pnpminstalled for package management. If you don't have it, you can install it by following the instructions on their official website.pnpm install
-
Add pnpm-lock.yaml to the repository
Commit the
pnpm-lock.yamlfile to ensure dependency consistency across environments. -
Create a
.envfileCreate a
.envfile in the project root and configure the necessary environment variables. An example of variables would be:BOT_TOKEN=your_telegram_bot_token CHANNEL_ID=your_telegram_chat_id
-
Build the project
pnpm run build
-
Start the application
pnpm run start:prod
-
Environment Variables:
BOT_TOKEN: The Telegram bot token used to send messages.CHANNEL_ID: The ID of the channel or chat where job offers will be sent.
-
Scraping Configuration: Scraping is set up to gather job offers in the IT and software development sectors. You can modify scraping parameters in the config file if you need to expand or change the search criteria.
Once you’ve configured the environment variables, the application will scrape LinkedIn every hour and send job offers to the Telegram channel.
The Telegram bot sends a message with the following structure:
- Job Title: 💼 Job Title
- Company: 🏢 Company
- Location: 📍 Location
- Posted Date: 📅 Date
- Job Link: 🔗 URL
- Company Profile: 🌐 Profile
Each message includes job details, along with direct links to the job offer and the company profile.
Scraping is done using Playwright or Cheerio. The following data is extracted:
- Job Title
- Company
- Location
- Posted Date
- Job URL
- Company Profile URL
- Salary (if available)
The ID of each job is extracted directly from the URL before the position query parameter, ensuring each job has a unique identifier.
QuickDB is used to store one types of information:
- Jobs: Stores job offers fetched via scraping.
Services are implemented to extend a base class that initializes QuickDB for each corresponding table.
Company images and other related files are handled through an endpoint in the backend. If an image is empty or unavailable, a default image located in the assets folder is used.
The Telegram bot communicates using the typescript-telegram-bot-api library and is responsible for sending formatted job offers to a specific Telegram channel.
Telegram messages are enriched with emojis and bold text for better readability.
It is recommended to update scraping periodically to adapt to any changes in LinkedIn's DOM. LinkedIn’s HTML structure may vary, affecting the ability to correctly extract job offer data.
Contributions are welcome! If you want to improve the project, follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/new-feature). - Make your changes and commit them (
git commit -am 'Added new feature'). - Push your branch (
git push origin feature/new-feature). - Open a Pull Request.