duwing commited on
Commit
5bb7d28
·
verified ·
1 Parent(s): fec291e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -63,8 +63,12 @@ def movie_evaluation_predict(sentence):
63
  st.write("(긍정 확률 : %.2f) 긍정적인 영화 평가입니다." % predict_value)
64
 
65
  def scrape_content(url):
 
 
 
 
66
  # 웹 페이지 요청
67
- response = requests.get(url)
68
  soup = BeautifulSoup(response.content, 'html.parser')
69
 
70
  # 본문 추출
 
63
  st.write("(긍정 확률 : %.2f) 긍정적인 영화 평가입니다." % predict_value)
64
 
65
  def scrape_content(url):
66
+
67
+ headers = {
68
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
69
+ }
70
  # 웹 페이지 요청
71
+ response = requests.get(url, headers=headers)
72
  soup = BeautifulSoup(response.content, 'html.parser')
73
 
74
  # 본문 추출