Toggle navigation
Toggle navigation
This project
Loading...
Sign in
전세계
/
FakerQuiz
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
전세계
2020-05-31 21:52:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
921224f32f75a6fdb10a200a332c2b8e0fc2bfab
921224f3
1 parent
1711de76
형식: 코드 region화 및 자동정렬
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
24 deletions
app.js
app.js
View file @
921224f
...
...
@@ -20,47 +20,50 @@ getHTML()
.
then
(
html
=>
{
const
$
=
cheerio
.
load
(
html
.
data
);
// LCK 통산 전적
//
#region
LCK 통산 전적
var
tr
=
$
(
'table.table.log_list.log01 tbody'
).
children
();
var
td
=
tr
.
eq
(
0
).
children
();
fakerData
[
'lCK'
]
=
{
totalGamePlay
:
td
.
eq
(
1
).
text
(),
totalWin
:
td
.
eq
(
2
).
text
(),
totalLose
:
td
.
eq
(
3
).
text
(),
winRate
:
td
.
eq
(
4
).
text
(),
killPerMatch
:
td
.
eq
(
5
).
text
(),
deathPerMatch
:
td
.
eq
(
6
).
text
(),
assistPerMatch
:
td
.
eq
(
7
).
text
(),
kDA
:
td
.
eq
(
8
).
text
(),
kP
:
td
.
eq
(
9
).
text
()
totalGamePlay
:
td
.
eq
(
1
).
text
(),
totalWin
:
td
.
eq
(
2
).
text
(),
totalLose
:
td
.
eq
(
3
).
text
(),
winRate
:
td
.
eq
(
4
).
text
(),
killPerMatch
:
td
.
eq
(
5
).
text
(),
deathPerMatch
:
td
.
eq
(
6
).
text
(),
assistPerMatch
:
td
.
eq
(
7
).
text
(),
kDA
:
td
.
eq
(
8
).
text
(),
kP
:
td
.
eq
(
9
).
text
()
};
//#endregion
//
최근 LCK 모스트
//
#region 최근 LCK 기록
var
recentLCKInfo
=
$
(
'div.block.scriptorium_box.scriptorium_player_info'
).
children
().
eq
(
2
);
var
mostInfo
=
recentLCKInfo
.
find
(
'div.left ul.block.list'
).
children
();
var
mostList
=
[];
var
indicatorInfo
=
recentLCKInfo
.
find
(
'div.right ul.block.bottom.clearfix'
).
children
();
mostInfo
.
each
(
function
(
i
,
elem
){
mostInfo
.
each
(
function
(
i
,
elem
)
{
mostList
[
i
]
=
{
champion
:
$
(
this
).
find
(
'div.name_area p.value b'
).
text
(),
played
:
$
(
this
).
find
(
'div.play_area p.value'
).
text
(),
record
:
$
(
this
).
find
(
'div.log_area p.value'
).
text
(),
kDA
:
$
(
this
).
find
(
'div.kda_area p.value'
).
text
()
champion
:
$
(
this
).
find
(
'div.name_area p.value b'
).
text
(),
played
:
$
(
this
).
find
(
'div.play_area p.value'
).
text
(),
record
:
$
(
this
).
find
(
'div.log_area p.value'
).
text
(),
kDA
:
$
(
this
).
find
(
'div.kda_area p.value'
).
text
()
}
});
fakerData
[
'recentLCK'
]
=
{
name
:
recentLCKInfo
.
find
(
'h3.block.player_sub_title.clearfix'
).
text
(),
most
:
mostList
,
comparison_WinRate
:
indicatorInfo
.
eq
(
0
).
find
(
'div.progress.left div.text'
).
text
()
name
:
recentLCKInfo
.
find
(
'h3.block.player_sub_title.clearfix'
).
text
(),
most
:
mostList
,
comparison_WinRate
:
indicatorInfo
.
eq
(
0
).
find
(
'div.progress.left div.text'
).
text
()
.
concat
(
" "
,
indicatorInfo
.
eq
(
0
).
find
(
'div.progress.right div.text'
).
text
()),
comparison_KDA
:
indicatorInfo
.
eq
(
1
).
find
(
'div.progress.left div.text'
).
text
()
.
concat
(
" "
,
indicatorInfo
.
eq
(
1
).
find
(
'div.progress.right div.text'
).
text
()),
comparison_KP
:
indicatorInfo
.
eq
(
2
).
find
(
'div.progress.left div.text'
).
text
()
.
concat
(
" "
,
indicatorInfo
.
eq
(
2
).
find
(
'div.progress.right div.text'
).
text
())
comparison_KDA
:
indicatorInfo
.
eq
(
1
).
find
(
'div.progress.left div.text'
).
text
()
.
concat
(
" "
,
indicatorInfo
.
eq
(
1
).
find
(
'div.progress.right div.text'
).
text
()),
comparison_KP
:
indicatorInfo
.
eq
(
2
).
find
(
'div.progress.left div.text'
).
text
()
.
concat
(
" "
,
indicatorInfo
.
eq
(
2
).
find
(
'div.progress.right div.text'
).
text
())
};
//#endregion
return
fakerData
;
})
.
then
(
res
=>
console
.
log
(
res
));
...
...
Please
register
or
login
to post a comment