A Python script that monitors and notifies about new job offers from the Business France VIE/VIA platform.
This project scrapes job offers from the Business France VIE/VIA API and sends email notifications when new offers are detected. It maintains a local cache of previously fetched data to track changes.
- Fetches job offers from the Business France API using pagination
- Tracks new job postings by comparing with previously saved data
- Sends HTML-formatted email notifications for new job offers
- Stores job data and metadata locally for future comparisons
vie-via-scraper/
│
├── bf_api_caller.py # Main script for fetching and processing data
├── api_data.json # Cached job offers data
├── api_metadata.json # Metadata about last fetch
└── requirements.txt # Project dependencies
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
- Configure email settings in
bf_api_caller.py:- Replace
sender_emailwith your Gmail address - Replace
receiver_emailwith the target email address - Update the Gmail app password
- Replace
The script requires a Gmail account configured with an App Password for sending notifications. To set this up:
- Enable 2-Step Verification in your Google Account
- Generate an App Password:
- Go to Google Account Settings > Security
- Select "App Passwords"
- Generate a new password for "Mail"
- Use the generated password in the script
Run the script:
python bf_api_caller.pyThe script will:
- Fetch all current job offers
- Compare with previously saved data
- Send an email notification if new offers are found
- Save updated data and metadata locally
Create a requirements.txt file with the following dependencies:
requests>=2.28.0
python-dateutil>=2.8.2
Contains the full list of job offers in JSON format. Each offer includes:
- Creation date
- Mission title
- Location
- Organization name
- Other offer details
Tracks the last fetch information:
last_creation_date: Timestamp of the most recent job offertotal_count: Total number of offers in the last fetch
The script sends HTML-formatted emails containing:
- Table of new job offers
- Creation date
- Job title
- Location
- Company name
- The Gmail app password is hardcoded in the script. Consider using environment variables or a configuration file for better security.
- API requests include headers mimicking a web browser for compatibility.
Feel free to submit issues and enhancement requests!
This project is open source and available under the MIT License.