Kims12 commited on
Commit
61b595f
ยท
verified ยท
1 Parent(s): fc8a307

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -147,7 +147,12 @@ def extract_data_to_excel_and_html(page, board_select, custom_url=""):
147
  session = setup_session()
148
  # ์ง์ ‘ ์ž…๋ ฅ ์„ ํƒ ์‹œ custom_url ์‚ฌ์šฉ
149
  if board_select == "์ง์ ‘์ž…๋ ฅ" and custom_url.strip():
150
- base_url = custom_url.strip()
 
 
 
 
 
151
  filename = f'custom_{datetime.now(pytz.timezone("Asia/Seoul")).strftime("%Y%m%d_%H%M%S")}.xlsx'
152
  else:
153
  base_url = get_base_url(board_select)
 
147
  session = setup_session()
148
  # ์ง์ ‘ ์ž…๋ ฅ ์„ ํƒ ์‹œ custom_url ์‚ฌ์šฉ
149
  if board_select == "์ง์ ‘์ž…๋ ฅ" and custom_url.strip():
150
+ # ์ž…๋ ฅ๋œ URL์„ ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
151
+ url_input = custom_url.strip()
152
+ # ๋งŒ์•ฝ ์˜ˆ์ „ URL์ด ์ž…๋ ฅ๋˜์—ˆ๋‹ค๋ฉด ํ˜„์žฌ ์ ์šฉ URL๋กœ ๋ณ€๊ฒฝ
153
+ if url_input.startswith("https://cafe.naver.com/f-e/cafes/25729954/menus/186"):
154
+ url_input = "https://cafe.naver.com/ArticleList.nhn?search.clubid=25729954&search.menuid=751&search.boardtype=L&userDisplay=50&search.specialmenutype=&search.totalCount=501&search.cafeId=25729954"
155
+ base_url = url_input
156
  filename = f'custom_{datetime.now(pytz.timezone("Asia/Seoul")).strftime("%Y%m%d_%H%M%S")}.xlsx'
157
  else:
158
  base_url = get_base_url(board_select)