Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

splash简单客户端

Project description

splashclient

简单的splash客户端

安装

pip install splashclient

快速入门

  • 初始化客户端,配置代理可以传递{"protocol": "http", "ip": "IP地址", "port": 端口}到参数default_proxy
splash_url = "你的splash服务端地址,例如:http://IP:8050"
client = SplashClient(splash_url, default_proxy=None, default_wait=0.1, default_time=30, default_header={
    "User-Agent": "abc"
})
  • 获取一个渲染后的网页html
html = client.render("http://blog.yubangweb.com")
print(html)
  • 获取页面截图
client.png("http://blog.yubangweb.com")
with open("1.png", "wb") as fp:
    fp.write(data)

Project details


Release history Release notifications

This version
History Node

0.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
splashclient-0.0.1-py3.6.egg (6.2 kB) Copy SHA256 hash SHA256 Egg 3.6
splashclient-0.0.1.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page