Skip to content

Commit

Permalink
Fix : StockMarket
Browse files Browse the repository at this point in the history
  • Loading branch information
xxoznge committed Nov 17, 2023
1 parent da8e6a7 commit 2b39eb8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,18 @@ def predictMarket():
detail_response = requests.get(news_url, headers=headers) # headers 추가
detail_soup = BeautifulSoup(detail_response.text, 'html.parser')
date_element = detail_soup.select_one("span.media_end_head_info_datestamp_time")
date = date_element.attrs["data-date-time"].split()[0]


if date_element:
date = date_element.attrs["data-date-time"].split()[0]
news_data.append({
'title': title,
'date': date
})
else:
# date_element가 None인 경우 처리
# 이 뉴스 기사를 건너뛰거나 다르게 처리할 수 있습니다
pass

news_data.append({
'title': title,
'date': date
Expand Down
Binary file modified best_model.h5
Binary file not shown.

0 comments on commit 2b39eb8

Please sign in to comment.