python - Scrapy returning scraped values into an array -


It seems that to pull out the data correctly, but to format the output in my JSON object as if it is an array:

My spider class looks like this:

 For items in items:  DEF Pars (self, response): cell = selector (response) item = sel.select ('// div / ul [@ class = "product Skateboard = [] in objects: skateboard = skateboard ['name'] = items.expath ('li [@ class =' ​​rick]] // text () '). Remove () Skateboard [' value '] = Item.xpath (' li [class = "value"] "] / text () [1] '). Remove () skateboard ['link'] = item. Xpath ('li [@ class = "image"]'). Remove () Skateboard Skateboard Return Skateboard  

How do I go to make sure that Scrappy is only outputing the same value for each key array which is currently producing?

  .extract ()  

List you can use

  ''. Include (item.xpath ('li [@ class = "desc"] / text ()'). Remove ())  

To get a string

< / Div>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -