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=name) print(name) return(paper)