diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ce104a..91214c9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,6 +43,12 @@ jobs: echo "KIS_APP_KEY=${{ secrets.KIS_APP_KEY}}" >> .env echo "KIS_SECRECT_KEY=${{ secrets.KIS_SECRECT_KEY }}" >> .env echo "PORT=${{ secrets.PORT }}" >> .env + echo "INSTA_UID_KEY=${{ secrets.INSTA_UID_KEY }}" >> .env + echo "INSTA_KEY=${{ secrets.INSTA_KEY }}" >> .env + echo "NAVER_ID=${{ secrets.NAVER_ID }}" >> .env + echo "NAVER_SECRET=${{ secrets.NAVER_SECRET }}" >> .env + echo "YOUTUBE_KEY=${{ secrets.YOUTUBE_KEY }}" >> .env + echo "INSTA_IP=${{ secrets.INSTA_IP }}" >> .env # Build step removed since there is no build script diff --git a/src/routes/instagram-news.js b/src/routes/instagram-news.js index 81ff3a4..83a9dcb 100644 --- a/src/routes/instagram-news.js +++ b/src/routes/instagram-news.js @@ -19,7 +19,6 @@ const fetchData = async (url) => { thumbnail_url: null, url: `https://www.instagram.com/p/${post.postCode}`, })); - console.log(formattedData); return formattedData; } catch (error) { console.error(error); @@ -49,7 +48,6 @@ router.get("/", async (req, res) => { cache = await cacheController.getCache(keyword, social, 0); } posts = JSON.parse(cache.dataValues.data); - console.log("fff", posts); res.json(posts); } catch (err) { console.error("Error fetching Instagram posts:", err); diff --git a/src/scripts/get_similar_words.py b/src/scripts/get_similar_words.py index 300c534..1ab4021 100644 --- a/src/scripts/get_similar_words.py +++ b/src/scripts/get_similar_words.py @@ -42,11 +42,12 @@ model = Word2Vec.load('src/scripts/word2vec_model.model') results = [] - + shinhan = ['신한', '신한투자증권', 'SOL', '신한투자'] for index, row in df.iterrows(): # 각 행에 대해 반복 name = row['name'] code = row['code'] + try: similarity = model.wv.similarity(word, name) results.append({"name": name, "code": code, "similarity": similarity}) @@ -54,6 +55,11 @@ results.append({"name": name, "code": code, "similarity": 0}) + if word in shinhan: + for result in results: + if result["name"] == "신한지주": + result["similarity"] = 1 + results = sorted(results, key=lambda x: x['similarity'], reverse=True) for result in results: result['similarity'] = str(result['similarity'])