Skip to content

Commit 0f13c68

Browse files
committed
NAVER_Report_parseURL: 수정된 링크 형식으로 "원문 보기" 버튼의 href 값을 가져오도록 변경
1 parent 84addad commit 0f13c68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

naver-research.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ def NAVER_Report_parseURL(LIST_ARTICLE_URL):
135135

136136
# "원문 보기" 버튼이 포함된 <a> 태그 찾기
137137
a_tag = soup.find("a", class_="ResearchHeaderTools_button_text__5E_Qj")
138-
138+
print("원문 보기 버튼:", a_tag)
139139
# href 값 가져오기
140140
if a_tag and "href" in a_tag.attrs:
141-
strUrl = a_tag["href"]
141+
strUrl = f"https://m.stock.naver.com{a_tag['href']}"
142142
print("찾은 링크:", strUrl)
143143
else:
144144
print("해당 태그를 찾을 수 없습니다.")

0 commit comments

Comments
 (0)