Socket
Book a DemoInstallSign in
Socket

selenium-requests-html

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selenium-requests-html

Fork of selenium-requests that extends Selenium WebDriver classes to include the functionality from the Requests-HTML library, while doing all the needed cookie and request headers handling. Credit for most of what makes this work goes toto Chris Braun and his original work done on Selenium-Requestshttps://github.com/cryzed/Selenium-Requests

pipPyPI
Version
1.0
Maintainers
1

Selenium Requests HTML

Extends Selenium WebDriver classes to include the HTMLSession from the Requests-HTML library, while doing all the needed cookie and request headers handling.

This hasn't really been tested and is not likely to get a whole lot of work done on it. My initial tests seemed to work for my use case. Most functionality worked with another webdriver, but the render function in Requests-HTML has a dependency that uses chromedriver and I have not yet looked into a way around it.

Most of the work already seemed to have been done, thanks to the organization and work already done in Selenium Requests and Requests-HTML, as well as the original Requests library.

Usage

# Import any WebDriver class that you would usually import from
# selenium.webdriver from the seleniumrequestshtml module
from seleniumrequestshtml import Chrome
from selenium.webdriver.chrome.options import Options

# Set up the options for your webdriver
url = 'https://illsea.com'
options = Options()
options.add_argument("--headless")
webdriver = Chrome(chrome_options=options)

# webdriver.requests_session replaces regular HTMLSession() usage from requests-html
session = webdriver.requests_session
# then just do requests-HTML things
response = session.get(url)
images = response.html.find('img')

print(images)

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.