from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from time import sleep
from bs4 import BeautifulSoup
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
driver = webdriver.Firefox(executable_path="./geckodriver.exe", options=options)
def get_html(url):
driver.get(url)
get_source = driver.page_source
driver.quit()
return get_source
def get_content(html):
soup = BeautifulSoup(html, "html.parser")
items_e = soup.find_all("div", class_="product-head-text")
price__ = soup.find_all("div", class_ = "product-right-part")
def parse_el (url):
html = get_html(url)
get_content(html)
if __name__ == '__main__':
parse_el("https://eldorado.ua/uk/kondicioner-samsung-ar09-txhqasinua/p71285447/?sc_content=20781_r258v426")
parse_el("https://eldorado.ua/uk/kondicioner-samsung-ar09-txhqasinua/p71285447/?sc_content=20781_r258v426")
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
driver = webdriver.Firefox(executable_path="./geckodriver.exe", options=options)
def get_html(url):
driver.get(url)
get_source = driver.page_source
driver.quit()
return get_source
options = Options()
options.add_argument('--headless')
options.add_argument('--disable-gpu')
options.add_argument('--hide-scrollbars')
def get_html(url):
driver = webdriver.Firefox(executable_path="./geckodriver.exe", options=options)
driver.get(url)
get_source = driver.page_source
driver.quit()
return get_source