Showing
3 changed files
with
39 additions
and
0 deletions
zum/package-lock.json
0 → 100644
This diff is collapsed. Click to expand it.
zum/package.json
0 → 100644
zum/zum.js
0 → 100644
| 1 | +var Crawler = require("crawler"); | ||
| 2 | + | ||
| 3 | +var c = new Crawler({ | ||
| 4 | + maxConnections : 10, | ||
| 5 | + callback : function (error, res, done) { | ||
| 6 | + if(error){ | ||
| 7 | + console.log(error); | ||
| 8 | + } else{ | ||
| 9 | + var $ = res.$; | ||
| 10 | + console.log('ZUM ' + $("title").text()); | ||
| 11 | + | ||
| 12 | + const $bodyList1 = $("div.realtime_wrap").children("div.inner_box"); | ||
| 13 | + const $bodyList2 = $("ul.slide_words_list li").children("div.cont"); | ||
| 14 | + | ||
| 15 | + console.log('< ' + $bodyList1.find('span.time_data').text() + ' >'); | ||
| 16 | + $bodyList2.each(function(i, elem) { | ||
| 17 | + console.log((i + 1) + ". " + $(this).find('span.word').text()); | ||
| 18 | + }); | ||
| 19 | + } | ||
| 20 | + done(); | ||
| 21 | + } | ||
| 22 | +}); | ||
| 23 | + | ||
| 24 | +c.queue('https://issue.zum.com/'); |
-
Please register or login to post a comment