From 354fb3dd5f1b074501197c62fb3ecccdce9e6041 Mon Sep 17 00:00:00 2001 From: YunseoChoe Date: Fri, 22 Mar 2024 09:51:06 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=EC=9B=B9=ED=88=B0=20DB=20=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=EC=A7=84=ED=96=89=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controller/chatGpt.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/controller/chatGpt.js b/controller/chatGpt.js index e6fb4cf..e0c0ec0 100644 --- a/controller/chatGpt.js +++ b/controller/chatGpt.js @@ -1,7 +1,10 @@ require('dotenv').config(); const fs = require('fs').promises; +// const { Models } = require('openai/resources'); const crawlControl = require("../crawling_kakao"); -const apiKey = process.env.OPENAI_API_KEY; +const apiKey = process.env.OPENAI_API_KEY; +// const models = require('../models'); +const feedbackModel = require('../models/feedback'); const chatGpiApi = async (req, res) => { @@ -43,7 +46,7 @@ const chatGpiApi = async (req, res) => { // 결과에서 comments 필드를 추출하여 message에 할당 const query_comments = crawlResult.comments.map((comment, index) => `comment ${index + 1}: ${comment}`).join('\n'); - console.log(query_comments); + // console.log(query_comments); const message = prompt + query_comments; // 죄종 버전은 원샷 추가하기 @@ -68,7 +71,6 @@ const chatGpiApi = async (req, res) => { }); const responseData = await response.json(); // 응답 데이터 가져오기 - console.log(responseData) const contentOnly = responseData.choices[0].message.content; const gptFeedback = { title: crawlResult.title, @@ -76,7 +78,21 @@ const chatGpiApi = async (req, res) => { subtitle: crawlResult.subtitle, feedback: contentOnly }; - res.json(gptFeedback); // 클라이언트에 응답 반환 + + // 데이터베이스에 저장 + + feedbackModel.create({ + number: crawlResult.number, // 회차 + link: url, // 링크 + feedback: contentOnly, // 필터링된 댓글 + subtitle: crawlResult.subtitle + }); + + + console.log("확인"); + + // 클라이언트에 응답 반환 + res.json(gptFeedback); } catch (error) { console.error('Error:', error); From 3bcfc48380e6b916c84c6d63284a14433736c916 Mon Sep 17 00:00:00 2001 From: YunseoChoe Date: Fri, 22 Mar 2024 10:59:09 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=EC=9B=B9=ED=88=B0=20=EC=A0=95=EB=B3=B4=20D?= =?UTF-8?q?B=EC=97=90=20=EC=A0=80=EC=9E=A5=20=EA=B8=B0=EB=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.json | 23 +++++++++++ controller/chatGpt.js | 30 +++++++++----- models/feedback.js | 2 + models/webtoon.js | 2 + package-lock.json | 96 +++++++++++++++++++++++++++++++++++++------ package.json | 4 +- results.json | 44 ++++++++++---------- server.js | 2 +- 8 files changed, 156 insertions(+), 47 deletions(-) create mode 100644 config/config.json diff --git a/config/config.json b/config/config.json new file mode 100644 index 0000000..8681dbb --- /dev/null +++ b/config/config.json @@ -0,0 +1,23 @@ +{ + "development": { + "username": "root", + "password": "37", + "database": "goorm", + "host": "34.64.161.162", + "dialect": "mysql" + }, + "test": { + "username": "root", + "password": null, + "database": "database_test", + "host": "127.0.0.1", + "dialect": "mysql" + }, + "production": { + "username": "root", + "password": null, + "database": "database_production", + "host": "127.0.0.1", + "dialect": "mysql" + } +} diff --git a/controller/chatGpt.js b/controller/chatGpt.js index e0c0ec0..e242b6b 100644 --- a/controller/chatGpt.js +++ b/controller/chatGpt.js @@ -3,8 +3,8 @@ const fs = require('fs').promises; // const { Models } = require('openai/resources'); const crawlControl = require("../crawling_kakao"); const apiKey = process.env.OPENAI_API_KEY; -// const models = require('../models'); -const feedbackModel = require('../models/feedback'); +const models = require('../models'); +// const feedbackModel = require('../models/feedback'); const chatGpiApi = async (req, res) => { @@ -71,25 +71,35 @@ const chatGpiApi = async (req, res) => { }); const responseData = await response.json(); // 응답 데이터 가져오기 + console.log(responseData) const contentOnly = responseData.choices[0].message.content; + const gptFeedback = { title: crawlResult.title, contentNum: crawlResult.number, subtitle: crawlResult.subtitle, feedback: contentOnly }; + + // 웹툰 생성 + const createdWebtoon = await models.webtoon.create({ + webtoon_title: crawlResult.title + }); - // 데이터베이스에 저장 + // 생성된 웹툰의 ID 가져오기 + const webtoonId = createdWebtoon.id; - feedbackModel.create({ - number: crawlResult.number, // 회차 - link: url, // 링크 - feedback: contentOnly, // 필터링된 댓글 - subtitle: crawlResult.subtitle + // 데이터베이스에 저장 + models.feedback.create({ + link: url, // 링크 + feedback: contentOnly, // 필터링된 댓글 + subtitle: crawlResult.subtitle, // 소제목 + webtoon_id: webtoonId // 웹툰 ID 추가 }); - - console.log("확인"); + models.webtoon.create({ + webtoon_title: crawlResult.title + }); // 클라이언트에 응답 반환 res.json(gptFeedback); diff --git a/models/feedback.js b/models/feedback.js index d584e54..34dfdd9 100644 --- a/models/feedback.js +++ b/models/feedback.js @@ -23,6 +23,8 @@ module.exports = (sequelize, DataTypes) => { }, { sequelize, modelName: 'feedback', + tableName: 'feedbacks', + timestamps: false }); return feedback; }; \ No newline at end of file diff --git a/models/webtoon.js b/models/webtoon.js index 22a0814..7731d30 100644 --- a/models/webtoon.js +++ b/models/webtoon.js @@ -19,6 +19,8 @@ module.exports = (sequelize, DataTypes) => { }, { sequelize, modelName: 'webtoon', + tableName: 'webtoons', + timestamps: false }); return webtoon; }; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9eaae68..6939b72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,9 @@ "openai": "^4.29.2", "puppeteer": "^22.6.0", "selenium-webdriver": "^4.18.1", - "sequelize": "^6.37.1", + "sequelize": "^6.37.1" + }, + "devDependencies": { "sequelize-cli": "^6.6.2" } }, @@ -59,6 +61,7 @@ "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, "dependencies": { "string-width": "^5.1.2", "string-width-cjs": "npm:string-width@^4.2.0", @@ -75,6 +78,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, "engines": { "node": ">=12" }, @@ -86,6 +90,7 @@ "version": "6.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, "engines": { "node": ">=12" }, @@ -96,12 +101,14 @@ "node_modules/@isaacs/cliui/node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true }, "node_modules/@isaacs/cliui/node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, "dependencies": { "eastasianwidth": "^0.2.0", "emoji-regex": "^9.2.2", @@ -118,6 +125,7 @@ "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, "dependencies": { "ansi-regex": "^6.0.1" }, @@ -132,6 +140,7 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, "dependencies": { "ansi-styles": "^6.1.0", "string-width": "^5.0.1", @@ -210,12 +219,14 @@ "node_modules/@one-ini/wasm": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", - "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==" + "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", + "dev": true }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, "optional": true, "engines": { "node": ">=14" @@ -462,6 +473,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, "engines": { "node": ">= 4.0.0" } @@ -567,7 +579,8 @@ "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true }, "node_modules/body-parser": { "version": "1.20.2", @@ -758,6 +771,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.4.tgz", "integrity": "sha512-zlnpg0jNcibNrO7GG9IeHH7maWFeCz+Ja1wx/7tZNU5ASSSSZ+/qZciM0/LHCYxSdqv5h2sdbQ/PXYdOuetXvA==", + "dev": true, "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.64", @@ -818,6 +832,7 @@ "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, "engines": { "node": ">=14" } @@ -831,6 +846,7 @@ "version": "1.1.13", "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", + "dev": true, "dependencies": { "ini": "^1.3.4", "proto-list": "~1.2.1" @@ -939,6 +955,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -986,6 +1003,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", "integrity": "sha512-MOqHvMWF9/9MX6nza0KgvFH4HpMU0EF5uUDXqX/BtxtU8NfB0QzRtJ8Oe/6SuS4kbhyzVJwjd97EA4PKrzJ8bw==", + "dev": true, "dependencies": { "es5-ext": "^0.10.64", "type": "^2.7.2" @@ -1169,7 +1187,8 @@ "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==" + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", @@ -1183,6 +1202,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz", "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", + "dev": true, "dependencies": { "@one-ini/wasm": "0.1.1", "commander": "^10.0.0", @@ -1200,6 +1220,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -1208,6 +1229,7 @@ "version": "9.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1294,6 +1316,7 @@ "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", "integrity": "sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==", + "dev": true, "hasInstallScript": true, "dependencies": { "es6-iterator": "^2.0.3", @@ -1309,6 +1332,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", + "dev": true, "dependencies": { "d": "1", "es5-ext": "^0.10.35", @@ -1319,6 +1343,7 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.4.tgz", "integrity": "sha512-U9bFFjX8tFiATgtkJ1zg25+KviIXpgRvRHS8sau3GfhVzThRQrOeksPeT0BWW2MNZs1OEWJ1DPXOQMn0KKRkvg==", + "dev": true, "dependencies": { "d": "^1.0.2", "ext": "^1.7.0" @@ -1331,6 +1356,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, "dependencies": { "d": "1", "es5-ext": "^0.10.46", @@ -1383,6 +1409,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", + "dev": true, "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.62", @@ -1433,6 +1460,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", + "dev": true, "dependencies": { "d": "1", "es5-ext": "~0.10.14" @@ -1491,6 +1519,7 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", + "dev": true, "dependencies": { "type": "^2.7.2" } @@ -1588,6 +1617,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, "dependencies": { "cross-spawn": "^7.0.0", "signal-exit": "^4.0.1" @@ -1603,6 +1633,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, "engines": { "node": ">=14" }, @@ -2088,7 +2119,8 @@ "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "node_modules/ip-address": { "version": "9.0.5", @@ -2124,6 +2156,7 @@ "version": "2.13.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, "dependencies": { "hasown": "^2.0.0" }, @@ -2142,7 +2175,8 @@ "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==" + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true }, "node_modules/is-property": { "version": "1.0.2", @@ -2157,12 +2191,14 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true }, "node_modules/jackspeak": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, @@ -2180,6 +2216,7 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.15.1.tgz", "integrity": "sha512-ESjNzSlt/sWE8sciZH8kBF8BPlwXPwhR6pWKAw8bw4Bwj+iZcnKW6ONWUutJ7eObuBZQpiIb8S7OYspWrKt7rA==", + "dev": true, "dependencies": { "config-chain": "^1.1.13", "editorconfig": "^1.0.4", @@ -2200,6 +2237,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", "integrity": "sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==", + "dev": true, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } @@ -2208,6 +2246,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -2216,6 +2255,7 @@ "version": "10.3.10", "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, "dependencies": { "foreground-child": "^3.1.0", "jackspeak": "^2.3.5", @@ -2237,6 +2277,7 @@ "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2251,6 +2292,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.0.tgz", "integrity": "sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==", + "dev": true, "dependencies": { "abbrev": "^2.0.0" }, @@ -2265,6 +2307,7 @@ "version": "3.0.5", "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", + "dev": true, "engines": { "node": ">=14" } @@ -2432,6 +2475,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", + "dev": true, "dependencies": { "es5-ext": "~0.10.2" } @@ -2480,6 +2524,7 @@ "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "dev": true, "dependencies": { "d": "^1.0.1", "es5-ext": "^0.10.53", @@ -2683,7 +2728,8 @@ "node_modules/next-tick": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==" + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true }, "node_modules/node-addon-api": { "version": "5.1.0", @@ -2952,6 +2998,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "engines": { "node": ">=8" } @@ -2959,12 +3006,14 @@ "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true }, "node_modules/path-scurry": { "version": "1.10.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, "dependencies": { "lru-cache": "^9.1.1 || ^10.0.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" @@ -2980,6 +3029,7 @@ "version": "10.2.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true, "engines": { "node": "14 || >=16.14" } @@ -3015,7 +3065,8 @@ "node_modules/proto-list": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==" + "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", + "dev": true }, "node_modules/proxy-addr": { "version": "2.0.7", @@ -3208,6 +3259,7 @@ "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, "dependencies": { "is-core-module": "^2.13.0", "path-parse": "^1.0.7", @@ -3407,6 +3459,7 @@ "version": "6.6.2", "resolved": "https://registry.npmjs.org/sequelize-cli/-/sequelize-cli-6.6.2.tgz", "integrity": "sha512-V8Oh+XMz2+uquLZltZES6MVAD+yEnmMfwfn+gpXcDiwE3jyQygLt4xoI0zG8gKt6cRcs84hsKnXAKDQjG/JAgg==", + "dev": true, "dependencies": { "cli-color": "^2.0.3", "fs-extra": "^9.1.0", @@ -3428,6 +3481,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -3438,6 +3492,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -3452,6 +3507,7 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -3469,6 +3525,7 @@ "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, "engines": { "node": ">=10" } @@ -3551,6 +3608,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -3562,6 +3620,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "engines": { "node": ">=8" } @@ -3717,6 +3776,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -3742,6 +3802,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -3764,6 +3825,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, "engines": { "node": ">= 0.4" }, @@ -3819,6 +3881,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, "dependencies": { "es5-ext": "~0.10.46", "next-tick": "1" @@ -3858,7 +3921,8 @@ "node_modules/type": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", + "dev": true }, "node_modules/type-is": { "version": "1.6.18", @@ -3876,6 +3940,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/umzug/-/umzug-2.3.0.tgz", "integrity": "sha512-Z274K+e8goZK8QJxmbRPhl89HPO1K+ORFtm6rySPhFKfKc5GHhqdzD0SGhSWHkzoXasqJuItdhorSvY7/Cgflw==", + "dev": true, "dependencies": { "bluebird": "^3.7.2" }, @@ -3981,6 +4046,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -4028,6 +4094,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -4044,6 +4111,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -4058,6 +4126,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -4068,7 +4137,8 @@ "node_modules/wrap-ansi-cjs/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", diff --git a/package.json b/package.json index 6335fd6..f34b490 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ "openai": "^4.29.2", "puppeteer": "^22.6.0", "selenium-webdriver": "^4.18.1", - "sequelize": "^6.37.1", + "sequelize": "^6.37.1" + }, + "devDependencies": { "sequelize-cli": "^6.6.2" } } diff --git a/results.json b/results.json index 74df809..71ec7c5 100644 --- a/results.json +++ b/results.json @@ -1,27 +1,27 @@ { "title": "경이로운 소문", - "number": "184", - "subtitle": "[시즌3] 48화", + "number": "179", + "subtitle": "[시즌3] 43화", "comments": [ - "악령에게까지 '은인' 소리 듣는 소문\n단어 그대로 놀랍고 신기한 존재", - "소문이에게 고맙다고 하는 악귀는 쟤가 처음이자 마지막일거임 ㅋㅋㅋㅋㅋ", - "HH와의 전쟁은 시즌4에서 진행하는 거 찬성?", - "'잘린 팔들고 뛴 건 아니지?`\n\n시즌1 31화(19.04.04)에서 \n그 팔들고 뛰었던 웅민이와\n잘린 팔 붙이면서 추여사께서 부른\n이선희의 '아, 옛날이여'까지......\n\n어느듯 5년이 되어가네요.", - "소문이의 각성투어가 전세계의 카운터들을 살리는 것뿐만 아니라 소문이 자신까지도 살린거네..\n도정우뿐만 아니라 화령커플이 해놓은 짓들도 바로잡는게 나와서 좋다", - "아직 안 끝났네... 아 빨리 다음화...!!! 다음화아!!!!", - "악귀가 카운터에게 고맙다고 하는 모습을 보네 ㅋㅋㅋ", - "우리 하나는 쫌이 아니라 많이 환상적이지", - "경이로운 소문이를 연기하기엔 드라마 주인공들이 너~~~~무 약했음...작가도 허접했고... 이런 대단한 작품에 찬물 끼얹는 드라마였음 ㅠ 장이님 역량이 발휘된 영화가 나왔으면 좋겠네요", - "악귀가 카운터한테 욕을 안하고 은인이라고한건 역사상 처음...ㅋㅎㅋㅎ", - "도정우 드디어 잡혔구나.....!", - "악귀한테 은인소리듣는 소문이 장하다 장해ㅋㅎㅋ\n아마 악귀 성불시키고 은인소리듣는거 소문이밖에 못들을듯", - "진짜 무빙처럼 최고에 드라마로 만나고싶다", - "도하나! 우주에서 온 ♩♪♩~..... ㅋㅋㅋ", - "도정우 몸에 갇혀 있는게 얼마나 공포스러웠으면 융 감옥에 가는게 더 좋다고 할까...그런 엄청난 도정우를 손쉽게 제압해버리는 소문은 또 얼마나 대단한거야 ㅋㅋㅋㅋㅋㅋ 항상 볼때마다 놀라움의 연속이네 ㅋㅋㅋㅋㅋㅋ", - "어? 왜 눈물이 나지...?", - "완전 최고최고 !", - "역시 재미있어요", - "봐도봐도 재밌네", - "우리 모두들 쏘리 질러!!!!!!\n루머 최고!!!!!!!!!" + "진짜 도정우..가족은 건들지마라;;\n양심 뒤진건 아는데 예로부터 가좍이나 친구들을 건드리는 건 각성제라고도 불렸다..\n니 죽을때 조금 더 편히 가려면 적당히 하고 자수해라 호구 자슥아..,", + "적봉이한테 땅 버프 걸면 감지거리 더 늘지 않나?", + "진짜 가족은 건들지 말자^^", + "도정우 이래 건들면 죽여버린다(소문이가)", + "오늘 화를 보니\nHIH가 매우 체계적인 조직으로\n6악인 지부장 위 수뇌도 있을 법함\n 시즌4에서 길게 풀어 주실 듯", + "대륙을 관리하는 6명의 지부장 폼 미쳤다...! \n시즌 넘어간다고 뇌절로 안가고 세계관 확장 \n너무 스무스하네요", + "도정우가 이래 잡으러 움직일텐데, 작품 특성상 비극적인 결말일리는 없지만 뻔한 클리셰도 항상 예측 불가능하게 전개하셔서 이번에도 전혀 예상이 안 되네", + "도정우가 어떻게 이 작면들을 본거죠? 누구 기억을 본거에요? 건물 위에 있어서 못봤었는데", + "정우얀;;이래 건들면 너는 그때 소문이한테 죽는거야..상황파확안 되니..?", + "아 참말로다가 저거 도정우 진짜 쓰레기 저거 지옥가도 모자를 녀석이 이제 이래까지 건드냐 진짜 너 그러면 안돼", + "자가님 \n몇편까지 \n시원하게 백편가시죠\n충전도 만땅했는데", + "가 족같네....", + "나만 썸네일에 있는 눈 회장님이라고 생각함..?\n회장님 각성하는 줄 알았는데…ㅜㅜ", + "정우야 이래 건들면 죽여버린다", + "도정우 이♪♪♬, 이래 죽이러 가나보다. 애들이 빨리 알아차려야돼. 늦으면 안돼~", + "도정우 가족 건들면 소문이가 잡으러 간다", + "가족 건들지 마라", + "와 도정우시키 끝까지... 소문이가 얼마나 더 강해져서 어떤식으로 융으로 보내버릴지 기대된다", + "사람이 각성하는 상황 top 5\n1.가족 건들때\n2.연인 건들때\n3.동생이나 형,언니 등 이 라면 한입만이라 할때\n4.화장실에서 볼일볼때\n5.롤 승급전 할때", + "저런 학폭의 가해자는 절대로 바뀌지 않는다. 판사나부랭이들아 “반성의 여지가 있고, 초범인 점을 감안해…” 이딴 판결은 장발장에게 하고, 도정우나 은진이년 같은 경우는 병으로 간주하여 영구히 격리병동 수준의 감옥으로 보내는 것이 마땅하다." ] } \ No newline at end of file diff --git a/server.js b/server.js index 84233e4..ccda9b7 100644 --- a/server.js +++ b/server.js @@ -52,7 +52,7 @@ function verifyToken(req, res, next) { app.post('/crawl', crawlController.crawlApi); // Chat GPT API -app.post('/chat', chatController.chatGpiApi); +app.post('/chat', verifyToken, chatController.chatGpiApi); // hi API app.get('/hi', verifyToken, userController.hiApi);