Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henri123lemoine committed Aug 9, 2023
1 parent 6b024d6 commit 78ff5eb
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions align_data/sources/arxiv_papers/arxiv_papers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,24 @@ def process_entry(self, item) -> None:
else:
authors = paper.get("authors") or []
authors = [str(a).strip() for a in authors]

return self.make_data_entry(
url=self.get_item_key(item),
source=self.name,
source_type=paper["data_source"],
title=self.is_val(item.title) or paper.get("title"),
authors=authors,
date_published=self._get_published_date(
self.is_val(item.date_published) or paper.get("date_published")
),
data_last_modified=str(metadata.updated),
summary=metadata.summary.replace("\n", " "),
author_comment=metadata.comment,
journal_ref=metadata.journal_ref,
doi=metadata.doi,
primary_category=metadata.primary_category,
categories=metadata.categories,
text=paper["text"],
)
{
"url": self.get_item_key(item),
"source": self.name,
"source_type": paper["data_source"],
"title": self.is_val(item.title) or paper.get("title"),
"authors": authors,
"date_published": self._get_published_date(
self.is_val(item.date_published) or paper.get("date_published")
),
"data_last_modified": str(metadata.updated),
"summary": metadata.summary.replace("\n", " "),
"author_comment": metadata.comment,
"journal_ref": metadata.journal_ref,
"doi": metadata.doi,
"primary_category": metadata.primary_category,
"categories": metadata.categories,
"text": paper["text"],
}
)

0 comments on commit 78ff5eb

Please sign in to comment.