Skip to content

AntoineCezar/requests-splash

Repository files navigation

Requests Splash

v0.1.0

Splash headless browser adapter for Requests.

Quick Start

First run a splash instance:

sudo docker run --rm --name=splash -p 8050:8050 scrapinghub/splash

Then you can start your requests:

from requests_splash import Session

with Session() as session:
    response = session.get('https://example.com')

Install

Requirements for Installing Package:

  • pip for installing packages
  • python3 -m venv venv for creating a virtual environment.
  • setuptools >= 30.3.0 (to configure setup() using setup.cfg)

See the Python Packaging Authority's (PyPA) documention Requirements for Installing Packages for full details.

On a Unix/Linux System

$ export VENV=~/path/to/venv
$ python3 -m venv $VENV
$ $VENV/bin/pip install requests-splash

For development use:

$ export VENV=~/path/to/venv
$ python3 -m venv $VENV
$ cd /path/to/requests-splash
$ $VENV/bin/pip install -e . ".[develop]" ".[testing]"

A convenient Makefile is provided to ease development:

$ make develop

For more useful commands run:

$ make help

On a Windows System

c:\> set VENV=c:\path\to\venv
c:\> python -m venv %VENV%
c:\> %VENV%\Scripts\pip install requests-splash

For development use:

c:\> set VENV=c:\path\to\venv
c:\> python -m venv %VENV%
c:\> cd \path\to\requests-splash
c:\> %VENV%\Scripts\pip install -e . ".[develop]" ".[testing]"

Todo

  • cookie
  • timeout
  • proxies
  • execute custom JavaScript in page context
  • HEAD, OPTION POST and PUT requests

License

BSD license

About

A Splash headless browser adapter for python Requests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published