Closed mkmkmkmk closed 11 years ago
I will take a look at this tonight. It's possible that the VCR cassettes are outdated and Blizzard has changed the markup on me.
Writing a fix for this at the moment, it looks like it's not locale based but instead region based (eu.battle.net, us.battle.net, etc). I am adding in date parsing logic by domain.
Hello there, seems to be a nice tool you are doing. I am trying to use it.
It seems that date format are not handled well It have errors (see details below) for achievments dates:
When 'us' region page format is : mm/dd/yyyy (Works well here: http://us.battle.net/sc2/en/profile/2377239/1/Demon/achievements/)
In several others region/locale : dd/mm/yyyy (Fails here, even if local put to en: http://eu.battle.net/sc2/en/profile/1229243/1/Stephano/achievements/)
Its more like a bnet website issue... (since 'en' locale is set but not handled) but still as such one cannot scrap achievements properly.
Thanks a lot! Cheers
C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scraper/starcraf t2/achievement.rb:20:in'
new': invalid date (ArgumentError) from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement.rb:20:in
convert_date' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement.rb:15:inearned=' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement.rb:10:in
block in initialize' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement.rb:9:ineach_key' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement.rb:9:in
initialize' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:78:innew' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:78:in
extract_recent_achievement' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:65:inblock in scrape_recent' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:64:in
times' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:64:inscrape_recent' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/achievement_scraper.rb:41:in
scrape' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/profile.rb:18:inachievements' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bnet_scraper-0.6.0/lib/bnet_scr aper/starcraft2/profile.rb:22:in
recent_achievements' from C:/Users/xxx/Desktop/a.rb:17:in `