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-06-14 01:55:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
aba0b3898adf94b2bd85992ac26c9a0f6dd01b22
aba0b389
1 parent
0164bbc3
기능: data.json에 버전 추가 및 버전이 다를 경우 크롤링
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
app.js
app.js
View file @
aba0b38
...
...
@@ -7,6 +7,8 @@ const axios = require('axios');
const
cheerio
=
require
(
'cheerio'
);
const
url
=
'http://lol.inven.co.kr/dataninfo/proteam/progamer.php?code=135'
;
const
version
=
'0.1'
;
var
fakerData
=
{};
function
checkData
()
{
...
...
@@ -15,6 +17,11 @@ function checkData() {
console
.
log
(
"데이터 파일이 존재합니다. 데이터를 읽습니다."
);
fakerData
=
JSON
.
parse
(
dataBuffer
.
toString
());
console
.
log
(
fakerData
);
if
(
fakerData
.
version
!=
version
){
console
.
log
(
"버전이 다릅니다. 데이터를 크롤링합니다."
);
getData
();
}
}
catch
(
exception
)
{
console
.
log
(
exception
);
...
...
Please
register
or
login
to post a comment