전세계

기능: 최근 LCK 기록 크롤링

Showing 1 changed file with 27 additions and 1 deletions
...@@ -32,9 +32,35 @@ getHTML() ...@@ -32,9 +32,35 @@ getHTML()
32 deathPerMatch : td.eq(6).text(), 32 deathPerMatch : td.eq(6).text(),
33 assistPerMatch : td.eq(7).text(), 33 assistPerMatch : td.eq(7).text(),
34 kDA : td.eq(8).text(), 34 kDA : td.eq(8).text(),
35 - killParticipation : td.eq(9).text() 35 + kP : td.eq(9).text()
36 }; 36 };
37 37
38 + // 최근 LCK 모스트
39 + var recentLCKInfo = $('div.block.scriptorium_box.scriptorium_player_info').children().eq(2);
40 + var mostInfo = recentLCKInfo.find('div.left ul.block.list').children();
41 + var mostList = [];
42 + var indicatorInfo = recentLCKInfo.find('div.right ul.block.bottom.clearfix').children();
43 +
44 + mostInfo.each(function (i, elem){
45 + mostList[i] = {
46 + champion : $(this).find('div.name_area p.value b').text(),
47 + played : $(this).find('div.play_area p.value').text(),
48 + record : $(this).find('div.log_area p.value').text(),
49 + kDA : $(this).find('div.kda_area p.value').text()
50 + }
51 + });
52 +
53 + fakerData['recentLCK'] = {
54 + name : recentLCKInfo.find('h3.block.player_sub_title.clearfix').text(),
55 + most : mostList,
56 + comparison_WinRate : indicatorInfo.eq(0).find('div.progress.left div.text').text()
57 + .concat(" ", indicatorInfo.eq(0).find('div.progress.right div.text').text()),
58 + comparison_KDA : indicatorInfo.eq(1).find('div.progress.left div.text').text()
59 + .concat(" ", indicatorInfo.eq(1).find('div.progress.right div.text').text()),
60 + comparison_KP : indicatorInfo.eq(2).find('div.progress.left div.text').text()
61 + .concat(" ", indicatorInfo.eq(2).find('div.progress.right div.text').text())
62 + };
63 +
38 return fakerData; 64 return fakerData;
39 }) 65 })
40 .then(res => console.log(res)); 66 .then(res => console.log(res));
......