신일섭

크롤링 업데이트

...@@ -56,7 +56,6 @@ async function gmarket_c(user_id, g_id, g_pw){ ...@@ -56,7 +56,6 @@ async function gmarket_c(user_id, g_id, g_pw){
56 56
57 //logging the result 57 //logging the result
58 for(let index = 0; index < data.length; index++){ 58 for(let index = 0; index < data.length; index++){
59 -
60 await replying(data[index].prd_img, data[index].prd_name, data[index].prd_price, data[index].prd_link); 59 await replying(data[index].prd_img, data[index].prd_name, data[index].prd_price, data[index].prd_link);
61 console.log(data[index]); 60 console.log(data[index]);
62 } 61 }
...@@ -139,51 +138,6 @@ async function replying(img_link, msg1, msg2, msg3){ //push function ...@@ -139,51 +138,6 @@ async function replying(img_link, msg1, msg2, msg3){ //push function
139 }); 138 });
140 } 139 }
141 140
142 -function replying2(replyToken, sp_message){ // sp_message is message(string) that depends on the situation that user selects
143 - request.post(
144 - {
145 - url: TARGET_URL,
146 - headers: {
147 - 'Authorization': `Bearer ${TOKEN}`
148 - },
149 - json: {
150 - "replyToken":replyToken,
151 - "messages":[
152 - {
153 - "type":"text",
154 - "text":sp_message // replying message
155 - }
156 - ]
157 - }
158 - },(error, response, body) => {
159 - //console.log(body)
160 - });
161 -}
162 -
163 -/*function replying_img(replyToken, img_link){
164 - request.post(
165 - {
166 - url: TARGET_URL,
167 - headers: {
168 - 'Authorization': `Bearer ${TOKEN}`
169 - },
170 - json: {
171 - "replyToken":replyToken,
172 - "messages":[
173 - {
174 - "type":"image",
175 - "originalContentUrl": img_link,
176 - "previewImageUrl": img_link
177 - }
178 - ]
179 - }
180 - },(error, response, body) => {
181 - console.log(body)
182 - });
183 -}*/
184 -
185 module.exports.gmarket_c = gmarket_c; 141 module.exports.gmarket_c = gmarket_c;
186 module.exports.getOne = getOne; 142 module.exports.getOne = getOne;
187 -module.exports.getAll = getAll;
188 -module.exports.replying = replying;
189 -//module.exports.replying_img = replying_img;
...\ No newline at end of file ...\ No newline at end of file
143 +module.exports.getAll = getAll;
...\ No newline at end of file ...\ No newline at end of file
......