install_browser.py 646 B

1234567891011121314151617
  1. #!/usr/bin/env python
  2. # -*- encoding: utf-8 -*-
  3. """
  4. @Contact : liuyuqi.gov@msn.cn
  5. @Time : 2024/07/05
  6. @License : Copyright © 2017-2022 liuyuqi. All Rights Reserved.
  7. @Desc : insntall brawser with selenium
  8. """
  9. from selenium import webdriver
  10. from webdriver_manager.microsoft import EdgeChromiumDriverManager
  11. from webdriver_manager.chrome import ChromeDriverManager
  12. from selenium.webdriver.edge.service import Service
  13. edge = webdriver.Edge(service=Service(EdgeChromiumDriverManager().install()))
  14. # edge = webdriver.EdgeService(EdgeChromiumDriverManager().install())
  15. # chrome = webdriver.ChromeService(ChromeDriverManager().install())