def __init__(self, googleReader, item, parent):
        """
        :param item: An item loaded from json
        :param parent: the object (Feed of Category) containing the Item
        """
        self.googleReader = googleReader
        self.parent = parent

        self.data   = item # save original data for accessing other fields
        self.id     = item['id']
        self.title  = item.get('title', '(no title)')
        self.author = item.get('author', None)
        self.content = item.get('content', item.get('summary', {})).get('content', '')
        self.origin  = { 'title': '', 'url': ''}
        if 'crawlTimeMsec' in item:
            self.time = int(item['crawlTimeMsec']) // 1000
        else:
            self.time = None

        # check original url
        self.url    = None
        for alternate in item.get('alternate', []):
            if alternate.get('type', '') == 'text/html':
                self.url = alternate['href']
                break

        # check status
        self.read    = False
        self.starred = False
        self.shared  = False
        for category in item.get('categories', []):
            if category.endswith('/state/com.google/read'):
                self.read = True
            elif category.endswith('/state/com.google/starred'):
                self.starred = True
            elif category in ('user/-/state/com.google/broadcast',
                              'user/%s/state/com.google/broadcast' % self.googleReader.userId):
                self.shared = True

        self.canUnread = item.get('isReadStateLocked', 'false') != 'true'

        # keep feed, can be used when item is fetched from a special feed, then it's the original one
        try:
            f = item['origin']
            self.origin = {
                'title': f.get('title', ''),
                'url': f.get('htmlUrl', ''),
            }
            self.feed = self.googleReader.getFeed(f['streamId'])
            if not self.feed:
                raise
            if not self.feed.title and f in 'title':
                self.feed.title = f['title']
        except:
            try:
                self.feed = Feed(self, f.get('title', ''), f['streamId'], f.get('htmlUrl', None), 0, [])
                try:
                    self.googleReader._addFeed(self.feed)
                except:
                    pass
            except:
                self.feed = None

        self.parent._addItem(self)
dataset/ETHPy150Open askedrelic/libgreader/libgreader/items.py/Item.__init__/swapped operands of `in`