Feb-02-2017, 07:36 PM
This post is to inquire any references or resources is... any pointers to the following project scope whilst using cookie cutter framework.
can check it out at https://github.com/3rawkz/scrapy-cut
Please review the git repository. You might get a sense of what I'm trying to accomplish, I literally just threw up that Reba the past half-hour and no I don't feel it's up to a draft completion my question is the following.
Using Jinja,is it possible have multiple templates but in some sort of dictionary be able to call just one? For example I know the end official documents for cookiecutter I first learned that while creating the cookiecutter-pypackage, the license content is located in one text file, of which using else if statement creates a dictionary which is defined in the json file... Is similar process for python template? Or is it creating a text file with the python code and then figuring out how to do code to create the spider?
Secondly, if I refer you to the "demo" spider code snippet...
As you can Imagine... (or if you are slightly familiar with cookiecutter would have check out the json file), the variables are defined and in this scrapy project not using items.py for the sake of starting easy... In the given code snip while using cookicutter... Is there some way I can loop to input x desired amount of items and the "Item selector" to add as many as I need?
can check it out at https://github.com/3rawkz/scrapy-cut
Please review the git repository. You might get a sense of what I'm trying to accomplish, I literally just threw up that Reba the past half-hour and no I don't feel it's up to a draft completion my question is the following.
Using Jinja,is it possible have multiple templates but in some sort of dictionary be able to call just one? For example I know the end official documents for cookiecutter I first learned that while creating the cookiecutter-pypackage, the license content is located in one text file, of which using else if statement creates a dictionary which is defined in the json file... Is similar process for python template? Or is it creating a text file with the python code and then figuring out how to do code to create the spider?
Secondly, if I refer you to the "demo" spider code snippet...
yield { 'name': "{{cookiecutter.item_name_selector}}", 'event': "{{cookiecutter.item_event_selector}}", 'vidurl': "{{cookiecutter.item_vidurl_selector}}", 'tags': "{{cookiecutter.item_tags_selector}}", }
As you can Imagine... (or if you are slightly familiar with cookiecutter would have check out the json file), the variables are defined and in this scrapy project not using items.py for the sake of starting easy... In the given code snip while using cookicutter... Is there some way I can loop to input x desired amount of items and the "Item selector" to add as many as I need?