scrapy-splash
scrapy-splash copied to clipboard
Error 400
An example of documentation https://github.com/scrapy-plugins/scrapy-splash (section "Examples") has the code:
script = """
function main(splash)
splash:init_cookies(splash.args.cookies)
assert(splash:go{
splash.args.url,
headers=splash.args.headers,
http_method=splash.args.http_method,
body=splash.args.body,
})
...
"""
Often it raise the Scrapy error Error 400 without description. Skipping of html pages, it's big problem. (I trying this example on a site, it every second re-launch of spider skip all site pages.) As I can understand, this error of some splash.args parameter in assert.
How to logging it, how to print error parameter and error description in Scrapy log?
Errors in lua scripts only become a logging WARNING (if SPLASH_LOG_400 is set). I would also like to handle these errors (in python) somehow; throwing a python exception or at least a logging.ERROR.