megaboxCrawling.py 1.06 KB
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.common.keys import Keys

# driver = webdriver.Chrome()


options = webdriver.ChromeOptions()
options.add_experimental_option("excludeSwitches", ["enable-logging"])
driver = webdriver.Chrome(options = options)
# driver = webdriver.Chrome(ChromeDriverManager().install(),options=options)
url = "https://megabox.co.kr/booking"
driver.maximize_window()

driver.implicitly_wait(3)
driver.get(url)
iframes = driver.find_elements_by_css_selector('iframe')

for iframe in iframes:
    print(iframe)





# for i in btn:
#     print(i['brch-nm'])
#driver.find_element_by_css_selector('div').send_keys(Keys.ENTER)

# soup = BeautifulSoup(driver.page_source, 'html.parser')
# theater = soup.select('li')

# for i in theater:
# 	print(i.text)
# driver.close()
# response = requests.post(url)
# soup = BeautifulSoup(response.text, "html.parser")
# movie_location = {}
# for(brch_nm) in soup.select('#frameBokdMBooking'):
#     print(brch_nm)