정태규

Update zum

This diff is collapsed. Click to expand it.
...@@ -8,8 +8,5 @@ ...@@ -8,8 +8,5 @@
8 }, 8 },
9 "keywords": [], 9 "keywords": [],
10 "author": "", 10 "author": "",
11 - "license": "ISC", 11 + "license": "ISC"
12 - "dependencies": {
13 - "crawler": "^1.3.0"
14 - }
15 } 12 }
......
...@@ -7,15 +7,18 @@ var c = new Crawler({ ...@@ -7,15 +7,18 @@ var c = new Crawler({
7 console.log(error); 7 console.log(error);
8 } else{ 8 } else{
9 var $ = res.$; 9 var $ = res.$;
10 - console.log('ZUM ' + $("title").text()); 10 +
11 + let List = [];
12 + List[0] = 'zum NOW 이슈 검색어';
11 13
12 const $bodyList1 = $("div.realtime_wrap").children("div.inner_box"); 14 const $bodyList1 = $("div.realtime_wrap").children("div.inner_box");
13 const $bodyList2 = $("ul.slide_words_list li").children("div.cont"); 15 const $bodyList2 = $("ul.slide_words_list li").children("div.cont");
14 16
15 - console.log('< ' + $bodyList1.find('span.time_data').text() + ' >'); 17 + List[1] =('< ' + $bodyList1.find('span.time_data').text() + ' >');
16 $bodyList2.each(function(i, elem) { 18 $bodyList2.each(function(i, elem) {
17 - console.log((i + 1) + ". " + $(this).find('span.word').text()); 19 + List[i + 2] = ((i + 1) + ". " + $(this).find('span.word').text());
18 }); 20 });
21 + console.log(List);
19 } 22 }
20 done(); 23 done();
21 } 24 }
......