import time
from selenium import webdriver
import chromedriver_binary
driver = webdriver.Chrome()
driver.get('https://xxx')
time.sleep(2) #2 seconds weight
driver.close()
driver.quit()
from bs4 import BeautifulSoup
import time
from selenium import webdriver
import chromedriver_binary
from selenium.webdriver.chrome.options import Options
option = Options()
option.add_argument('--headless')
driver = webdriver.Chrome(options=option)
driver.get('https://xxx')
time.sleep(2) #2 seconds weight
#When parsing
soup = BeautifulSoup(driver.page_source,'html.parser')
driver.close()
driver.quit()
Recommended Posts