Toggle navigation
Toggle navigation
This project
Loading...
Sign in
유승근
/
Computer-part-Recommand
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Network
Create a new issue
Commits
Issue Boards
Authored by
Yuseunggeun
2020-06-24 23:18:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2c9404353f6a6fcd0a3c8e984f5e3837ff510af6
2c940435
1 parent
f4fe0302
크롤링 사이트 병경
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
routes/index.js
test.json
routes/index.js
View file @
2c94043
...
...
@@ -8,7 +8,7 @@ var router = express.Router();
var
client_id
=
'HH0lbvfI3QtlyR7e9tkw'
;
var
client_secret
=
'mvPTEsNs7L'
;
var
url
=
"https://www.videocardbenchmark.net/
gpu_value.html#all-time-value
"
;
var
url
=
"https://www.videocardbenchmark.net/
common_gpus.html
"
;
//var Graphic_card = [];
//var Price = [];
var
exhange_rate
=
0
;
...
...
@@ -31,7 +31,7 @@ request(url, function(error, response, html){ //크롤링
info
.
name
=
data
.
find
(
"span.prdname"
).
text
();
//물품 이름
info
.
price
=
Number
(
data
.
find
(
"span.price-neww"
).
text
().
split
(
','
).
join
(
''
));
//물품 가격
info
.
link
=
data
.
attr
(
"href"
);
//물품 정보링크
info
.
benchmark
=
Number
(
data
.
find
(
"span.
mark-neww"
).
text
(
));
//물품 성능
info
.
benchmark
=
Number
(
data
.
find
(
"span.
count"
).
text
().
split
(
','
).
join
(
''
));
//물품 성능
Graphic_card_info
.
push
(
info
);
i
++
if
(
i
>=
count
){
//50개만 저장
...
...
test.json
View file @
2c94043
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment