What is Splash?
Splash is a javascript rendering service. It’s a lightweight web browser with an HTTP API, implemented in Python 3 using Twisted and QT5. The (twisted) QT reactor is used to make the service fully asynchronous allowing to take advantage of webkit concurrency via QT main loop.
1. Setup
Directory Structure:
example - docker-stack.yml - splash - proxy-profiles - default.ini
1.1 Create file docker-stack.yml
version: '3' services: torprivoxy: image: rdsubhas/tor-privoxy-alpine networks: - network1 ports: - 8118:9050 splash: image: scrapinghub/splash networks: - network1 ports: - 5023:8050 volumes: - ./splash/proxy-profiles:/etc/splash/proxy-profiles:ro networks: network1: network2:
1.2 Create directory /splash/proxy-profiles/ and create file /splash/proxy-profiles/default.ini
[proxy] host=torprivoxy port=8118
1.3 Deploy stack
docker stack deploy --compose-file docker-stack.yml example
1.4 Test
If everything is well configured, then Splash will render http://34.77.149.250 using Tor/Privoxy as a proxy server.
curl 'http://localhost:5023/render.html?url=http://34.77.149.250/&timeout=20'
Mario
Works great, thank you!