📦 Initialize Geulbeot structure and merge Prompts & test projects

This commit is contained in:
2026-03-05 11:32:29 +09:00
commit 555a954458
687 changed files with 205247 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
def fetch_article_content(article_url, source):
try:
response = requests.get(article_url, verify=False, timeout=10) # SSL 인증서 검증 비활성화 및 타임아웃 설정
response.encoding = 'utf-8' # 인코딩 설정
response.raise_for_status()
soup = BeautifulSoup(response.text, 'html.parser')
paragraphs = soup.find_all('p')
content = ' '.join([clean_text(p.get_text()) for p in paragraphs])
# 텍스트 내의 엔터키를 스페이스로 대체
content = content.replace('\n', ' ')