Closed howie6879 closed 7 years ago
You mean setting a callback function to each Selector? like:
Css('title', lambda s: s+s)
or
def clean_str(s):
return s+s
Css('title', clean_str)
Why not do that in save() method? like:
async def save(self):
self.title = clean_str(self.title)
self.content = tomd.convert(self.content)
thanks
For example:
Then in https://github.com/gaojiuli/gain/blob/master/gain/item.py