이진아

네이버연재웹툰 2015년까지

......@@ -320,9 +320,9 @@ function getAllToons3(){
if (res.status === 200) {
let naver2019 = [];
const $ = cheerio.load(res.data);
const $movieList = $('#content > div.list_area.daily_img > ul > li');
const $toonList = $('#content > div.list_area.daily_img > ul > li');
var tn = 2019;
$movieList.each(function (i) {
$toonList.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;
}
......