github-stackoverflow-readme icon indicating copy to clipboard operation
github-stackoverflow-readme copied to clipboard

Fixed incorrect badge count if there's no gold badge

Open kashifo opened this issue 1 year ago • 3 comments

I wanted to use this widget in my profile, but the badge count was incorrectly displaying, it was because i don't have gold badge, but i have silver and bronze badges, so the previous code was setting bronze count into gold count.

kashifo avatar Nov 30 '24 01:11 kashifo

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
github-stackoverflow-readme ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2024 1:34am

vercel[bot] avatar Nov 30 '24 01:11 vercel[bot]

Hey @krishnaacharyaa , Appreciate reviewing, I have changed code a few more times in my fork, and tested multiple approaches in my local node.js server, none of them seem to work in all scenarios because we are scraping the web page - That's the reason I didn't request for pull requests of my further commits.

Here's an idea which works properly, Shall I integrate StackOverflow's API?

I was wondering why you're scraping instead of using their API, then I found out myself that you want to display your reach which is great, which is not available in API.

So, shall we use the API for all other values, use scraping only for getting the reach value?

kashifo avatar Dec 05 '24 03:12 kashifo

Hey @krishnaacharyaa , Appreciate reviewing, I have changed code a few more times in my fork, and tested multiple approaches in my local node.js server, none of them seem to work in all scenarios because we are scraping the web page - That's the reason I didn't request for pull requests of my further commits.

Here's an idea which works properly, Shall I integrate StackOverflow's API?

I was wondering why you're scraping instead of using their API, then I found out myself that you want to display your reach which is great, which is not available in API.

So, shall we use the API for all other values, use scraping only for getting the reach value?

@krishnaacharyaa Have been waiting for your reply on this?

kashifo avatar Dec 15 '24 12:12 kashifo