nelsonic / github-scraper

🕷 🕸 crawl GitHub web pages for insights we can't GET from the API ... 💡
425 stars 96 forks source link

Repo doesn't parse badges with thousands of stars/likes/commits/etc. #99

Closed philwinder closed 5 years ago

philwinder commented 5 years ago

The repo.js file doesn't parse anything in the thousands because of the comma in the number.

E.g. this should report 48000 ish.

var gs = require("github-scraper");
var url = "angular/angular";
gs(url, function(err, data) {
  console.log(data); // or do something way more interesting with the data!
});

Results in:

 - - - GitHub Scraper >> https://github.com/angular/angular >> repo  - - - 
{ url: 'https://github.com/angular/angular',
  desc: '',
  website: '',
  watchers: 3,
  stars: 48,
  forks: 12,
  commits: 14,
  branches: 66,
  releases: 322,
  langs: [ 'TypeScript 90.3%', 'JavaScript 4.0%' ] }

Fix coming shortly.

nelsonic commented 5 years ago

@philwinder thanks for reporting and fixing this issue. 👍