이혜인

selecting movie and megabox location

...@@ -18,13 +18,19 @@ driver.implicitly_wait(3) ...@@ -18,13 +18,19 @@ driver.implicitly_wait(3)
18 driver.get(url) 18 driver.get(url)
19 iframes = driver.find_elements_by_css_selector('iframe') 19 iframes = driver.find_elements_by_css_selector('iframe')
20 20
21 -for iframe in iframes: 21 +driver.switch_to.frame('frameBokdMBooking')
22 - print(iframe) 22 +driver.find_element_by_id('btn')
23 - 23 +r = driver.page_source
24 - 24 +soup = BeautifulSoup(r, "html.parser")
25 - 25 +
26 - 26 +attr = soup.select("#mCSB_4_container>ul>li>button")
27 - 27 +for brch in attr:
28 + print(brch['brch-nm'], brch['brch-no'])
29 +
30 +attr1 = soup.select("#mCSB_1_container>ul>li>button")
31 +for movie in attr1:
32 + print(movie['movie-nm'], movie['movie-no'])
33 +
28 # for i in btn: 34 # for i in btn:
29 # print(i['brch-nm']) 35 # print(i['brch-nm'])
30 #driver.find_element_by_css_selector('div').send_keys(Keys.ENTER) 36 #driver.find_element_by_css_selector('div').send_keys(Keys.ENTER)
......