Spaces:
Runtime error
Runtime error
File size: 372 Bytes
5ebeeca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import arxiv
def get_text_title(arxiv_id):
if 'arxiv.org' in arxiv_id:
arxiv_id = arxiv_id.split('/')[-1]
try:
search = arxiv.Search(id_list=[arxiv_id])
paper = next(search.results())
return paper.title, paper.summary
except arxiv.UnexpectedEmptyPageError:
return None
except arxiv.HTTPError:
return None
|