mirror of https://github.com/Bunsly/JobSpy
fix check
parent
9801f2a97e
commit
f717ef9078
|
@ -63,11 +63,13 @@ jobs:
|
||||||
|
|
||||||
- name: Check error field in response
|
- name: Check error field in response
|
||||||
run: |
|
run: |
|
||||||
|
global_error=$(jq '.error' response.json)
|
||||||
indeed_error=$(jq '.indeed.error' response.json)
|
indeed_error=$(jq '.indeed.error' response.json)
|
||||||
linkedin_error=$(jq '.linkedin.error' response.json)
|
linkedin_error=$(jq '.linkedin.error' response.json)
|
||||||
|
|
||||||
if [[ "$indeed_error" != "null" || "$linkedin_error" != "null" ]]; then
|
if [[ "$indeed_error" != "null" || "$linkedin_error" != "null" ]]; then
|
||||||
echo "Error found in response:"
|
echo "Error found in response:"
|
||||||
|
echo "Global Error: $global_error"
|
||||||
echo "Indeed Error: $indeed_error"
|
echo "Indeed Error: $indeed_error"
|
||||||
echo "LinkedIn Error: $linkedin_error"
|
echo "LinkedIn Error: $linkedin_error"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
39
README.md
39
README.md
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- Scrapes job postings from **LinkedIn**, **Indeed** & **ZipRecruiter** simultaneously
|
- Scrapes job postings from **LinkedIn**, **Indeed** & **ZipRecruiter** simultaneously
|
||||||
- Returns jobs as JSON or CSV with title, location, company, description & other data
|
- Returns jobs as JSON or CSV with title, location, company, description & other data
|
||||||
|
- Imports directly into **Google Sheets**
|
||||||
- Optional JWT authorization
|
- Optional JWT authorization
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +24,7 @@ Optional
|
||||||
├── is_remote (bool)
|
├── is_remote (bool)
|
||||||
├── results_wanted (int): per site_type
|
├── results_wanted (int): per site_type
|
||||||
├── easy_apply (bool): only for linkedin
|
├── easy_apply (bool): only for linkedin
|
||||||
└── output_format (enum): json, csv
|
└── output_format (enum): json, csv, gsheet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Request Example
|
### Request Example
|
||||||
|
@ -34,6 +35,7 @@ Optional
|
||||||
"distance": 10,
|
"distance": 10,
|
||||||
"job_type": "fulltime",
|
"job_type": "fulltime",
|
||||||
"results_wanted": 15
|
"results_wanted": 15
|
||||||
|
"output_format": "gsheet"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Response Schema
|
### Response Schema
|
||||||
|
@ -63,7 +65,16 @@ JobResponse
|
||||||
├── total_results (int)
|
├── total_results (int)
|
||||||
└── returned_results (int)
|
└── returned_results (int)
|
||||||
```
|
```
|
||||||
|
### Response Example (GOOGLE SHEETS)
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"status": "Successfully uploaded to Google Sheets",
|
||||||
|
"error": null,
|
||||||
|
"linkedin": null,
|
||||||
|
"indeed": null,
|
||||||
|
"zip_recruiter": null
|
||||||
|
}
|
||||||
|
```
|
||||||
### Response Example (JSON)
|
### Response Example (JSON)
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -132,15 +143,33 @@ _Python version >= [3.10](https://www.python.org/downloads/release/python-3100/)
|
||||||
4. Run the server with `uvicorn main:app --reload`
|
4. Run the server with `uvicorn main:app --reload`
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
### Google Sheets Integration (Optional)
|
||||||
|
|
||||||
### Swagger UI:
|
#### Obtaining an Access Key : [Video Guide](https://www.youtube.com/watch?v=w533wJuilao)
|
||||||
To interact with the API documentation, navigate to [localhost:8000/docs](http://localhost:8000/docs).
|
* Enable the [Google Sheets & Google Drive API](https://console.cloud.google.com/)
|
||||||
|
* Create credentials -> service account -> create & continue
|
||||||
|
* Select role -> basic: editor -> done
|
||||||
|
* Click on the email you just created in the service account list
|
||||||
|
* Go to the Keys tab -> add key -> create new key -> JSON -> Create
|
||||||
|
|
||||||
### Postman:
|
#### Using the key in the repo
|
||||||
|
* Copy the key file into the JobSpy repo as `/client_secret.json`
|
||||||
|
* Go to [my template sheet](https://docs.google.com/spreadsheets/d/1HAnn-aPv-BO4QTEzfIWc-5iw50duyMoTgX8o3RsEOWs/edit?usp=sharing) & save as a copy into your account
|
||||||
|
* Share the sheet with the email from the service account above
|
||||||
|
* If you changed the name of the sheet, put the name in `GSHEET_NAME` in `/settings.py`
|
||||||
|
|
||||||
|
### How to call the API
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#### [Postman](https://www.postman.com/downloads/) (preferred):
|
||||||
To use Postman:
|
To use Postman:
|
||||||
1. Locate the files in the `/postman/` directory.
|
1. Locate the files in the `/postman/` directory.
|
||||||
2. Import the Postman collection and environment JSON files.
|
2. Import the Postman collection and environment JSON files.
|
||||||
|
|
||||||
|
#### Swagger UI:
|
||||||
|
Or you can call the API with the interactive documentation at [localhost:8000/docs](http://localhost:8000/docs).
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
### I'm having issues with my queries. What should I do?
|
### I'm having issues with my queries. What should I do?
|
||||||
|
|
Loading…
Reference in New Issue