Last active
August 29, 2015 14:24
-
-
Save kevin-snippet/daf7f59191e25a3a2a99 to your computer and use it in GitHub Desktop.
scrapy: items_template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scrapy.item import Item, Field | |
from scrapy.contrib.loader import XPathItemLoader | |
from scrapy.contrib.loader.processor import TakeFirst | |
class XXXXX(Item): | |
item1 = Field() | |
item2 = Field() | |
item3 = Field() | |
item4 = Field() | |
item5 = Field() | |
class SoUsersLoader(XPathItemLoader): | |
default_item_class = XXXXX | |
default_output_processor = TakeFirst() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment