Tesla Service Manual Scraper
This script will download the Tesla Service Manual onto a local doc folder for offline access. This is geared for Windows only.
- Go into
secrets.pyand fill out
tesla_account_passwordwith your account and password.
- Go into
scrape.pyand enter the index URL of the manual you want saved by changing
base_urlvariables. It is defaulted to the Model 3.
- If you have 2FA or other challenges with login, consider changing
login_delayto 2 or 3 seconds so you can manually enter your credentials.
- Setup Python 3. See tutorial at: https://wiki.python.org/moin/BeginnersGuide/Download
- 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/
- Pip install the required packages (including
beautifulsoup4). On windows, you run the following commands on command prompt (CMD):
cd C:\Users\Anson\Desktop\TeslaServiceManualScraper[template, the path should go wherever you saved this readme]
run pip install -r requirements.txt
Option 1: Easy Way
- Go into
docs/folder and open up
index.html. You’re going to get 99% of the service manual just like that, but no search functionality.
Option 2: HTTP Server (thanks to TheNexusAvenger)
- Run CMD on Windows, and change the directory to the
docsfolder. Something like this
- Run the following command:
python -m http.server(Python obviously needs to be installed)
- Use a web browser and navigate to:
http://localhost:8000/to see the full service manual including search.
- A full scrape of the Model 3 service manual took over 30 minutes. This script is set up so that you can stop the script, and then continue later on.
- Keep an eye out, Tesla’s website seems to boot you out of logged in status after about 250 pages or 20 minutes of continuous refreshing. So it might be worthwhile to run this on the side while keeping an eye on your login status.
- Total file size of the Model 3 service manual is roughly 2.2GB.
- This script can likely be modified for MacOS easily, but I’m not familiar with how to install Selenium and chromedriver on MacOS. See issues below Windows only for now.