def fetch_comments(
      self, stream_id, encoded_sharers, count=10, continuation_token=None):
    query_params = {
      'comments': 'true',
      'sharers': encoded_sharers,
      'n': count,
    }
    if continuation_token:
      query_params['c'] = continuation_token
    stream_contents_json = self._fetch_json(
        'stream/contents/%s' % urllib.quote(stream_id),
        query_params)
    result = {}
    for item_json in stream_contents_json['items']:
      comments_json = item_json.get('comments', [])
      if not comments_json:
          continue
      item_id = item_id_from_atom_form(item_json['id'])
      comments = []
      for comment_json in comments_json:
        comments.append(Comment(
          comment_id=comment_json['id'],
          plain_content=comment_json['plainContent'],
          html_content=comment_json['htmlContent'],
          author_name=comment_json.get('author'),
          author_user_id=comment_json['userId'],
          author_profile_id=comment_json['profileId'],
          venue_stream_id=comment_json['venueStreamId'],
          created_time_usec=comment_json['createdTime'] * 1000000,
          modified_time_usec=comment_json['modifiedTime'] * 1000000,
          is_spam=comment_json['isSpam'],
        ))
      result[item_id] = comments
    return result, stream_contents_json.get('continuation')
dataset/ETHPy150Open mihaip/readerisdead/base/api.py/Api.fetch_comments/original