Skip to content

Simple JSON API built from scraped data on boilerjuice.com

Notifications You must be signed in to change notification settings

mylesagray/boilerjuice-tank-api

Repository files navigation

Boilerjuice Scraping API

Intro

Boilerjuice.com has no public API, and pages are rendered via PHP with data pre-baked, as a result - to get information back from the site about your Oil Tank's current level you need to auth with the site and scrape the data back from the web pages.

That is what this project does.

Function

Example input page:

My Tank page

Example API output:

{
  "capacity":"1055",
  "litres":750.0,
  "percent":"70",
  "total_litres":950.0,
  "total_percent":"90"
}

Run

Run the API:

docker run -d -p 8080:8080 -e BJ_USERNAME=my@emailaddress.com -e BJ_PASSWORD=password ghcr.io/mylesagray/boilerjuice-tank

Docker images are available on DockerHub or GitHub Container Registry:

ghcr.io/mylesagray/boilerjuice-tank
mylesagray/boilerjuice-tank

Use

Access the API:

open http://localhost:8080

Access Prometheus scraping endpoint:

open http://localhost:8080/metrics

Build

Build multiarch image:

docker buildx create --use
docker buildx build --platform linux/arm64,linux/amd64 -t mylesagray/boilerjuice-tank:v0.2 -t mylesagray/boilerjuice-tank -t ghcr.io/mylesagray/boilerjuice-tank:v0.2 -t ghcr.io/mylesagray/boilerjuice-tank --push .

About

Simple JSON API built from scraped data on boilerjuice.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •