I read this topic, but it doesn't helped me.
I'm trying to get some element, while it is my first action with the web.
Also, sometimes, on my first connection to the website, the request become broken and the website refuse anything
How does the website know that I'm using selenium? I didn't do any pattern action or fast actions..
This is the website
Can anybody help me to figure this problem?
Here is my code
import selenium
from selenium import webdriver
def open_browser():
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-infobars")
browser = selenium.webdriver.Chrome("./chromedriver2.46.exe", chrome_options=chrome_options)
browser.maximize_window()
return browser
def go_to_yad2(browser):
browser.get("https://www.yad2.co.il/products/all")
def open_category(browser):
options_object = browser.find_element_by_xpath("//ul[@data-name='salesCatID']")
print(options_object.text())
def main_method():
browser = open_browser()
go_to_yad2(browser)
open_category(browser)
main_method()