Added code snippet to explain how to use splash behind proxy#589
Added code snippet to explain how to use splash behind proxy#589rava-dosa wants to merge 1 commit intoscrapinghub:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #589 +/- ##
==========================================
+ Coverage 87.7% 87.71% +<.01%
==========================================
Files 42 39 -3
Lines 5539 5519 -20
Branches 758 758
==========================================
- Hits 4858 4841 -17
+ Misses 510 509 -1
+ Partials 171 169 -2
Continue to review full report at Codecov.
|
lucywang000
left a comment
There was a problem hiding this comment.
There is already an example in scripting-ref.rst, so not sure if we need another one in the examples/ folder
| @@ -0,0 +1,19 @@ | |||
| function main(splash) | |||
There was a problem hiding this comment.
I think "use-proxy.lua" would be a better name (the convention in the examples/ folder is to use dash-separated file name, not camel case).
| } | ||
| end) | ||
| local url = splash.args.url | ||
| assert(splash:go(url)) |
There was a problem hiding this comment.
It doesn't make sense to create a local variable and only use it once. Simply assert(splash:go(splash.args.url)) would do.
No description provided.