megaboxCrawling.py
1.06 KB
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
32
33
34
35
36
37
38
39
40
41
42
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)