Skip to content

Commit

Permalink
Update a1.py
Browse files Browse the repository at this point in the history
Signed-off-by: Choonho Son <[email protected]>
  • Loading branch information
Choonho Son committed Nov 1, 2023
1 parent 6e04abc commit 71ba680
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/goldminer/automations/a1.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@
from goldminer.tasks.naver import search_news

today = datetime.now(timezone('Asia/Seoul')).strftime("%Y-%m-%d %H")
search_key = "국내증시"

result = search_news("국내증시", 5)
result = search_news(search_key, 5)
content = ""
for item in result:
content = content + "<h2>" + item['title'] + "</h2>" + "<br>" + item['description'] + "<br>" + \
"원문: <a href=\"" + item['link'] + "\" target=\"_blank\">" + item['link'] + "</a>" + "<br><br>"

title = f"{search_key} {today}시 주요 뉴스"
from goldminer.tasks.tistory import write_tistory_post
write_tistory_post("국내증시 " + today, content)
write_tistory_post(title, content)

#from goldminer.tasks.blogger import create_blogger_post
#create_blogger_post("국내 증시 " + today, content)
#create_blogger_post(title, content)

0 comments on commit 71ba680

Please sign in to comment.