나혜원

update youtube.js

1 -var response = 'IU'; 1 +var response = "IU";
2 +var keyword =response + " mv";
3 +console.log(keyword);
2 4
3 var request = require('request'); 5 var request = require('request');
4 var cheerio = require('cheerio'); 6 var cheerio = require('cheerio');
...@@ -10,7 +12,7 @@ var options = { method: 'GET', ...@@ -10,7 +12,7 @@ var options = { method: 'GET',
10 part: 'id', 12 part: 'id',
11 maxResults: '1', 13 maxResults: '1',
12 order: 'viewCount', 14 order: 'viewCount',
13 - q: response, 15 + q: keyword,
14 type: 'video' }, 16 type: 'video' },
15 }; 17 };
16 18
......