npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cc-scraper

v0.1.9

Published

This module will help you get information you need about credit card points based on the categories, cashback calendars, etc.

Downloads

28

Readme

What is this?

This is an npm module where it scrapes popular credit card webpages and try my best to neatly put the useful information into a clean data structure for people to use in their projects. Hopefully, it'll be useful to build out fin-tech applications 🙏

The vision is to build this out in multiple languages (next is Python, thirdly will be Rust). But, after I am done with this javascript package, I will try to migrate this over to an actual live, hosted API.

Please look through the issues and projects tabs for the future plans of cc-scraper.

cc-scraper

The cc-scraper library is used as an npm module or Node.js module.

installation

Using npm:

npm i -s cc-scraper

In Node.js:

// Load the cc-scraper library
const cards = require('cc-scraper');

// Get Chase's 5% Cash Back Calendar information
cards.getChaseCashBackCal((error, result) => {
    console.log('chase result = ', result);
});

// Get Discover's 5% Cash Back Calendar information
cards.getDiscoverCashBackCal((error, result) => {
    console.log('discover result = ', result);
});

Output (something similar to):

chase_result = [ { quarterName: 'January - March',
                   quarter: 1,
                   categoryNames: [ 'gas stations', 'tolls', 'drugstores' ],
                   categories: [ [Object], [Object], [Object] ] },
                 { quarterName: 'April - June',
                   quarter: 2,
                   categoryNames: [ 'grocery stores', 'home improvement stores' ],
                   categories: [ [Object], [Object] ] },
                 { quarterName: 'July - September',
                   quarter: 3,
                   categoryNames: [ 'gas stations', 'select streaming services' ],
                   categories: [ [Object], [Object] ] },
                 { quarterName: 'October - December',
                   quarter: 4,
                   categoryNames: [ 'department stores', 'paypal', 'chase pay' ],
                   categories: [ [Object], [Object], [Object] ] } ]

discover_result = discover_result = [ { quarter: 4,
                                        startDate: 'October 1, 2019',
                                        endDate: 'December 31, 2019',
                                        category: 'Amazon.com, Target and Walmart.com',
                                        terms:
                                         '[terms and services in html]' },
                                      { quarter: 1,
                                        startDate: 'January 1, 2020',
                                        endDate: 'March 31, 2020',
                                        category: 'Grocery Stores, Walgreens and CVS',
                                        terms:
                                         '[terms and services in html]' },
                                      { quarter: 2,
                                        startDate: 'April 1, 2020',
                                        endDate: 'June 30, 2020',
                                        category: 'Gas Stations, Uber, Lyft and Wholesale Clubs',
                                        terms:
                                         '[terms and services in html]' },
                                      { quarter: 3,
                                        startDate: 'July 1, 2020',
                                        endDate: 'September 30, 2020',
                                        category: 'Restaurants and PayPal',
                                        terms:
                                         '[terms and services in html]' },
                                      { quarter: 4,
                                        startDate: 'October 1, 2020',
                                        endDate: 'December 31, 2020',
                                        category: 'Amazon.com, Walmart.com and Target.com',
                                        terms:
                                         '[terms and services in html]' } ]

Quarter 1: January - March
Quarter 2: April - June
Quarter 3: July - September
Quarter 4: October - December

There will be occasions where some quarters are missing. For example, in the output above is missing quarter 4. That is because on their website calendar, they haven't finalized quarter 4 categories that will attribute to the 5% cash back (at the time of this writing). Therefore, my code will neglect that quarter.

See the source code for more details.