Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import dart_fss as dart
- from selenium import webdriver
- from bs4 import BeautifulSoup
- # 셀레늄만을 사용한 스크래핑
- driver = webdriver.Chrome('chromedriver.exe')
- url = "http://ticket.interpark.com/search/ticket.asp?search=%uC544%uC774%uC720"
- driver.get(url)
- ui = driver.find_element_by_css_selector("#playend_list > tr:nth-child(1) > td.info_Play > div > dl > dt > h4 > a")
- print(ui.text)
- # BeautifulSoup을 조합한 스크래핑
- html = driver.page_source
- soup = BeautifulSoup(html, 'html5lib')
- result = soup.select("#playend_list > tr:nth-child(1) > td.info_Play > div > dl > dt > h4 > a")
- for r in result:
- print(r.text)
Advertisement
Add Comment
Please, Sign In to add comment