Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phitrann committed Mar 8, 2024
1 parent ed09341 commit 49cf581
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
for option in options:
chrome_options.add_argument(option)

browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options) #webdriver.Chrome("chromedriver.exe")
# browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options) #webdriver.Chrome("chromedriver.exe")

# chrome_service = Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())
# browser = webdriver.Chrome(service=chrome_service, options=chrome_options)
chrome_service = Service(ChromeDriverManager(chrome_type=ChromeType.CHROMIUM).install())
browser = webdriver.Chrome(service=chrome_service, options=chrome_options)

browser.maximize_window()
# Set thời gian chờ mặc định là 10 giây
Expand All @@ -49,7 +49,7 @@
url = 'https://www.vietjetair.com'
browser.get(url)

wait = WebDriverWait(browser, 10)
wait = WebDriverWait(browser, 15)

# Chọn sử dụng cookie
wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@role="dialog"]//button'))).click()
Expand Down

0 comments on commit 49cf581

Please sign in to comment.