Showing
1 changed file
with
42 additions
and
0 deletions
Megabox_crawling/megaboxCrawling.py
0 → 100644
1 | +import requests | ||
2 | +from bs4 import BeautifulSoup | ||
3 | +from selenium import webdriver | ||
4 | +from webdriver_manager.chrome import ChromeDriverManager | ||
5 | +from selenium.webdriver.common.keys import Keys | ||
6 | + | ||
7 | +# driver = webdriver.Chrome() | ||
8 | + | ||
9 | + | ||
10 | +options = webdriver.ChromeOptions() | ||
11 | +options.add_experimental_option("excludeSwitches", ["enable-logging"]) | ||
12 | +driver = webdriver.Chrome(options = options) | ||
13 | +# driver = webdriver.Chrome(ChromeDriverManager().install(),options=options) | ||
14 | +url = "https://megabox.co.kr/booking" | ||
15 | +driver.maximize_window() | ||
16 | + | ||
17 | +driver.implicitly_wait(3) | ||
18 | +driver.get(url) | ||
19 | +iframes = driver.find_elements_by_css_selector('iframe') | ||
20 | + | ||
21 | +for iframe in iframes: | ||
22 | + print(iframe) | ||
23 | + | ||
24 | + | ||
25 | + | ||
26 | + | ||
27 | + | ||
28 | +# for i in btn: | ||
29 | +# print(i['brch-nm']) | ||
30 | +#driver.find_element_by_css_selector('div').send_keys(Keys.ENTER) | ||
31 | + | ||
32 | +# soup = BeautifulSoup(driver.page_source, 'html.parser') | ||
33 | +# theater = soup.select('li') | ||
34 | + | ||
35 | +# for i in theater: | ||
36 | +# print(i.text) | ||
37 | +# driver.close() | ||
38 | +# response = requests.post(url) | ||
39 | +# soup = BeautifulSoup(response.text, "html.parser") | ||
40 | +# movie_location = {} | ||
41 | +# for(brch_nm) in soup.select('#frameBokdMBooking'): | ||
42 | +# print(brch_nm) |
-
Please register or login to post a comment