/cognac

Coil Operating Point Data Scraper :tumbler_glass:

Primary LanguageLua

COGNAC

🥃 Coil Operating Point Data Scraper 🥃

Get operating point data for coils from the coilcraft REST API.

Usage

  1. Adjust the PartNumber in coil.lua
  2. Run the script
  3. ???
  4. Profit
local part = 'SER2918H-153' -- for example
$ lua coil.lua

Rate Limiting

If you get a

error code: 1015 ... sleeping for 30s

message don't worry this error is caught and handled, after 30 seconds of waiting the loop continues. This is due to rate limiting by coilcraft 🖕, which is also the reason we can't parallelize. After a handful requests we'd get a 1015 and would need to wait anyway.

Dependencies

lua 5.4 and the following rocks:

  • lua-cjson
  • lua-curl
  • socket