Skip to content

requestiumvsrod

BSD-3-Clause 8 4 1,837
79.9 thousand (month) Dec 28 2012 0.5.1(2026-01-19 16:59:35 ago)
6,853 3 202 MIT
Sep 23 2022 v0.116.2(2024-07-12 11:52:28 ago)

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.

Rod is a high-level Go library for browser automation built on the Chrome DevTools Protocol (CDP). It provides a simpler and more intuitive API compared to chromedp, making it easier to write browser automation and web scraping scripts in Go.

Key features include:

  • Simple API Rod's API is designed to be intuitive and requires less boilerplate than chromedp. Common operations like clicking, typing, and waiting are straightforward single-line calls.
  • Auto-wait Automatically waits for elements to be ready before interacting with them, reducing the need for explicit wait statements and making scripts more reliable.
  • Page pool Built-in page pool for managing multiple browser pages efficiently, useful for concurrent scraping tasks.
  • Stealth mode Includes a stealth plugin (rod/lib/launcher/flags) that can disable common automation detection vectors.
  • Element screenshots Can take screenshots of specific elements, not just full pages.
  • Network interception Supports hijacking network requests and responses for modification or monitoring.
  • Input emulation Realistic mouse and keyboard input emulation for interacting with complex web applications.

Rod is the recommended choice for new Go browser automation projects due to its simpler API and active maintenance. It is comparable to Playwright in terms of developer experience but native to the Go ecosystem.

Highlights


cdpfast

Example Use


```python 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) ```
```go package main import ( "fmt" "github.com/go-rod/rod" "github.com/go-rod/rod/lib/launcher" ) func main() { // Launch browser url := launcher.New().Headless(true).MustLaunch() browser := rod.New().ControlURL(url).MustConnect() defer browser.MustClose() // Navigate and auto-wait for the page to load page := browser.MustPage("https://example.com") page.MustWaitStable() // Find elements and extract text - auto-waits for element title := page.MustElement("h1").MustText() fmt.Println("Title:", title) // Fill in a form page.MustElement("input[name='search']").MustInput("web scraping") page.MustElement("button[type='submit']").MustClick() // Wait for results and extract page.MustWaitStable() results := page.MustElements(".result-item") for _, el := range results { text := el.MustText() href := el.MustElement("a").MustProperty("href").String() fmt.Printf("Result: %s (%s)\n", text, href) } // Take screenshot of specific element page.MustElement(".results").MustScreenshot("results.png") } ```

Alternatives / Similar


Was this page helpful?