标签:ret port sts table splash docke sel fun 渲染
Splash is a javascript rendering service. It’s a lightweight web browser with an HTTP API
http://splash.readthedocs.io/en/stable/
爬虫方面可以抓取JS渲染的页面(selenium也可以解决此问题)
import requests
from urllib.parse import quote
lua = ‘‘‘
function main(splash)
return ‘hello‘
end
‘‘‘
url = ‘http://localhost:8050/execute?lua_source=‘ + quote(lua)
response = requests.get(url)
print(response.text)
标签:ret port sts table splash docke sel fun 渲染
原文地址:https://www.cnblogs.com/allen2333/p/9477406.html