Skip to content

splash

4,100 15 403 BSD-3-Clause
3.5 (16 Jun 2020) Apr 25 2014 1.5 thousand (month)

Splash is a javascript rendering service with an HTTP API. It's a lightweight browser with an HTTP API, implemented in Python 3 using Twisted and QT5.

It is built on top of the QtWebkit library and allows developers to interact with web pages in a headless mode, which means that the web pages are rendered in the background, without displaying them on the screen.

splash is particularly useful for web scraping and web testing tasks, as it allows developers to interact with web pages in a way that is very similar to how a human user would interact with the browser.

It also allows you to execute javascript and interact with web pages even if they use heavy javascript.

Unlike Selenium or Playwright, splash is powered by webkit embedded browser instead of a real browser like Chrome or Firefox. As a down-side splash requests are easy to detect and block when scraping websites with anti-scraping features.

One benefit of splash is that it seemlesly integrates with Scrapy.

Example Use


# once splash server is started it can be requested to render pages through 
# HTTP requests:
import requests

url = "http://localhost:8050/render.html"
payload = {
    'url': 'https://www.example.com',
    'timeout': 30,
    'wait': 2
}

response = requests.get(url, params=payload)

# Get the page HTML
print(response.text)

Alternatives / Similar


30,908 4.27.1 (13 days ago) Apr 25 2008 compare
12,005 1.49.0 (18 days ago) Feb 24 2021 compare
52,353 2.11.2 (6 months ago) Jul 26 2019 compare
10,159 3.5.5 (9 months ago) Sep 04 2020 compare
2,980 1.5.0 (2 months ago) Sep 04 2013 compare
1,835 0.4.0 (10 months ago) Dec 28 2012 compare
642 1.9.4 (a month ago) Jul 22 2022 compare
3,362 0.9.13 (1 year, 4 months ago) Jul 04 2017 compare
3,176 1.5.1 (2 months ago) Sep 30 2018 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?