Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이하영
/
YTMT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
이진아
2019-12-03 00:49:05 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e5d9a421f3af842df1efdabd984245668ddb1732
e5d9a421
1 parent
10646df0
네이버연재웹툰 2015년까지
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
2 deletions
routes/index.js
routes/index.js
View file @
e5d9a42
...
...
@@ -320,9 +320,9 @@ function getAllToons3(){
if
(
res
.
status
===
200
)
{
let
naver2019
=
[];
const
$
=
cheerio
.
load
(
res
.
data
);
const
$
movie
List
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
const
$
toon
List
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
var
tn
=
2019
;
$
movie
List
.
each
(
function
(
i
)
{
$
toon
List
.
each
(
function
(
i
)
{
naver2019
[
i
]
=
{
title
:
$
(
this
).
find
(
'dl > dt > a'
).
text
(),
img
:
$
(
this
).
find
(
'div > a > img'
).
attr
(
'src'
),
...
...
@@ -337,6 +337,102 @@ function getAllToons3(){
}
},
(
error
)
=>
console
.
log
(
error
));
//2018년 연재 네이버 웹툰
const
naver2018
=
'https://comic.naver.com/webtoon/period.nhn?period=2018'
;
axios
.
get
(
naver2018
).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
let
naver2018
=
[];
const
$
=
cheerio
.
load
(
res
.
data
);
const
$toonList
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
var
tn
=
2018
;
$toonList
.
each
(
function
(
i
)
{
naver2018
[
i
]
=
{
title
:
$
(
this
).
find
(
'dl > dt > a'
).
text
(),
img
:
$
(
this
).
find
(
'div > a > img'
).
attr
(
'src'
),
index
:
$
(
this
).
find
(
'li > div > a'
).
attr
(
'href'
),
year
:
tn
};
});
const
data
=
naver2018
.
filter
(
m
=>
m
.
title
);
allWebtoonList3
.
push
(
data
);
//console.log(allWebtoonList3)
}
},
(
error
)
=>
console
.
log
(
error
));
//2017년 연재 네이버 웹툰
const
naver2017
=
'https://comic.naver.com/webtoon/period.nhn?period=2017'
;
axios
.
get
(
naver2017
).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
let
naver2017
=
[];
const
$
=
cheerio
.
load
(
res
.
data
);
const
$toonList
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
var
tn
=
2017
;
$toonList
.
each
(
function
(
i
)
{
naver2017
[
i
]
=
{
title
:
$
(
this
).
find
(
'dl > dt > a'
).
text
(),
img
:
$
(
this
).
find
(
'div > a > img'
).
attr
(
'src'
),
index
:
$
(
this
).
find
(
'li > div > a'
).
attr
(
'href'
),
year
:
tn
};
});
const
data
=
naver2017
.
filter
(
m
=>
m
.
title
);
allWebtoonList3
.
push
(
data
);
//console.log(allWebtoonList3)
}
},
(
error
)
=>
console
.
log
(
error
));
//2016년 연재 네이버 웹툰
const
naver2016
=
'https://comic.naver.com/webtoon/period.nhn?period=2016'
;
axios
.
get
(
naver2016
).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
let
naver2016
=
[];
const
$
=
cheerio
.
load
(
res
.
data
);
const
$toonList
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
var
tn
=
2016
;
$toonList
.
each
(
function
(
i
)
{
naver2016
[
i
]
=
{
title
:
$
(
this
).
find
(
'dl > dt > a'
).
text
(),
img
:
$
(
this
).
find
(
'div > a > img'
).
attr
(
'src'
),
index
:
$
(
this
).
find
(
'li > div > a'
).
attr
(
'href'
),
year
:
tn
};
});
const
data
=
naver2016
.
filter
(
m
=>
m
.
title
);
allWebtoonList3
.
push
(
data
);
//console.log(allWebtoonList3)
}
},
(
error
)
=>
console
.
log
(
error
));
//2015년 연재 네이버 웹툰
const
naver2015
=
'https://comic.naver.com/webtoon/period.nhn?period=2015'
;
axios
.
get
(
naver2015
).
then
(
res
=>
{
if
(
res
.
status
===
200
)
{
let
naver2015
=
[];
const
$
=
cheerio
.
load
(
res
.
data
);
const
$toonList
=
$
(
'#content > div.list_area.daily_img > ul > li'
);
var
tn
=
2015
;
$toonList
.
each
(
function
(
i
)
{
naver2015
[
i
]
=
{
title
:
$
(
this
).
find
(
'dl > dt > a'
).
text
(),
img
:
$
(
this
).
find
(
'div > a > img'
).
attr
(
'src'
),
index
:
$
(
this
).
find
(
'li > div > a'
).
attr
(
'href'
),
year
:
tn
};
});
const
data
=
naver2015
.
filter
(
m
=>
m
.
title
);
allWebtoonList3
.
push
(
data
);
//console.log(allWebtoonList3)
}
},
(
error
)
=>
console
.
log
(
error
));
allWebtoons3
=
allWebtoonList3
;
}
...
...
Please
register
or
login
to post a comment