ArXivAudio / get_paper.py
Archan's picture
Update get_paper.py
0a31262
raw
history blame
436 Bytes
import arxiv
def get_paper(paper=""):
if paper:
id = paper.split(" - ")
print("id= ", id)
paper = next(arxiv.Search(id_list=[id[-1]]).results())
print("paper title= ", paper.title)
name = str(paper.title) + '.pdf'
name = name.replace('?', '')
name = "downloads/" + name
paper.download_pdf(filename="./downloads/paper.pdf")
print(name)
return(paper)