bnet_scraper 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,13 @@
1
1
  # Changelog!
2
2
 
3
+ ## 0.1.3 (Jul 26 2012)
4
+
5
+ * Adds checks to prevent parse issues with accounts that don't ladder
6
+
7
+ ## 0.1.2 (Jul 20 2012)
8
+
9
+ * We don't talk about 0.1.2...
10
+
3
11
  ## 0.1.1 (Jul 20 2012)
4
12
 
5
13
  * Adds BnetScraper::Starcraft2.valid\_profile?
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "bnet_scraper"
6
- s.version = "0.1.1"
6
+ s.version = "0.1.3"
7
7
  s.authors = ["Andrew Nordman"]
8
8
  s.email = ["anordman@majorleaguegaming.com"]
9
9
  s.homepage = "https://github.com/agoragames/bnet_scraper/"
@@ -35,7 +35,10 @@ module BnetScraper
35
35
  if response.success?
36
36
  html = Nokogiri::HTML(response.body)
37
37
 
38
- @race = html.css("#season-snapshot .module-footer a").first().inner_html()
38
+ if race_div = html.css("#season-snapshot .module-footer a").first()
39
+ @race = race_div.inner_html()
40
+ end
41
+
39
42
  @wins = html.css("#career-stats h2").inner_html()
40
43
  @achievement_points = html.css("#profile-header h3").inner_html()
41
44
  else
@@ -36,11 +36,14 @@ describe BnetScraper::Starcraft2::ProfileScraper do
36
36
  subject.should_receive(:get_profile_data)
37
37
  subject.scrape
38
38
  end
39
+
39
40
  it 'should call get_league_list' do
40
41
  subject.should_receive(:get_league_list)
41
42
  subject.scrape
42
43
  end
43
44
 
45
+
46
+
44
47
  it 'should call output' do
45
48
  subject.should_receive(:output)
46
49
  subject.scrape
@@ -50,6 +53,21 @@ describe BnetScraper::Starcraft2::ProfileScraper do
50
53
  scraper = BnetScraper::Starcraft2::ProfileScraper.new url: 'http://us.battle.net/sc2/en/profile/2377239/1/SomeDude/'
51
54
  expect { scraper.scrape }.to raise_error(BnetScraper::InvalidProfileError)
52
55
  end
56
+
57
+ context 'account that has not laddered' do
58
+ let(:scraper) {BnetScraper::Starcraft2::ProfileScraper.new(url: 'http://us.battle.net/sc2/en/profile/3354437/1/ClarkeKent/') }
59
+ before do
60
+ scraper.scrape
61
+ end
62
+
63
+ it 'should set nil race' do
64
+ scraper.race.should be_nil
65
+ end
66
+
67
+ it 'should have an empty array of leagues' do
68
+ scraper.leagues.should == []
69
+ end
70
+ end
53
71
  end
54
72
 
55
73
  describe '#output' do
@@ -7,6 +7,8 @@ achievements_html = File.read File.dirname(__FILE__) + '/achievements.html'
7
7
  matches_html = File.read File.dirname(__FILE__) + '/matches.html'
8
8
  status_html = File.read File.dirname(__FILE__) + '/status.html'
9
9
  failure_html = File.read File.dirname(__FILE__) + '/failure.html'
10
+ no_ladder_html = File.read File.dirname(__FILE__) + '/no_ladder.html'
11
+ no_leagues_html = File.read File.dirname(__FILE__) + '/no_ladder_leagues.html'
10
12
 
11
13
  FakeWeb.allow_net_connect = false
12
14
  FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/SomeDude/', body: failure_html, status: 404, content_type: 'text/html'
@@ -31,3 +33,5 @@ FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/
31
33
  FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/achievements/', body: achievements_html, status: 200, content_type: 'text/html'
32
34
  FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/2377239/1/Demon/matches', body: matches_html, status: 200, content_type: 'text/html'
33
35
  FakeWeb.register_uri :get, 'http://www.teamliquid.net/forum/viewmessage.php?topic_id=138846', body: status_html, status: 200, content_type: 'text/html'
36
+ FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/3354437/1/ClarkeKent/', body: no_ladder_html, status: 200, content_type: 'text/html'
37
+ FakeWeb.register_uri :get, 'http://us.battle.net/sc2/en/profile/3354437/1/ClarkeKent/ladder/leagues', body: no_leagues_html, status: 200, content_type: 'text/html'
@@ -0,0 +1,915 @@
1
+
2
+
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us" class="en-us">
4
+ <head xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#">
5
+ <title>ClarkeKent - StarCraft II</title>
6
+ <meta content="false" http-equiv="imagetoolbar" />
7
+ <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
8
+ <link rel="shortcut icon" href="/sc2/static/local-common/images/favicons/sc2.ico" type="image/x-icon"/>
9
+ <link rel="search" type="application/opensearchdescription+xml" href="http://us.battle.net/en-us/data/opensearch" title="Battle.net Search" />
10
+ <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/local-common/css/common.css?v42" />
11
+ <!--[if IE]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/local-common/css/common-ie.css?v42" />
12
+ <![endif]-->
13
+ <!--[if IE 6]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/local-common/css/common-ie6.css?v42" />
14
+ <![endif]-->
15
+ <!--[if IE 7]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/local-common/css/common-ie7.css?v42" />
16
+ <![endif]-->
17
+ <link title="StarCraft II™ - News" href="/sc2/en/feed/news" type="application/atom+xml" rel="alternate"/>
18
+ <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/sc2.css?v21" />
19
+ <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/profile/profile.css?v21" />
20
+ <!--[if IE 6]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/profile/profile-ie6.css?v21" />
21
+ <![endif]-->
22
+ <!--[if IE]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/sc2-ie.css?v21" />
23
+ <![endif]-->
24
+ <!--[if IE 6]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/sc2-ie6.css?v21" />
25
+ <![endif]-->
26
+ <!--[if IE 7]> <link rel="stylesheet" type="text/css" media="all" href="/sc2/static/css/sc2-ie7.css?v21" />
27
+ <![endif]-->
28
+ <script type="text/javascript" src="/sc2/static/local-common/js/third-party/jquery.js?v42"></script>
29
+ <script type="text/javascript" src="/sc2/static/local-common/js/core.js?v42"></script>
30
+ <script type="text/javascript" src="/sc2/static/local-common/js/tooltip.js?v42"></script>
31
+ <!--[if IE 6]> <script type="text/javascript">
32
+ //<![CDATA[
33
+ try { document.execCommand('BackgroundImageCache', false, true) } catch(e) {}
34
+ //]]>
35
+ </script>
36
+ <![endif]-->
37
+ <script type="text/javascript">
38
+ //<![CDATA[
39
+ Core.staticUrl = '/sc2/static';
40
+ Core.sharedStaticUrl= '/sc2/static/local-common';
41
+ Core.baseUrl = '/sc2/en';
42
+ Core.projectUrl = '/sc2';
43
+ Core.cdnUrl = 'http://us.media.blizzard.com';
44
+ Core.supportUrl = 'http://us.battle.net/support/';
45
+ Core.secureSupportUrl= 'https://us.battle.net/support/';
46
+ Core.project = 'sc2';
47
+ Core.locale = 'en-us';
48
+ Core.language = 'en';
49
+ Core.buildRegion = 'us';
50
+ Core.region = 'us';
51
+ Core.shortDateFormat= 'MM/dd/yyyy';
52
+ Core.dateTimeFormat = 'MM/dd/yyyy hh:mm a';
53
+ Core.loggedIn = false;
54
+ Flash.videoPlayer = 'http://us.media.blizzard.com/global-video-player/themes/sc2/video-player.swf';
55
+ Flash.videoBase = 'http://us.media.blizzard.com/sc2/media/videos';
56
+ Flash.ratingImage = 'http://us.media.blizzard.com/global-video-player/ratings/sc2/en-us.jpg';
57
+ Flash.expressInstall= 'http://us.media.blizzard.com/global-video-player/expressInstall.swf';
58
+ var _gaq = _gaq || [];
59
+ _gaq.push(['_setAccount', 'UA-544112-16']);
60
+ _gaq.push(['_setDomainName', '.battle.net']);
61
+ _gaq.push(['_setAllowLinker', true]);
62
+ _gaq.push(['_trackPageview']);
63
+ _gaq.push(['_trackPageLoadTime']);
64
+ //]]>
65
+ </script>
66
+ <meta property="og:site_name" content="StarCraft II™" />
67
+ <meta property="og:title" content="ClarkeKent - StarCraft II" />
68
+ <meta property="og:image" content="http://us.media.blizzard.com/battle.net/logos/og-sc2.png" />
69
+ <meta property="og:url" content="http://us.battle.net/sc2/en/profile/3354437/1/ClarkeKent/" />
70
+ <meta property="og:type" content="website" />
71
+ <meta property="og:locale" content="en_US" />
72
+ <meta property="fb:admins" content="470332842321,433163104416"/>
73
+ </head>
74
+ <body class=""><div id="wrapper">
75
+ <div id="header">
76
+ <div class="search-bar">
77
+ <form action="/sc2/en/search" method="get" autocomplete="off">
78
+ <div>
79
+ <input type="text" class="search-field input" name="q" id="search-field" maxlength="200" tabindex="40" alt="Search StarCraft II" value="Search StarCraft II" />
80
+ <input type="submit" class="search-button" value="" tabindex="41" />
81
+ </div>
82
+ </form>
83
+ </div>
84
+ <h1 id="logo"><a href="/sc2/en/">Battle.net</a></h1>
85
+ <div id="header-plate">
86
+ <ul class="menu" id="menu">
87
+ <li class="menu-home">
88
+ <a href="/sc2/en/">
89
+ <span>Home</span>
90
+ </a>
91
+ </li>
92
+ <li class="menu-game">
93
+ <a href="/sc2/en/game/">
94
+ <span>Game Guide</span>
95
+ </a>
96
+ </li>
97
+ <li class="menu-esports">
98
+ <a href="/sc2/en/esports/">
99
+ <span>eSports</span>
100
+ </a>
101
+ </li>
102
+ <li class="menu-media">
103
+ <a href="/sc2/en/media/">
104
+ <span>Media</span>
105
+ </a>
106
+ </li>
107
+ <li class="menu-forums">
108
+ <a href="/sc2/en/forum/">
109
+ <span>Forums</span>
110
+ </a>
111
+ </li>
112
+ <li class="menu-buy-now">
113
+ <a href="/sc2/en/buy-now/">
114
+ <span>Buy Now</span>
115
+ </a>
116
+ </li>
117
+ </ul>
118
+ <div id="user-plate" class="ajax-update">
119
+ <div id="user-empty">
120
+ <a href="?login" onclick="return Login.open('https://us.battle.net/login/login.frag')"><strong>Log in</strong></a> with your Battle.net account to post comments and personalize your site content.
121
+ </div>
122
+ </div>
123
+ <ol class="ui-breadcrumb">
124
+ <li>
125
+ <a href="/sc2/en/" rel="np">
126
+ StarCraft II
127
+ </a>
128
+ </li>
129
+ <li class="last">
130
+ <a href="/sc2/en/profile/3354437/1/ClarkeKent/" rel="np">
131
+ ClarkeKent
132
+ </a>
133
+ </li>
134
+ </ol>
135
+ </div>
136
+ </div>
137
+ <div id="content">
138
+ <div id="content-top">
139
+ <div id="content-bot"> <div id="profile-wrapper">
140
+ <div id="profile-header">
141
+ <div id="portrait" onclick="Core.goTo('/sc2/en/profile/3354437/1/ClarkeKent/');">
142
+
143
+
144
+ <span class="icon-frame "
145
+ style="background: url('/sc2/static/local-common/images/sc2/portraits/0-90.jpg?v42') 0px 0px no-repeat; width: 90px; height: 90px;">
146
+
147
+ </span>
148
+
149
+ <div id="portrait-frame">&#160;</div>
150
+ </div>
151
+
152
+ <div id="current-decals">
153
+ <div class="current-decal" data-tooltip="Zerg Decal">
154
+
155
+
156
+ <span class="icon-frame "
157
+ style="background: url('/sc2/static/local-common/images/sc2/decals/0-45.jpg?v42') -90px -270px no-repeat; width: 45px; height: 45px;">
158
+
159
+ <a href="/sc2/en/profile/3354437/1/ClarkeKent/rewards/zerg-decals#reward-2359737029" style="height: 45px"> </a>
160
+ </span>
161
+ </div>
162
+
163
+ <div class="current-decal" data-tooltip="Protoss Decal">
164
+
165
+
166
+ <span class="icon-frame "
167
+ style="background: url('/sc2/static/local-common/images/sc2/decals/0-45.jpg?v42') -45px -135px no-repeat; width: 45px; height: 45px;">
168
+
169
+ <a href="/sc2/en/profile/3354437/1/ClarkeKent/rewards/protoss-decals#reward-2009110693" style="height: 45px"> </a>
170
+ </span>
171
+ </div>
172
+
173
+ <div class="current-decal" data-tooltip="Terran Decal">
174
+
175
+
176
+ <span class="icon-frame "
177
+ style="background: url('/sc2/static/local-common/images/sc2/decals/0-45.jpg?v42') 0px 0px no-repeat; width: 45px; height: 45px;">
178
+
179
+ <a href="/sc2/en/profile/3354437/1/ClarkeKent/rewards/terran-decals#reward-18730036" style="height: 45px"> </a>
180
+ </span>
181
+ </div>
182
+ </div>
183
+
184
+ <h2><a href="/sc2/en/profile/3354437/1/ClarkeKent/">ClarkeKent</a></h2>
185
+ <h3>35</h3>
186
+ </div>
187
+
188
+ <div id="profile-left">
189
+ <ul id="profile-menu">
190
+ <li class="active">
191
+ <a href="/sc2/en/profile/3354437/1/ClarkeKent/">
192
+
193
+
194
+ Profile
195
+ </a>
196
+ </li>
197
+ <li>
198
+ <a href="achievements/">
199
+ <span class="forward"></span>
200
+
201
+ Achievements
202
+ </a>
203
+ </li>
204
+ <li>
205
+ <a href="matches">
206
+
207
+
208
+ Match History
209
+ </a>
210
+ </li>
211
+ <li>
212
+ <a href="rewards/">
213
+ <span class="forward"></span>
214
+
215
+ Rewards
216
+ </a>
217
+ </li>
218
+ <li>
219
+ <a href="ladder/">
220
+ <span class="forward"></span>
221
+
222
+ Leagues &amp; Ladders
223
+ </a>
224
+ </li>
225
+ </ul>
226
+
227
+
228
+ </div>
229
+
230
+ <div id="profile-right">
231
+
232
+ <div class="profile-module">
233
+ <div class="module-top">
234
+ <div class="module-bot">
235
+ <div class="module-left" id="season-snapshot">
236
+ <div class="module-title">
237
+ <h3 class="title-globe">
238
+ Season 8 <span>-</span>
239
+ Snapshot
240
+ </h3>
241
+ </div>
242
+
243
+
244
+ <div class="module-body snapshot-empty">
245
+ <h3>No games have been played.</h3>
246
+ </div>
247
+ </div>
248
+
249
+ <div class="module-right" id="career-stats">
250
+ <div class="module-title">
251
+ <h3 class="title-graph">Career Stats</h3>
252
+ </div>
253
+
254
+
255
+
256
+ <div class="module-body campaign-unearned">
257
+ <h4>League Wins</h4>
258
+ <h2>0</h2>
259
+
260
+ <br />
261
+ <h4>Games Won</h4>
262
+
263
+ <ul>
264
+ <li>
265
+ <span>0</span>
266
+ Custom Games
267
+ </li>
268
+ <li>
269
+ <span>0</span>
270
+ FFA
271
+ </li>
272
+ <li>
273
+ <span>0</span>
274
+ Co-Op vs AI
275
+ </li>
276
+ </ul>
277
+
278
+ <br />
279
+
280
+ <h4>Campaign Not Complete</h4>
281
+ </div>
282
+ </div>
283
+
284
+ <span class="clear"><!-- --></span>
285
+ </div>
286
+ </div>
287
+ </div>
288
+
289
+ <div class="profile-module single">
290
+ <div class="module-top">
291
+ <div class="module-bot">
292
+ <div class="module-left">
293
+ <div class="module-title">
294
+ <h3 class="title-shield">Achievements</h3>
295
+ </div>
296
+
297
+ <div class="module-body" id="top-achievements">
298
+
299
+
300
+
301
+ <div class="progress-tile">
302
+ <a href="achievements/category/3211280" class="progress-link">
303
+ <span class="portrait-a">
304
+
305
+
306
+
307
+
308
+
309
+
310
+ <span class="icon-frame "
311
+ style="background: url('/sc2/static/local-common/images/sc2/achievements/2-75.jpg?v42') -600px -375px no-repeat; width: 75px; height: 75px;">
312
+
313
+ </span>
314
+
315
+ <span class="clear"><!-- --></span>
316
+ </span>
317
+
318
+ Liberty Campaign
319
+ </a>
320
+
321
+
322
+
323
+ <div class="achievements-progress">
324
+ <div class="progress-wrapper">
325
+ <div class="progress-bar" style="width: 2.2012578616%"></div>
326
+ </div>
327
+
328
+ <span>35</span>
329
+ </div>
330
+ </div>
331
+
332
+
333
+ <div class="progress-tile">
334
+ <a href="achievements/category/4325398" class="progress-link">
335
+ <span class="portrait-a">
336
+
337
+
338
+
339
+
340
+
341
+
342
+ <span class="icon-frame "
343
+ style="background: url('/sc2/static/local-common/images/sc2/achievements/2-75.jpg?v42') -300px -375px no-repeat; width: 75px; height: 75px;">
344
+
345
+ </span>
346
+
347
+ <span class="clear"><!-- --></span>
348
+ </span>
349
+
350
+ Exploration
351
+ </a>
352
+
353
+
354
+
355
+ <div class="achievements-progress">
356
+ <div class="progress-wrapper">
357
+ <div class="progress-bar" style="width: 0%"></div>
358
+ </div>
359
+
360
+ <span>0</span>
361
+ </div>
362
+ </div>
363
+
364
+
365
+ <div class="progress-tile">
366
+ <a href="achievements/category/4325392" class="progress-link">
367
+ <span class="portrait-a">
368
+
369
+
370
+
371
+
372
+
373
+
374
+ <span class="icon-frame "
375
+ style="background: url('/sc2/static/local-common/images/sc2/achievements/2-75.jpg?v42') -150px -525px no-repeat; width: 75px; height: 75px;">
376
+
377
+ </span>
378
+
379
+ <span class="clear"><!-- --></span>
380
+ </span>
381
+
382
+ Custom Game
383
+ </a>
384
+
385
+
386
+
387
+ <div class="achievements-progress">
388
+ <div class="progress-wrapper">
389
+ <div class="progress-bar" style="width: 0%"></div>
390
+ </div>
391
+
392
+ <span>0</span>
393
+ </div>
394
+ </div>
395
+
396
+
397
+ <div class="progress-tile">
398
+ <a href="achievements/category/4325386" class="progress-link">
399
+ <span class="portrait-a">
400
+
401
+
402
+
403
+
404
+
405
+
406
+ <span class="icon-frame "
407
+ style="background: url('/sc2/static/local-common/images/sc2/achievements/2-75.jpg?v42') -525px -450px no-repeat; width: 75px; height: 75px;">
408
+
409
+ </span>
410
+
411
+ <span class="clear"><!-- --></span>
412
+ </span>
413
+
414
+ Cooperative
415
+ </a>
416
+
417
+
418
+
419
+ <div class="achievements-progress">
420
+ <div class="progress-wrapper">
421
+ <div class="progress-bar" style="width: 0%"></div>
422
+ </div>
423
+
424
+ <span>0</span>
425
+ </div>
426
+ </div>
427
+
428
+
429
+ <div class="progress-tile">
430
+ <a href="achievements/category/4325378" class="progress-link">
431
+ <span class="portrait-a">
432
+
433
+
434
+
435
+
436
+
437
+
438
+ <span class="icon-frame "
439
+ style="background: url('/sc2/static/local-common/images/sc2/achievements/2-75.jpg?v42') -225px -450px no-repeat; width: 75px; height: 75px;">
440
+
441
+ </span>
442
+
443
+ <span class="clear"><!-- --></span>
444
+ </span>
445
+
446
+ Quick Match
447
+ </a>
448
+
449
+
450
+
451
+ <div class="achievements-progress">
452
+ <div class="progress-wrapper">
453
+ <div class="progress-bar" style="width: 0%"></div>
454
+ </div>
455
+
456
+ <span>0</span>
457
+ </div>
458
+ </div>
459
+
460
+ <span class="clear"><!-- --></span>
461
+ </div>
462
+ </div>
463
+
464
+ <div class="module-right">
465
+ <div class="module-title">
466
+ <h3 class="title-trophy">Showcase</h3>
467
+ </div>
468
+
469
+ <div class="module-body" id="achievement-showcase">
470
+
471
+ <div class="align-center" style="padding: 75px 15px 0 15px">Showcased achievements can be enabled through the Battle.net client.</div>
472
+ </div>
473
+ </div>
474
+
475
+ <span class="clear"><!-- --></span>
476
+
477
+ <div class="module-footer">
478
+ <a href="achievements/">More Achievements</a>
479
+ </div>
480
+ </div>
481
+ </div>
482
+ </div>
483
+
484
+ <span class="clear"><!-- --></span>
485
+
486
+ </div>
487
+
488
+ <span class="clear"><!-- --></span>
489
+ </div>
490
+ </div>
491
+ </div>
492
+ </div>
493
+ <div id="footer">
494
+ <div id="sitemap" class="promotions">
495
+ <div class="column">
496
+ <h3 class="bnet">
497
+ <a href="http://us.battle.net/" tabindex="100">Battle.net Home</a>
498
+ </h3>
499
+ <ul>
500
+ <li><a href="http://us.battle.net/what-is/">What is Battle.net?</a></li>
501
+ <li><a href="https://us.battle.net/account/management/get-a-game.html">Buy Games</a></li>
502
+ <li><a href="https://us.battle.net/account/management/">Account</a></li>
503
+ <li><a href="http://us.battle.net/support/">Support</a></li>
504
+ <li><a href="http://us.battle.net/realid/">Real ID</a></li>
505
+ <li><a href="http://us.battle.net/battletag/">BattleTag</a></li>
506
+ </ul>
507
+ </div>
508
+ <div class="column">
509
+ <h3 class="games">
510
+ <a href="http://us.battle.net/" tabindex="100">Games</a>
511
+ </h3>
512
+ <ul>
513
+ <li><a href="http://us.battle.net/sc2/">StarCraft II™</a></li>
514
+ <li><a href="http://us.battle.net/wow/">World of Warcraft™</a></li>
515
+ <li><a href="http://us.battle.net/d3/">Diablo III™</a></li>
516
+ <li><a href="http://us.battle.net/games/classic">Classic Games</a></li>
517
+ <li><a href="https://us.battle.net/account/download/">Game Client Downloads</a></li>
518
+ </ul>
519
+ </div>
520
+ <div class="column">
521
+ <h3 class="account">
522
+ <a href="https://us.battle.net/account/management/" tabindex="100">Account</a>
523
+ </h3>
524
+ <ul>
525
+ <li><a href="https://us.battle.net/account/support/login-support.html">Can’t log in?</a></li>
526
+ <li><a href="https://us.battle.net/account/creation/tos.html">Create Account</a></li>
527
+ <li><a href="https://us.battle.net/account/management/">Account Summary</a></li>
528
+ <li><a href="https://us.battle.net/account/management/authenticator.html">Account Security</a></li>
529
+ <li><a href="https://us.battle.net/account/management/add-game.html">Add a Game</a></li>
530
+ <li><a href="https://us.battle.net/account/management/redemption/redeem.html">Redeem Promo Codes</a></li>
531
+ </ul>
532
+ </div>
533
+ <div class="column">
534
+ <h3 class="support">
535
+ <a href="http://us.battle.net/support/" tabindex="100">Support</a>
536
+ </h3>
537
+ <ul>
538
+ <li><a href="http://us.battle.net/support/">Support Articles</a></li>
539
+ <li><a href="https://us.battle.net/account/parental-controls/index.html">Parental Controls</a></li>
540
+ <li><a href="http://us.battle.net/security/">Protect Your Account</a></li>
541
+ <li><a href="http://us.battle.net/security/help">Help! I got hacked!</a></li>
542
+ </ul>
543
+ </div>
544
+ <div id="footer-promotions">
545
+ <div class="sidebar-content"></div>
546
+ <div id="sidebar-marketing" class="sidebar-module">
547
+ <div class="bnet-offer">
548
+ <!-- -->
549
+ <div class="bnet-offer-bg">
550
+ <a href="https://us.battle.net/account/activation/landing.html?product=S2&amp;key&amp;purchase" target="_blank" id="ad5207109" class="bnet-offer-image" onclick="BnetAds.trackEvent('5207109', 'SCIIdig', 'sc2', true);">
551
+ <img src="http://us.media2.battle.net/cms/ad_300x100/ZNB918LXVJ251309281567042.jpg" width="300" height="100" alt=""/>
552
+ </a>
553
+ </div>
554
+ <script type="text/javascript">
555
+ //<![CDATA[
556
+ if(typeof (BnetAds.addEvent) != "undefined" )
557
+ BnetAds.addEvent(window, 'load', function(){ BnetAds.trackEvent('5207109', 'SCIIdig', 'sc2'); } );
558
+ else
559
+ BnetAds.trackEvent('5207109', 'SCIIdig', 'sc2');
560
+ //]]>
561
+ </script>
562
+ </div>
563
+ </div>
564
+ </div>
565
+ <span class="clear"><!-- --></span>
566
+ </div>
567
+ <div id="copyright">
568
+ <a href="javascript:;" tabindex="100" id="change-language">
569
+ <span>Americas - English (US)</span>
570
+ </a>
571
+ <span>©2012 Blizzard Entertainment, Inc. All rights reserved</span>
572
+ <a target="_blank" href="http://us.blizzard.com/company/about/termsofuse.html" tabindex="100">Terms of Use</a>
573
+ <a target="_blank" href="http://us.blizzard.com/company/legal/" tabindex="100">Legal</a>
574
+ <a target="_blank" href="http://us.blizzard.com/company/about/privacy.html" tabindex="100">Privacy Policy</a>
575
+ <a target="_blank" href="http://us.blizzard.com/company/about/infringementnotice.html" tabindex="100">Copyright Infringement</a>
576
+ </div>
577
+ <div id="international"></div>
578
+ <div id="legal">
579
+ <div id="legal-ratings" class="png-fix">
580
+ <a rel="nofollow" class="truste-link" href="//privacy-policy.truste.com/click-with-confidence/ctv/en/us.battle.net/seal_m" target="_blank">
581
+ <img class="legal-image" src="//privacy-policy.truste.com/certified-seal/wps/en/us.battle.net/seal_m.png" alt="Validate TRUSTe privacy certification"/>
582
+ </a>
583
+ <a rel="nofollow" target="_blank" href="http://www.esrb.org/ratings/ratings_guide.jsp">
584
+ <img class="legal-image" alt="" src="/sc2/static/local-common/images/legal/us/esrb-teen-sc2.png" />
585
+ </a>
586
+ </div>
587
+ <div id="blizzard" class="png-fix">
588
+ <a href="http://blizzard.com" tabindex="100"><img src="/sc2/static/local-common/images/logos/blizz-sc2.png" alt="" /></a>
589
+ </div>
590
+ <span class="clear"><!-- --></span>
591
+ </div>
592
+ </div>
593
+ <div id="service">
594
+ <ul class="service-bar">
595
+ <li class="service-cell service-home"><a href="http://us.battle.net/" tabindex="50" accesskey="1" title="Battle.net Home"> </a></li>
596
+ <li class="service-cell service-welcome">
597
+ <a href="?login" onclick="return Login.open()">Log in</a> or <a href="https://us.battle.net/account/creation/tos.html">Create an Account</a>
598
+ </li>
599
+ <li class="service-cell service-account"><a href="https://us.battle.net/account/management/" class="service-link" tabindex="50" accesskey="3">Account</a></li>
600
+ <li class="service-cell service-support service-support-enhanced">
601
+ <a href="#support" class="service-link service-link-dropdown" tabindex="50" accesskey="4" id="support-link" onclick="return false" style="cursor: progress" rel="javascript">Support<span class="no-support-tickets" id="support-ticket-count"></span></a>
602
+ <div class="support-menu" id="support-menu" style="display:none;">
603
+ <div class="support-primary">
604
+ <ul class="support-nav">
605
+ <li>
606
+ <a href="http://us.battle.net/support/" tabindex="55" class="support-category">
607
+ <strong class="support-caption">Knowledge Center</strong>
608
+ Browse our support articles
609
+ </a>
610
+ </li>
611
+ <li>
612
+ <a href="https://us.battle.net/support/ticket/status" tabindex="55" class="support-category">
613
+ <strong class="support-caption">Your Support Tickets</strong>
614
+ View your active tickets (login required).
615
+ </a>
616
+ </li>
617
+ </ul>
618
+ <span class="clear"><!-- --></span>
619
+ </div>
620
+ <div class="support-secondary"></div>
621
+ <!--[if IE 6]> <iframe id="support-shim" src="javascript:false;" frameborder="0" scrolling="no" style="display: block; position: absolute; top: 0; left: 9px; width: 297px; height: 400px; z-index: -1;"></iframe>
622
+ <script type="text/javascript">
623
+ //<![CDATA[
624
+ (function(){
625
+ var doc = document;
626
+ var shim = doc.getElementById('support-shim');
627
+ shim.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
628
+ shim.style.display = 'block';
629
+ })();
630
+ //]]>
631
+ </script>
632
+ <![endif]-->
633
+ </div>
634
+ </li>
635
+ <li class="service-cell service-explore">
636
+ <a href="#explore" tabindex="50" accesskey="5" class="dropdown" id="explore-link" onclick="return false" style="cursor: progress" rel="javascript">Explore</a>
637
+ <div class="explore-menu" id="explore-menu" style="display:none;">
638
+ <div class="explore-primary">
639
+ <ul class="explore-nav">
640
+ <li>
641
+ <a href="http://us.battle.net/" tabindex="55" data-label="Home">
642
+ <strong class="explore-caption">Battle.net Home</strong>
643
+ Connect. Play. Unite.
644
+ </a>
645
+ </li>
646
+ <li>
647
+ <a href="https://us.battle.net/account/management/" tabindex="55" data-label="Account">
648
+ <strong class="explore-caption">Account</strong>
649
+ Manage your Account
650
+ </a>
651
+ </li>
652
+ <li>
653
+ <a href="http://us.battle.net/support/" tabindex="55" data-label="Support">
654
+ <strong class="explore-caption">Support</strong>
655
+ Get Support and explore the knowledgebase.
656
+ </a>
657
+ </li>
658
+ <li>
659
+ <a href="https://us.battle.net/account/management/get-a-game.html" tabindex="55" data-label="Buy Games">
660
+ <strong class="explore-caption">Buy Games</strong>
661
+ Digital Games for Download
662
+ </a>
663
+ </li>
664
+ </ul>
665
+ <div class="explore-links">
666
+ <h2 class="explore-caption">More</h2>
667
+ <ul>
668
+ <li><a href="http://us.battle.net/what-is/" tabindex="55" data-label="More">What is Battle.net?</a></li>
669
+ <li><a href="https://us.battle.net/account/parental-controls/index.html" tabindex="55" data-label="More">Parental Controls</a></li>
670
+ <li><a href="http://us.battle.net/security/" tabindex="55" data-label="More">Account Security</a></li>
671
+ <li><a href="https://us.battle.net/account/management/add-game.html" tabindex="55" data-label="More">Add a Game</a></li>
672
+ <li><a href="https://us.battle.net/account/support/password-reset.html" tabindex="55" data-label="More">Can’t log in?</a></li>
673
+ <li><a href="https://us.battle.net/account/download/" tabindex="55" data-label="More">Game Client Downloads</a></li>
674
+ <li><a href="https://us.battle.net/account/management/redemption/redeem.html" tabindex="55" data-label="More">Redeem Promo Codes</a></li>
675
+ <li><a href="http://us.battle.net/games/classic" tabindex="55" data-label="More">Classic Games</a></li>
676
+ </ul>
677
+ </div>
678
+ <span class="clear"><!-- --></span>
679
+ <!--[if IE 6]> <iframe id="explore-shim" src="javascript:false;" frameborder="0" scrolling="no" style="display: block; position: absolute; top: 0; left: 9px; width: 409px; height: 400px; z-index: -1;"></iframe>
680
+ <script type="text/javascript">
681
+ //<![CDATA[
682
+ (function(){
683
+ var doc = document;
684
+ var shim = doc.getElementById('explore-shim');
685
+ shim.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
686
+ shim.style.display = 'block';
687
+ })();
688
+ //]]>
689
+ </script>
690
+ <![endif]-->
691
+ </div>
692
+ <ul class="explore-secondary">
693
+ <li class="explore-game explore-game-sc2">
694
+ <a href="http://us.battle.net/sc2/" tabindex="55" data-label="Game - sc2">
695
+ <span class="explore-game-inner">
696
+ <strong class="explore-caption">StarCraft II™</strong>
697
+ <span>News &amp; Forums</span> <span>Beginner’s Guide</span> <span>Player Profiles</span>
698
+ </span>
699
+ </a>
700
+ </li>
701
+ <li class="explore-game explore-game-wow">
702
+ <a href="http://us.battle.net/wow/" tabindex="55" data-label="Game - wow">
703
+ <span class="explore-game-inner">
704
+ <strong class="explore-caption">World of Warcraft™</strong>
705
+ <span>Character Profiles</span> <span>News &amp; Forums</span> <span>Game Guide</span>
706
+ </span>
707
+ </a>
708
+ </li>
709
+ <li class="explore-game explore-game-d3">
710
+ <a href="http://us.battle.net/d3/" tabindex="55" data-label="Game - d3">
711
+ <span class="explore-game-inner">
712
+ <strong class="explore-caption">Diablo III™</strong>
713
+ <span>Game Guide</span> <span>News</span> <span>Forums</span>
714
+ </span>
715
+ </a>
716
+ </li>
717
+ </ul>
718
+ </div>
719
+ </li>
720
+ </ul>
721
+ <div id="warnings-wrapper">
722
+ <script type="text/javascript">
723
+ //<![CDATA[
724
+ $(function() {
725
+ App.saveCookie('html5Warning');
726
+ App.resetCookie('browserWarning');
727
+ });
728
+ //]]>
729
+ </script>
730
+ <!--[if lt IE 8]> <div id="browser-warning" class="warning warning-red">
731
+ <div class="warning-inner2">
732
+ You are using an outdated web browser.<br />
733
+ <a href="http://us.blizzard.com/support/article/browserupdate">Upgrade</a> or <a href="http://www.google.com/chromeframe/?hl=en-US" id="chrome-frame-link">install Google Chrome Frame</a>.
734
+ <a href="#close" class="warning-close" onclick="App.closeWarning('#browser-warning', 'browserWarning'); return false;"></a>
735
+ </div>
736
+ </div>
737
+ <![endif]-->
738
+ <!--[if lt IE 8]> <script type="text/javascript" src="/sc2/static/local-common/js/third-party/CFInstall.min.js?v42"></script>
739
+ <script type="text/javascript">
740
+ //<![CDATA[
741
+ $(function() {
742
+ var age = 365 * 24 * 60 * 60 * 1000;
743
+ var src = 'https://www.google.com/chromeframe/?hl=en-US';
744
+ if ('http:' == document.location.protocol) {
745
+ src = 'http://www.google.com/chromeframe/?hl=en-US';
746
+ }
747
+ document.cookie = "disableGCFCheck=0;path=/;max-age="+age;
748
+ $('#chrome-frame-link').bind({
749
+ 'click': function() {
750
+ App.closeWarning('#browser-warning');
751
+ CFInstall.check({
752
+ mode: 'overlay',
753
+ url: src
754
+ });
755
+ return false;
756
+ }
757
+ });
758
+ });
759
+ //]]>
760
+ </script>
761
+ <![endif]-->
762
+ <noscript>
763
+ <div id="javascript-warning" class="warning warning-red">
764
+ <div class="warning-inner2">
765
+ JavaScript must be enabled to use this site.
766
+ </div>
767
+ </div>
768
+ </noscript>
769
+ </div>
770
+ </div>
771
+ </div><script type="text/javascript" src="/sc2/static/local-common/js/search.js?v42"></script>
772
+ <script type="text/javascript">
773
+ //<![CDATA[
774
+ var xsToken = '';
775
+ var supportToken = '';
776
+ var Msg = {
777
+ support: {
778
+ ticketNew: 'Ticket {0} was created.',
779
+ ticketStatus: 'Ticket {0}’s status changed to {1}.',
780
+ ticketOpen: 'Open',
781
+ ticketAnswered: 'Answered',
782
+ ticketResolved: 'Resolved',
783
+ ticketCanceled: 'Canceled',
784
+ ticketArchived: 'Archived',
785
+ ticketInfo: 'Need Info',
786
+ ticketAll: 'View All Tickets'
787
+ },
788
+ cms: {
789
+ requestError: 'Your request cannot be completed.',
790
+ ignoreNot: 'Not ignoring this user',
791
+ ignoreAlready: 'Already ignoring this user',
792
+ stickyRequested: 'Sticky requested',
793
+ stickyHasBeenRequested: 'You have already sent a sticky request for this topic.',
794
+ postAdded: 'Post added to tracker',
795
+ postRemoved: 'Post removed from tracker',
796
+ userAdded: 'User added to tracker',
797
+ userRemoved: 'User removed from tracker',
798
+ validationError: 'A required field is incomplete',
799
+ characterExceed: 'The post body exceeds XXXXXX characters.',
800
+ searchFor: "Search for",
801
+ searchTags: "Articles tagged:",
802
+ characterAjaxError: "You may have become logged out. Please refresh the page and try again.",
803
+ ilvl: "Level {0}",
804
+ shortQuery: "Search requests must be at least three characters long."
805
+ },
806
+ bml: {
807
+ bold: 'Bold',
808
+ italics: 'Italics',
809
+ underline: 'Underline',
810
+ list: 'Unordered List',
811
+ listItem: 'List Item',
812
+ quote: 'Quote',
813
+ quoteBy: 'Posted by {0}',
814
+ unformat: 'Remove Formating',
815
+ cleanup: 'Fix Linebreaks',
816
+ code: 'Code Blocks',
817
+ item: 'WoW Item',
818
+ itemPrompt: 'Item ID:',
819
+ url: 'URL',
820
+ urlPrompt: 'URL Address:'
821
+ },
822
+ ui: {
823
+ submit: 'Submit',
824
+ cancel: 'Cancel',
825
+ reset: 'Reset',
826
+ viewInGallery: 'View in gallery',
827
+ loading: 'Loading…',
828
+ unexpectedError: 'An error has occurred',
829
+ fansiteFind: 'Find this on…',
830
+ fansiteFindType: 'Find {0} on…',
831
+ fansiteNone: 'No fansites available.'
832
+ },
833
+ grammar: {
834
+ colon: '{0}:',
835
+ first: 'First',
836
+ last: 'Last'
837
+ },
838
+ fansite: {
839
+ achievement: 'achievement',
840
+ character: 'character',
841
+ faction: 'faction',
842
+ 'class': 'class',
843
+ object: 'object',
844
+ talentcalc: 'talents',
845
+ skill: 'profession',
846
+ quest: 'quest',
847
+ spell: 'spell',
848
+ event: 'event',
849
+ title: 'title',
850
+ arena: 'arena team',
851
+ guild: 'guild',
852
+ zone: 'zone',
853
+ item: 'item',
854
+ race: 'race',
855
+ npc: 'NPC',
856
+ pet: 'pet'
857
+ },
858
+ search: {
859
+ kb: 'Support',
860
+ post: 'Forums',
861
+ article: 'Blog Articles',
862
+ static: 'General Content',
863
+ wowcharacter: 'Characters',
864
+ wowitem: 'Items',
865
+ wowguild: 'Guilds',
866
+ wowarenateam: 'Arena Teams',
867
+ url: 'Suggested Links',
868
+ other: 'Other'
869
+ }
870
+ };
871
+ //]]>
872
+ </script>
873
+ <script type="text/javascript">
874
+ //<![CDATA[
875
+ Core.load("/sc2/static/local-common/js/third-party/jquery-ui-1.8.6.custom.min.js?v42");
876
+ Core.load("/sc2/static/local-common/js/login.js?v42", false, function() {
877
+ Login.embeddedUrl = 'https://us.battle.net/login/login.frag';
878
+ });
879
+ //]]>
880
+ </script>
881
+ <script type="text/javascript" src="/sc2/static/local-common/js/menu.js?v42"></script>
882
+ <script type="text/javascript" src="/sc2/static/js/sc2.js?v21"></script>
883
+ <script type="text/javascript">
884
+ //<![CDATA[
885
+ $(function(){
886
+ Menu.initialize('/data/menu.json?v42');
887
+ Tooltip.options.useTable = true;
888
+ });
889
+ //]]>
890
+ </script>
891
+ <!--[if lt IE 8]> <script type="text/javascript" src="/sc2/static/local-common/js/third-party/jquery.pngFix.pack.js?v42"></script>
892
+ <script type="text/javascript">
893
+ //<![CDATA[
894
+ $('.png-fix').pngFix(); //]]>
895
+ </script>
896
+ <![endif]-->
897
+ <script type="text/javascript">
898
+ //<![CDATA[
899
+ (function() {
900
+ var ga = document.createElement('script');
901
+ var src = "https://ssl.google-analytics.com/ga.js";
902
+ if ('http:' == document.location.protocol) {
903
+ src = "http://www.google-analytics.com/ga.js";
904
+ }
905
+ ga.type = 'text/javascript';
906
+ ga.setAttribute('async', 'true');
907
+ ga.src = src;
908
+ var s = document.getElementsByTagName('script');
909
+ s = s[s.length-1];
910
+ s.parentNode.insertBefore(ga, s.nextSibling);
911
+ })();
912
+ //]]>
913
+ </script>
914
+ </body>
915
+ </html>