Skip to content

rgoldfinger/rav4_scraping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of utils for working with the Toyota API in search of a Rav4 Prime.

The scraping part is left as an exercise to the reader, but here is the basic algorithm:

  1. Iterate through each number in the range of current vins + some buffer for new ones.
  2. For each number, build all possible prime vins using allVins in uitl/vins.
  3. Fetch each vin using fetchVin in uitl/vins. If it does not 404, it exists and is allocated.
  4. To tell if it's a new vin, write out the description from util/description for each vin seen to a file as you go. Read the same file on subsequent runs, and you can check if it's new by virture of the vin not being present in the file (just a simple fileContents.includes(vin))

Prior art and reference:

Setup

yarn install

Running scripts

yarn ts-node --transpile-only <script name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published