Hello,

I would like to ask for advice in representing the model of the site I'm 
crawling. Each page represents a movie that has multiple reviews and I was 
thinking that it would make sense for the reviews to be stored in a list. 
Here is an example

```
class MovieItem(Item):
    text = Field()
    timestamp = Field()
    reviews = [ ]  # TODO this will be a list of MovieReviewItem


class MovieReviewItem(Item):
    text = Field()
    author = Field()
    timestamp = Field()
```

Thus, the MovieItem object will contain all the associated information and 
hopefully, when dumped into a JSON - the structure will be preserved.


In an earlier post on the list, someone asked a similar question and the 
suggestion was to use `MultiValuedField`. However, that was back in 2009 
and right now there's no reference to it anywhere in the source of Scrapy 
(except in documentation, where it is marked as obsolete).

1. What is the recommended way of handling such a situation?
2. Would it then be correctly serialized to JSON?

-- 
You received this message because you are subscribed to the Google Groups 
"scrapy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to scrapy-users+unsubscr...@googlegroups.com.
To post to this group, send email to scrapy-users@googlegroups.com.
Visit this group at https://groups.google.com/group/scrapy-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to