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: 'tag1', youtag2, ittag 3, u I have tried because I have tried it ("", "") "" but it is not working.

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>


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -