0.1.9 • Published 3 years ago

cc-scraper v0.1.9

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

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.

0.1.9

3 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.31

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago