Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김동근
/
WhoAreYou
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김동근
2019-06-02 16:02:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d7a7559c51b03fb6a4ed1a141d8ed2425c1a0cb
8d7a7559
1 parent
6032f4ae
work well original ver.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
api/card/addCards.js
api/card/getResult.js
cardsenUS2.json
api/card/addCards.js
View file @
8d7a755
...
...
@@ -11,7 +11,7 @@ exports.AddCards=(deckId,cards)=>{
return
new
Promise
((
resolve
,
reject
)
=>
{
//전체 카드 읽어 오기
fs
.
readFile
(
'cardsenUS.json'
,(
err
,
data
)
=>
{
fs
.
readFile
(
'cardsenUS
2
.json'
,(
err
,
data
)
=>
{
if
(
err
)
throw
err
cardEnUS
=
JSON
.
parse
(
data
)
//mysql 연결
...
...
api/card/getResult.js
View file @
8d7a755
...
...
@@ -34,8 +34,10 @@ exports.GetResult=(req,res)=>{
cardIds
=
JSON
.
parse
(
cardIds
)
//검색을 위한 쿼리스트링
let
idInQuery
=
cardIds
[
0
].
cardId
for
(
let
i
=
1
;
i
<
cardIds
.
length
;
i
++
){
idInQuery
+=
'%2C'
+
cardIds
[
i
].
cardId
//cardIds.length
for
(
let
i
=
1
;
i
<
cardIds
.
length
;
i
++
){
if
(
cardIds
[
i
].
cardId
!=
'0'
)
idInQuery
+=
'%2C'
+
cardIds
[
i
].
cardId
}
//var url = 'https://hsreplay.net/decks/#timeRange=LAST_30_DAYS&includedCards=' + idInQuery
...
...
@@ -51,7 +53,8 @@ exports.GetResult=(req,res)=>{
const
page
=
await
browser
.
newPage
()
await
page
.
setViewport
({
width
:
1366
,
height
:
768
})
//idInQuery = '180%2C48886%2C904%2C461'
await
page
.
goto
(
`https://hsreplay.net/decks/#timeRange=LAST_30_DAYS&includedCards=
${
idInQuery
}
`
,{
waitUntil
:
'load'
})
console
.
log
(
idInQuery
)
await
page
.
goto
(
`https://hsreplay.net/decks/#timeRange=LAST_30_DAYS&includedCards=
${
idInQuery
}
`
,{
waitUntil
:
'networkidle2'
})
const
content
=
await
page
.
content
()
browser
.
close
()
return
content
...
...
cardsenUS2.json
0 → 100644
View file @
8d7a755
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment