반응형

ERROR: Could not find a version that satisfies the requirement seleniumrequests

 

글. 수알치 오상문 

 

seleniumrequests 설치는 다음 명령을 이용합니다.

 

pip install selenium-requests

 

사용 예제는 다음과 같습니다.

# Import any WebDriver class that you would usually import from
# selenium.webdriver from the seleniumrequests module
from seleniumrequests import Firefox
# Simple usage with built-in WebDrivers:
webdriver = Firefox()
response = webdriver.request('GET', 'https://www.google.com/')
print(response)
# More complex usage, using a WebDriver from another Selenium-related module:
from seleniumrequests.request import RequestsSessionMixin
from someothermodule import CustomWebDriver
class MyCustomWebDriver(RequestsSessionMixin, CustomWebDriver):
    pass
custom_webdriver = MyCustomWebDriver()
response = custom_webdriver.request('GET', 'https://www.google.com/')
print(response)

 

 

반응형

+ Recent posts