Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is anyone aware of a way to pull the current/longest streak for a GitHub user, besides parsing their page's HTML? I'm aware that I can get the data used to make the dot chart from https://github.com/users/sferik/contributions_calendar_data but that always gives 366 points.

Previously, I thought the Current and Longest Streak counts were dynamically calculated from the given JSON data, but this shows that's not the case: it looks like GitHub is inserting those counts right into the HTML on their end.

I can scrape those counts out of the HTML if I need to, but that feels pretty hacky, and I'd prefer to pull or calculate them in some other way if it's at all possible.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: