Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

jjknudsen/xfinity-library

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Checking Xfinity (Comcast) Data Usage

After overruning my data cap or coming very close almost every month, I decided to look at an automated way to keep me updated throughout the month. Comcast doesn't have a public API so I reverse engineered the website which allows you to see your current month's usage and previous four months.

Given that the API this library uses isn't public, there's no guarantee it will continue to work over time. Comcast will almost definitely make breaking changes to the API and this library will have to be updated when they do so.

I ended up building an entire Node.js application which uses this library as a local module and then dumps the results into MongoDB. At this time, I'm only planning to publish this library and not the whole application.

Usage

I am using this library as a local module right now. The steps below will get you up and running with a simple Node.js application. This assumes this library is in the same parent folder as test-app

This library uses two environment variables for your Xfinity username and password. Be sure these variables are set

XFIN_USERNAME

XFIN_PASSWORD

Create and run your own sample app

mkdir test-app
cd test-app
npm init -y #-y flag will accept all defaults

npm install --save <path to xfinity library>

Then create index.js in the test-app folder

//index.js
const checker = require('xfinity-library');
  

checker.retrieveDataFromXfinity().then((data) => {
    console.log(data);
})
.catch((err) => {
    console.log(err);
});

Finally, run the app

don't forget the environment variables

XFIN_USERNAME=account@hotmail.com XFIN_PASSWORD=Password1 node .

About

This library will retrieve your Xfinity data usage for the current month and previous four months.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.