mirror of https://github.com/Bunsly/JobSpy
Google sheets integration (#23)
parent
ce5226b518
commit
9eb14a74a3
|
@ -146,7 +146,7 @@ _Python version >= [3.10](https://www.python.org/downloads/release/python-3100/)
|
||||||
## Usage
|
## Usage
|
||||||
### Google Sheets Integration (Optional)
|
### Google Sheets Integration (Optional)
|
||||||
|
|
||||||
#### Obtaining an Access Key : [Video Guide](https://www.youtube.com/watch?v=w533wJuilao)
|
#### Obtaining an Access Key: [Video Guide](https://youtu.be/w533wJuilao?si=5u3m50pRtdhqkg9Z&t=43)
|
||||||
* Enable the [Google Sheets & Google Drive API](https://console.cloud.google.com/)
|
* Enable the [Google Sheets & Google Drive API](https://console.cloud.google.com/)
|
||||||
* Create credentials -> service account -> create & continue
|
* Create credentials -> service account -> create & continue
|
||||||
* Select role -> basic: editor -> done
|
* Select role -> basic: editor -> done
|
||||||
|
@ -156,7 +156,7 @@ _Python version >= [3.10](https://www.python.org/downloads/release/python-3100/)
|
||||||
#### Using the key in the repo
|
#### Using the key in the repo
|
||||||
* Copy the key file into the JobSpy repo as `/client_secret.json`
|
* Copy the key file into the JobSpy repo as `/client_secret.json`
|
||||||
* Go to [my template sheet](https://docs.google.com/spreadsheets/d/1mOgb-ZGZy_YIhnW9OCqIVvkFwiKFvhMBjNcbakW7BLo/edit?usp=sharing) & save as a copy into your account
|
* Go to [my template sheet](https://docs.google.com/spreadsheets/d/1mOgb-ZGZy_YIhnW9OCqIVvkFwiKFvhMBjNcbakW7BLo/edit?usp=sharing) & save as a copy into your account
|
||||||
* Share the sheet with the email from the service account above with editor rights
|
* Share the Google sheet with the email in `client_email` in the `client_secret.json` above with editor rights
|
||||||
* If you changed the name of the sheet, put the name in `GSHEET_NAME` in `/settings.py`
|
* If you changed the name of the sheet, put the name in `GSHEET_NAME` in `/settings.py`
|
||||||
|
|
||||||
### How to call the API
|
### How to call the API
|
||||||
|
|
|
@ -60,7 +60,7 @@ async def scrape_jobs(scraper_input: ScraperInput) -> CommonResponse:
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return CommonResponse(
|
return CommonResponse(
|
||||||
status="Failed to upload to Google Sheet", error=str(e)
|
status="Failed to upload to Google Sheet", error=repr(e)
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue