Skip to content

Commit 3d651c8

Browse files
committed
[bug] 추천 제품 로직 배포 서버 chrome로딩 에러 수정
1 parent 17d03e1 commit 3d651c8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

moodico/products/utils/scraper.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ def _build_chrome_driver():
2121

2222
# Linux (Ubuntu) 배포 서버
2323
if sys.platform.startswith("linux"):
24-
# Prefer system chromium/chromedriver if they exist
25-
chromium_bin = shutil.which("chromium-browser") or shutil.which("chromium")
26-
chromedriver_sys = shutil.which("chromedriver")
27-
if chromium_bin and chromedriver_sys:
28-
options.binary_location = chromium_bin
29-
return webdriver.Chrome(service=Service(chromedriver_sys), options=options)
24+
options.binary_location = "/usr/bin/chromium-browser"
25+
service = Service("/usr/bin/chromedriver")
26+
27+
return webdriver.Chrome(service=service, options=options)
3028

3129
# macOS/Windows or fallback -> use webdriver_manager
3230
return webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)

0 commit comments

Comments
 (0)