dethredic / WC3StreamerOverlay

A simple tool for wc3 streamers to display their opponent's race and stats
GNU General Public License v3.0
30 stars 7 forks source link

handle webproile timeouts and also send map name #13

Closed koin612 closed 5 years ago

koin612 commented 5 years ago

hey,

classic.battle.net has been down very often in the last time and I've seen streamer stopped using this tool because they think its broken :( so I've set a timeout (10s) and set wins to -1 so the client can handle this exception by showing "no record found" or something, a console message is printed so the user knows that the lookup failed. client code is untouched by me, because my notebook turns off on battery if I run npm install xd.

dethredic commented 5 years ago

I'm fine with this change, but a better change would be to scrape warcraft3.info if battle.net times out. Are you up for implementing something like that?

koin612 commented 5 years ago

I'm fine with this. Can implement it as a fallback. As far as I can see they have only the first 1000 ranks. So if I can't reach bnet and don't find the name on warcraft3.info, I fallback on this -1 implementation or am I missing something on wc3info website

dethredic commented 5 years ago

I didn't realize they only scraped the first 1000. I still feel like it's a good idea since most streamers will be playing against top 1000 players.

koin612 commented 5 years ago

latest commit should work :D not quite sure if I need a new PR or the latest commit counts for a merge?