Splash:使用pcall处理错误的请求HTTP 400

问题描述

我写了一个小的Lua脚本来填写并提交 private Bitmap invert(Bitmap src) { int height = src.getHeight(); int width = src.getWidth(); Bitmap bitmap = Bitmap.createBitmap(width,height,src.getConfig()); Canvas canvas = new Canvas(bitmap); Paint paint = new Paint(); ColorMatrix matrixGrayscale = new ColorMatrix(); matrixGrayscale.setSaturation(0); ColorMatrix matrixInvert = new ColorMatrix(); matrixInvert.set(new float[] { -1.0f,0.0f,255.0f,-1.0f,1.0f,0.0f }); matrixInvert.preConcat(matrixGrayscale); ColorMatrixColorFilter filter = new ColorMatrixColorFilter(matrixInvert); paint.setColorFilter(filter); canvas.drawBitmap(src,paint); // src.recycle(); return bitmap; } 登录表单。可悲的是它总是能实现

execute_lua(splash_obj,call_function)中的错误错误的请求(HTTP 400)。

我在R中尝试了以下内容

splashr

始终以以下方式回复

execute_lua(。,str_c(“函数main(splash)\ n assert(splash:go(”,: 错误的请求(HTTP 400)。

当我这样做时:

splash_local %>%
execute_lua(str_c('function main(splash)
  assert(splash:go(',url,'))
  assert(splash:wait(5))
 local form = splash:select(',form,')
                  assert(form:fill({ email=',email,',password=',pass,remember_me=true })) 
                  assert(form:submit()) 
                  end
                  pcall(main then print(debug.traceback()))')%>% gsub(pattern ='\\n',replacement =''))

在localhost:8050(启动容器的浏览器)我收到了:

飞溅响应:“”

如果功能正常运行,我相信可以提供。

有人可以告诉我飞溅的lua函数是否正确吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)