Job Bot is a Python script that automates job acceptance on a standard job portal website. It uses Selenium WebDriver to interact with the website and BeautifulSoup for HTML parsing. The script logs into the website, searches for jobs matching specific criteria, and accepts them if they meet the criteria.
- Google Chrome: Ensure you have Google Chrome installed.
- ChromeDriver: ChromeDriver must be compatible with the version of Google Chrome installed.
- Python: Make sure you have Python 3.6+ installed.
- Virtual Environment: It's recommended to use a virtual environment to manage dependencies.
git clone https://github.com/yemeen/jobbot.git
cd jobbot
Set up a virtual environment to manage dependencies:
python -m venv jobbot
source jobbot/bin/activate # On Windows use `jobbot\Scripts\activate`
Install the required Python packages:
pip install -r requirements.txt
Note: If requirements.txt
is not available, you can install the necessary packages individually:
pip install selenium webdriver-manager beautifulsoup4 python-dotenv
Download the latest stable release of Google Chrome from the official Google Chrome download page.
For Debian-based systems:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
Create a .env
file in the project directory and add your Website credentials:
USERNAME=your_username
PASSWORD=your_password
Create a job_count.json
file in the project directory to keep track of the number of jobs accepted:
{
"jobs_accepted": 0
}
To run the script, use the following command:
python job_bot.py
- ChromeDriver Compatibility: Ensure that the version of ChromeDriver matches the installed version of Google Chrome. Use
webdriver-manager
to manage ChromeDriver versions automatically. - No Such Element Exception: Ensure the XPath or CSS selectors used in the script are correct and match the current structure of the website. The specific error in the logs indicates that an element with
xpath=".//td[2]"
was not found. Verify the correctness of the selectors.
Logs are written to job_bot.log
and the console. The script logs important events such as successful logins, job searches, job acceptances, and periodic status updates to indicate that the script is running.
The script uses a rotating file handler for logging. Log files are automatically rotated when they reach 5 MB, and up to 5 backup files are kept.
-
Permission Denied: Ensure that the script has the necessary permissions to access the required files and directories.
-
Updating Selenium: If you encounter issues related to Selenium, ensure you are using the latest version:
pip install --upgrade selenium
-
Uninstall and Reinstall Selenium: If issues persist, try uninstalling and reinstalling Selenium:
pip uninstall selenium pip install selenium
-
ChromeDriver Path: If ChromeDriver is not found, specify the path explicitly in the script:
driver = webdriver.Chrome(executable_path='/path/to/chromedriver', options=options)
If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.