Closed Rukomoynikov closed 1 year ago
Hi @oltarasenko
Could you please, when you have time, look at the PR? I can adjust it if you feel it doesn't fulfil its goal or remove it if the issue is not crucial.
Hey @Rukomoynikov,
Thanks for contributing, and sorry for a bit late reply, I have just returned from vacation. Will look at the PR soon.
Hello all.
I made this small PR to address the issue in the spider generator. From the documentation, I found that to generate a template for a spider, I should use:
But if I change the order of parameters it will not work. The problem is that
OptParser
returns parsed arguments in akey list
-[filepath: filepath, spidername: spidername]
. So, for the functiondefp generate_spider(filepath: filepath, spidername: spidername)
, it's necessary to pass it in this order (filepath first etc). If it's passed in another order, like spidername first, it fails. The proposed solution is to convert the key lists type into a Map.It could be solved without converting to a Map, adding a function:
Changes in the PR