alakbarz / extract-meter-readings

Extracts meter readings from the HTML of a Octupus Energy meter reading history page

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extract-meter-readings

Extracts meter readings from the HTML of the Octupus Energy meter readings page.

This can be ran locally (extractReadings.js) or installed as a temporary extension on Firefox.

This will output the readings in a CSV format (without a header):

24th Jun 2022,11054
30th May 2022,10829
30th Apr 2022,10539

Using as an Extension

  1. Go to meter readings page on Octopus Energy
  2. Refresh the page so that the extension loads (you'll see a "Download readings" button appear)

image

  1. Scroll down until you've loaded all of the readings you want to extract
  2. Press the "Download readings" button near the top to download

Running Locally

  1. Go to meter readings page on Octopus energy
  2. Find (or inspect element) the <div> containing the meter readings
<div class="MeterReadingHistorystyled__StyledReadingsContainer-sc-1mqak03-0 ...">...</div>
  1. Save the <div> along with its children into a .html file
  2. Run the extractor using Node.js. Pass the .html file as the first argument and an arbitrary output file as the second argument
node extractReadings.js gas-reading.html gas.csv

About

Extracts meter readings from the HTML of a Octupus Energy meter reading history page


Languages

Language:JavaScript 100.0%