ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๋ฐ˜์‘ํ˜•

โœ… mac m1 ๋งฅ๋ถ python selenium, chromedriver ์„ค์น˜ ๋ฐ ์‹คํ–‰ํ•˜๊ธฐ

python 3.11.x ๋ฒ„์ „
1. selenium ์„ค์น˜
2. webdriver_manager ์„ค์น˜
3. brew install --cask chromedriver ์„ค์น˜

1. Selenium ์„ค์น˜

- ์›น์„ ์ œ์–ดํ•˜๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์ธ selenium์„ pip ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•ด์„œ ์„ค์น˜ํ•ด์ค€๋‹ค.

pip install selenium

2. webdriver_manager ์„ค์น˜

- ์›น๋“œ๋ผ์ด๋ฒ„์— ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ์„ค์น˜

pip install webdriver_manager

3. chromdriver ์„ค์น˜

- ํฌ๋กฌ๋“œ๋ผ์ด๋ฒ„๋Š” brew๋ฅผ ํ†ตํ•ด์„œ ์„ค์น˜

brew install --cask chromedriver

4. python ์ฝ”๋“œ๋กœ ํ™•์ธ

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import time

driver = webdriver.Chrome(service= Service(ChromeDriverManager().install()))

URL = "https://www.google.com"
driver.get(url=URL)
time.sleep(5)
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2024/12   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ
๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ (80)
๐Ÿ“บ Develop (0)
๐ŸŒ‹ Error Fixed (5)
๐Ÿ— Tool (5)
๐Ÿ’ป MacBook M1 (15)
๐Ÿ“ฆ ETC (1)

์ด ํฌ์ŠคํŒ…์€ ์ฟ ํŒก ํŒŒํŠธ๋„ˆ์Šค ํ™œ๋™์˜ ์ผํ™˜์œผ๋กœ, ์ด์— ๋”ฐ๋ฅธ ์ผ์ •์•ก์˜ ์ˆ˜์ˆ˜๋ฃŒ๋ฅผ ์ œ๊ณต๋ฐ›์Šต๋‹ˆ๋‹ค.