You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.7 KiB

# Shinobi Jobs Report
This Flask application fetches jobs from various job boards and returns them in JSON format.
<img src="cover.png">
**Endpoints**
* **/jobs/load** - This endpoint scrapes jobs from Indeed, LinkedIn, Zip Recruiter, Glassdoor, and Google for "Devops" positions in the Miami, Florida area and returns them as JSON.
* **/jobs/** - This endpoint returns the most recent jobs data that was fetched.
**How to Use**
1. Clone this repository.
2. Install the required libraries using `pip install -r requirements.txt`.
3. Run the application using `flask run`.
4. To fetch new jobs, make a GET request to `/jobs/load`.
5. To access the most recent jobs data, make a GET request to `/jobs/`.
**Example Usage**
```
curl http://localhost:5000/jobs/load
```
This will return a JSON object containing the scraped jobs data.
**Explanation of the Code**
* The `dowork` function scrapes jobs from the specified job boards using the `jobspy` library.
* The `writeFile` function writes the scraped jobs data to a JSON file.
* The `read` function reads the most recent jobs data from the JSON file.
* The `/jobs/load` endpoint calls the `dowork` function to scrape new jobs and then calls the `writeFile` function to save the data. It then returns the JSON data.
* The `/jobs/` endpoint calls the `read` function to retrieve the most recent jobs data from the JSON file and returns it.
**Additional Notes**
* This is a basic example of a Flask application. You can customize it to fit your specific needs.
* The `jobspy` library is not included in this repository. You will need to install it separately using `pip install jobspy`.
I hope this helps! Let me know if you have any other questions.