Skip to content

Commit 0f891e9

Browse files
committed
Fix #1672 newline in arxiv title
If a newline was present in an arxiv title, then quickstatement would not accept it. This removes the newline from the scraped content.
1 parent 37d90f0 commit 0f891e9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scholia/arxiv.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ def get_metadata(arxiv):
8181
'authornames': [author.name for author in entry.authors],
8282
'full_text_url': 'https://arxiv.org/pdf/' + arxiv + '.pdf',
8383
'publication_date': entry.published[:10],
84-
'title': entry.title,
84+
85+
# Some titles may have a newline in them. This should be converted to
86+
# an ordinary space character
87+
'title': re.sub(r'\s+', ' ', entry.title),
88+
8589
'arxiv_classifications': [tag.term for tag in entry.tags],
8690
}
8791

0 commit comments

Comments
 (0)