Anson Lai 3 years ago
commit 94503b389b

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 AnsonLai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -1,16 +1,17 @@
# Tesla Service Manual Scraper # Tesla Service Manual Scraper
This script will download the Tesla Service Manual onto a local doc folder for offline access. This script will download the Tesla Service Manual onto a local doc folder for offline access. This is geared for Windows only.
## Setup ## Setup
1. Go into `secrets.py` and fill out `tesla_account_email` and `tesla_account_password` with your account and password. 1. Go into `secrets.py` and fill out `tesla_account_email` and `tesla_account_password` with your account and password.
2. Go into `scrape.py` and enter the index URL of the manual you want saved. It is defaulted to the Model 3. 2. Go into `scrape.py` and enter the index URL of the manual you want saved. It is defaulted to the Model 3.
3. Setup selenium for Python. To use the required stealth module, you must use the Chromium webdriver. See tutorial at: <https://blog.testproject.io/2019/07/16/installing-selenium-webdriver-using-python-chrome/> 3. Setup Python 3. See tutorial at: <https://wiki.python.org/moin/BeginnersGuide/Download>
4. Pip download the required packages including: 4. Setup selenium for Python. To use the required stealth module, you **must** use the Chromium webdriver. See tutorial at: <https://blog.testproject.io/2019/07/16/installing-selenium-webdriver-using-python-chrome/>
1. `selenium-stealth` 5. Pip install the required packages (including `requests`, `selenium`, `selenium-stealth`, and `beautifulsoup4`). On windows, you run the following commands on command prompt (CMD):
2. `beautifulsoup4` 1. `cd C:\Users\Anson\Desktop\TeslaServiceManualScraper` [template, the path should go wherever you saved this readme]
5. Run `scrape.py` 2. `run pip install -r requirements.txt`
6. Run `scrape.py` by typing `python scrape.py`
## Tips ## Tips
@ -31,4 +32,5 @@ This script will download the Tesla Service Manual onto a local doc folder for o
* jquery.magnific-popup.min.js * jquery.magnific-popup.min.js
* jquery-3.5.1.min.js * jquery-3.5.1.min.js
* lunr.js * lunr.js
* search.js * search.js
* This script can likely be modified for MacOS easily, but I'm not familiar with how to install Selenium and chromedriver on MacOS. **Windows only for now.**

Loading…
Cancel
Save