๋ฐ์ํ
# 1๋ฒ. ์ ์ฒด ๊ธธ์ด ํ์
def find_length():
print('์ ์ฒด ๊ธธ์ด ํ์
')
total = driver.find_elements_by_id('contents').find_all('ytd-video-renderer','style-scope ytd-item-section-renderer')
print(len(total))
ํฌ๋กค๋ง์ ์๋ํ๋๋ฐ ์์ด์,
global driver
driver = webdriver.Chrome()
ํฌ๋กฌ ๋๋ผ์ด๋ฒ ๊ฐ์ ๊ฒฝ์ฐ, ๊ฐ์ ๋ฐํํ๋ ํํ๊ฐ list ํํ์ด๋ฏ๋ก, beautifulsoup์ผ๋ก ์งํํด์ผํ๋ค.
๋ฐ์ํ
'๐๏ธ์ํํธ์จ์ด > ๐ปpython' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Only the following pseudo-classes are implemented: nth-of-type. ์๋ฌ(error) (0) | 2021.11.25 |
---|---|
์ ํ๋ธ ์ฌ์ดํธ ํฌ๋กค๋ง(๋งํฌ, href) (0) | 2021.11.25 |
[Python] TypeError: 'NoneType' object is not iterable ์ค๋ฅ ํด๊ฒฐ ๋ฐฉ๋ฒ (0) | 2021.11.25 |
[python] ํ์ด์ pd.concat (0) | 2021.11.25 |
[python] ํฌ๋กค๋ง implicit wait vs time.sleep (0) | 2021.11.25 |