신일섭

크롤링 업데이트

......@@ -56,7 +56,6 @@ async function gmarket_c(user_id, g_id, g_pw){
//logging the result
for(let index = 0; index < data.length; index++){
await replying(data[index].prd_img, data[index].prd_name, data[index].prd_price, data[index].prd_link);
console.log(data[index]);
}
......@@ -139,51 +138,6 @@ async function replying(img_link, msg1, msg2, msg3){ //push function
});
}
function replying2(replyToken, sp_message){ // sp_message is message(string) that depends on the situation that user selects
request.post(
{
url: TARGET_URL,
headers: {
'Authorization': `Bearer ${TOKEN}`
},
json: {
"replyToken":replyToken,
"messages":[
{
"type":"text",
"text":sp_message // replying message
}
]
}
},(error, response, body) => {
//console.log(body)
});
}
/*function replying_img(replyToken, img_link){
request.post(
{
url: TARGET_URL,
headers: {
'Authorization': `Bearer ${TOKEN}`
},
json: {
"replyToken":replyToken,
"messages":[
{
"type":"image",
"originalContentUrl": img_link,
"previewImageUrl": img_link
}
]
}
},(error, response, body) => {
console.log(body)
});
}*/
module.exports.gmarket_c = gmarket_c;
module.exports.getOne = getOne;
module.exports.getAll = getAll;
\ No newline at end of file
module.exports.replying = replying;
//module.exports.replying_img = replying_img;
\ No newline at end of file
......