윤혜원

다음 요일별 웹툰 크로링 성공!

......@@ -3,8 +3,6 @@
<component name="ChangeListManager">
<list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/package-lock.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/routes/daum.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/daum.js" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
......@@ -62,9 +60,10 @@
<entry key="project.open.time.11" value="2" />
<entry key="project.open.time.15" value="2" />
<entry key="project.open.time.16" value="2" />
<entry key="project.open.time.17" value="1" />
<entry key="project.open.time.2" value="1" />
<entry key="project.open.time.6" value="1" />
<entry key="project.opened" value="9" />
<entry key="project.opened" value="10" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
......@@ -89,13 +88,13 @@
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="ejs" value="63" />
<entry key="js" value="426" />
<entry key="js" value="934" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
<counts>
<entry key="EJS" value="63" />
<entry key="JavaScript" value="426" />
<entry key="JavaScript" value="934" />
</counts>
</usages-collector>
</session>
......@@ -141,8 +140,8 @@
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/routes/daum.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="10" column="30" selection-start-line="10" selection-start-column="30" selection-end-line="10" selection-end-column="30" />
<state relative-caret-position="274">
<caret line="88" lean-forward="true" selection-start-line="88" selection-end-line="88" />
</state>
</provider>
</entry>
......@@ -278,9 +277,9 @@
</packageJsonPaths>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-9" />
<option name="width" value="978" />
<option name="height" value="1039" />
<option name="x" value="-8" />
<option name="width" value="977" />
<option name="height" value="1038" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
......@@ -480,6 +479,7 @@
<workItem from="1543286438979" duration="9178000" />
<workItem from="1543299644956" duration="10319000" />
<workItem from="1543393354798" duration="25000" />
<workItem from="1543459526992" duration="2772000" />
</task>
<task id="LOCAL-00001" summary="초기 commit by intellij">
<created>1512174269218</created>
......@@ -499,7 +499,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="192288000" />
<option name="totallyTimeSpent" value="195060000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
......@@ -512,6 +512,7 @@
</component>
<component name="ToolWindowManager">
<frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48880598" visible="true" weight="0.16523464" />
<window_info id="Structure" order="1" weight="0.24964234" />
......@@ -750,8 +751,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/routes/daum.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="10" column="30" selection-start-line="10" selection-start-column="30" selection-end-line="10" selection-end-column="30" />
<state relative-caret-position="274">
<caret line="88" lean-forward="true" selection-start-line="88" selection-end-line="88" />
</state>
</provider>
</entry>
......
var client = require('cheerio-httpcli');
//월요일 웹툰
var mon='mon'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${mon}?timeStamp=1515819276574`;
var today = String(new Date).split(" ")[0].toLowerCase();
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${today}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + mon);
});
});
//화요일 웹툰
var tue='tue'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${tue}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + tue);
});
});
//수요일 웹툰
var wed='wed'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${wed}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + wed);
});
});
//목요일 웹툰
var thu='thu'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${thu}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + thu);
});
});
//금요일웹툰
var fri='fri';
var daum1 = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${fri}?timeStamp=1515819276574`;
client.fetch(daum1, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list1 = data["data"];
list1.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + fri);
});
});
//토요일 웹툰
var sat='sat'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${sat}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + sat);
});
});
//일요일 웹툰
var sun='sun'
var daum = `http://webtoon.daum.net/data/pc/webtoon/list_serialized/${sun}?timeStamp=1515819276574`;
client.fetch(daum, {}, function (err, $, res, body) {
var data = JSON.parse(body);
var list = data["data"];
list.forEach(function(item, idx){
//다음 오늘의 웹툰 아이디, 제목, 날짜
console.log(item.id + ' ' + item.title + ' ' + item.weekday);
//다음 웹툰 아이디, 제목, 요일
console.log(item.id + ' ' + item.title + ' ' + sun);
});
});
\ No newline at end of file
......