Skip to content

requestium

1,835 2 6 BSD-3-Clause
0.4.0 (4 Feb 2024) Dec 28 2012 52.3 thousand (month)

Requestium is a Python library that merges the power of Requests, Selenium, and Parsel into a single integrated tool for automatizing web actions.

The library was created for writing web automation scripts that are written using mostly Requests but that are able to seamlessly switch to Selenium for the JavaScript heavy parts of the website, while maintaining the session.

Requestium adds independent improvements to both Requests and Selenium, and every new feature is lazily evaluated, so its useful even if writing scripts that use only Requests or Selenium.

Example Use


from requestium import Session, Keys

session = Session(webdriver_path='./chromedriver',
            browser='chrome-headless',
            default_timeout=15)

# then session object can be used like requests and parsel:
title = session.get('http://samplesite.com').xpath('//title/text()').extract_first(default='Default Title')

# other advance functions like POST requests and proxy settings are also available:
s.post('http://www.samplesite.com/sample', data={'field1': 'data1'})
s.proxies.update({'http': 'http://10.11.4.254:3128', 'https': 'https://10.11.4.252:3128'})

# session can also be used like selenium as it exposes all selenium functions.
# like typing keys:
s.driver.find_element_by_xpath("//input[@class='user_name']").send_keys('James Bond', Keys.ENTER)

Alternatives / Similar


30,908 4.27.1 (13 days ago) Apr 25 2008 compare
10,159 3.5.5 (9 months ago) Sep 04 2020 compare
642 1.9.4 (a month ago) Jul 22 2022 compare
12,005 1.49.0 (18 days ago) Feb 24 2021 compare
4,100 3.5 (4 years ago) Apr 25 2014 compare

Other Languages

67,537 1.49.0 (3 days ago) Jan 23 2015 compare
11,155 chromedp (a month ago) Nov 27 2019 compare
2,951 v2.1.1 (1 year, 7 days ago) Jul 17 2018 compare
Was this page helpful?