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
  # ๋ณธ๋ฌธ ์ถ”์ถœ