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:14:50 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8e24fd3badd63b09154966550fff7611d3d841c5
8e24fd3b
1 parent
1e3b6024
연재완료 연도별 다음 웹툰
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
routes/index.js
routes/index.js
View file @
8e24fd3
...
...
@@ -275,12 +275,49 @@ function getAllToons() {
allWebtoons
=
allWebtoonList
;
};
allWebtoons2
=
new
Array
();
function
getAllToons2
()
{
allWebtoonList2
=
new
Array
();
//연재 완료 연도별 다음 웹툰
var
daum
=
'http://webtoon.daum.net/data/pc/webtoon/list_finished/?genre_id=&timeStamp=1575275921086'
;
var
site
=
'daum'
;
client
.
fetch
(
daum
,
{},
function
(
err
,
$
,
res
,
body
)
{
var
data
=
JSON
.
parse
(
body
);
var
list
=
data
[
"data"
];
list
.
forEach
(
function
(
item
,
idx
)
{
var
webtoon_link
=
'http://webtoon.daum.net/webtoon/view/'
+
item
.
nickname
.
toString
();
var
yyyy
=
(
item
.
finishDate
).
substring
(
0
,
4
)
var
webtoon
=
{
name
:
item
.
title
,
thum_link
:
item
.
pcThumbnailImage
.
url
,
webtoon_link
:
webtoon_link
,
year
:
yyyy
}
allWebtoonList2
.
push
(
webtoon
);
});
});
allWebtoons2
=
allWebtoonList2
;
}
getAllToons
();
//처음 한번 수행
setInterval
(
getAllToons
,
5
*
60
*
1000
);
//5분에 한번 수행
getAllToons2
();
setInterval
(
getAllToons2
,
5
*
60
*
1000
);
/* GET home page. */
//진아 : list :allWebtoons2 해도 되는지??!!
router
.
get
(
'/'
,
function
(
req
,
res
,
next
){
if
(
req
.
isAuthenticated
()){
...
...
@@ -291,6 +328,7 @@ router.get('/',
res
.
render
(
'index'
,{
title
:
"니툰내툰"
,
list
:
allWebtoons
list
:
allWebtoons2
});
}
});
...
...
Please
register
or
login
to post a comment