Skip to content

Commit fe0b9fa

Browse files
committed
DBfi : TELEGRAM_URL 생성 로직 수정 및 디버깅을 위한 출력 추가
1 parent b2734ef commit fe0b9fa

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/DBfi_19.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async def fetch_detailed_url(articles):
9090
detail_data = await response.json()
9191
# 'url' 값을 가져와 TELEGRAM_URL 생성
9292
encoded_url = detail_data['data'].get("url", "")
93-
telegram_url = f"https://m.db-fi.com/mod/streamDocs.do?docId={encoded_url}"
93+
telegram_url = f"https://whub.dbsec.co.kr/pv/gate?q={encoded_url}"
9494
article["TELEGRAM_URL"] = telegram_url
9595
except json.JSONDecodeError:
9696
print(f"Failed to parse JSON for {key_url}")
@@ -103,10 +103,12 @@ async def fetch_detailed_url(articles):
103103

104104
async def main():
105105
articles = await DBfi_checkNewArticle()
106+
# print(articles)
106107
detailed_articles = await fetch_detailed_url(articles)
107-
db = SQLiteManager()
108-
inserted_count = db.insert_json_data_list(detailed_articles, 'data_main_daily_send') # 모든 데이터를 한 번에 삽입
109-
print(inserted_count)
108+
print(detailed_articles)
109+
# db = SQLiteManager()
110+
# inserted_count = db.insert_json_data_list(detailed_articles, 'data_main_daily_send') # 모든 데이터를 한 번에 삽입
111+
# print(inserted_count)
110112

111113

112114
if __name__ == "__main__":

0 commit comments

Comments
 (0)