添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
寂寞的数据线  ·  Scrolling with ...·  3 周前    · 
奔放的楼房  ·  使用Google Chrome ...·  22 小时前    · 
率性的麦片  ·  @capacitor-community/a ...·  1 年前    · 
重感情的黄瓜  ·  NextJS + AntD React ...·  1 年前    · 
酷酷的日光灯  ·  get error message ...·  1 年前    · 

Selenium is a Python package that allows developers to automate web browsers. It provides a way for developers to interact with web browsers programmatically, simulating user interactions such as clicking links, filling out forms, and navigating between pages. Selenium can be used to automate tasks such as web scraping, testing web applications, and automating repetitive tasks on websites.

Selenium is built on top of WebDriver, which is a browser automation API that allows Selenium to interact with web browsers. Selenium supports a wide variety of web browsers, including Chrome, Firefox, Safari, and Internet Explorer.

One of the main advantages of Selenium is that it can be used with many different programming languages, not only Python, and it also supports different platforms.

The package also provide a set of APIs that allows you to interact with web pages, you can locate elements, interact with them, get their properties and interact with javascript, you can use the APIs to automate the browser and interact with web pages in the same way a human user would.

Selenium is widely used in web scraping, web testing, and other automation tasks because it allows developers to automate web browsers in a way that is very similar to how a human user would interact with the browser.

Overall, Selenium is a powerful and versatile tool for automating web browsers and is widely used in web scraping, web testing, and other automation tasks.

Undetected chromedriver is custom open source headless browser driver based on Selenium. It extends Selenium headless browsers to be more ressistant to fingeprinting and identification techniquest like: - Cloudflare - Datadome - Imperva And other similar WAF anti-bot systems.

Highlights

# Find an element by its name element = driver . find_element_by_name ( "example-name" ) # Fill an input form element . send_keys ( "example text" ) # Find and click a button driver . find_element_by_xpath ( "//button[text()='Search']" ) . click () # Wait for the page to load driver . implicitly_wait ( 10 ) # Get the page title print ( driver . title ) # Close the browser driver . close ()
# It works the same as Selenium just with a different import.
import undetected_chromedriver as uc
driver = uc.Chrome(headless=True, use_subprocess=False)
driver.get('https://nowsecure.nl')
driver.save_screenshot('screenshot.png')
driver.close()