python - Error with scrapy item object -
I'm having trouble with scrapbook items object The current problem is that when I scrap some fields, I Let me save them like this:
items ['tag'] = response Xpath ("// div [contains (@class, 'video-info-line show')]" "// [[(Half, '/ video / search search']] / text () () () () () () () () ()
There are more than one tag that scraps from each and the items are saved in ['tag'] I then on my SQL server Tags are uploaded and to get a mySQL syntax error. The problem is very obvious because it is trying to include something like this: You need to set the output processor for that specific field: < Import scrapper from scrapy.contrib.loader.processor Join class MyItem (scrapy.Item): My_field = scrapy.Field (output_processor = join (separator = ',')) < / Pre> 'tag1', youtag2, ittag 3, u I have tried because I have tried it ("", "") "" but it is not working.
Comments
Post a Comment