agoragames / bnet_scraper

A Nokogiri-based scraper of Battle.net profiles. Currently this only includes Starcraft2.
MIT License
22 stars 7 forks source link

Thread Safety Issues? #12

Closed thieman closed 11 years ago

thieman commented 11 years ago

I'm getting two sets of values returned for this profile URL (http://us.battle.net/sc2/en/profile/273698/1/Omni/) for career games and games this season.

Set 1 (correct): {career_games: '205', games_this_season: '41'} Set 2 (incorrect): {career_games: '226', games_this_season: '47'}

This is interesting to me because it's always from these two sets; there's no further variation. I haven't seen this happen in a single-threaded model, and it suddenly appeared once I went multi-thread, so I think that might be the likely culprit. Maybe I'm wrong, though.

Code: http://pastebin.com/Zjx2iVFi

thieman commented 11 years ago

Upon further review, the Battle.net profile itself is actually changing on repeated refresh (what in the world?). Maybe I'll file a bug report with Blizzard.

thieman commented 11 years ago

Hey @cadwallion, this isn't a problem with the library, but do you have any idea what's going on here? Have you seen it before?

cadwallion commented 11 years ago

I can't say I've ever seen that problem on their site before. I can reproduce what you're experiencing just by hitting refresh on the profile page, though.