Skip to content

Commit

Permalink
rename fields
Browse files Browse the repository at this point in the history
  • Loading branch information
mruwnik committed Jun 17, 2023
1 parent 654d97b commit ec0d7bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions align_data/greaterwrong/greaterwrong.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,15 @@ def process_entry(self, item):
'title': item['title'],
'url': item['pageUrl'],
'date_published': item['postedAt'],
'modifiedAt': item['modifiedAt'],
'modified_at': item['modifiedAt'],
'text': markdownify(item['htmlBody']),
"source": self.name,
"source_type": "GreaterWrong",
'votes': item['voteCount'],
'karma': item['baseScore'],
'tags': [t['name'] for t in item['tags']],
'words': item['wordCount'],
'authors': [item['user']] + item['coauthors'],
'comment_count': item['commentCount'],
# Some posts don't have authors, for some reaason
'authors': ([item['user']] if item['user'] else []) + item['coauthors'],
})

0 comments on commit ec0d7bb

Please sign in to comment.