File size: 606 Bytes
63135a7
 
 
8fafff8
63135a7
 
 
 
 
8fafff8
 
 
 
 
 
 
 
63135a7
 
8fafff8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from arxiv_util import arxiv_url_sanitizer
from arxiv_util import get_paper_info

def get_paperinfo_fromurls(original_url):
    """
    Returns a dictionary of url entered by user
    and corresponding paper info from arxiv.
    """
    url_paperinfo = {}
    url = arxiv_url_sanitizer(original_url.strip())
    # print("Sanitized url = {}".format(url))
    try:
        paper_info = get_paper_info(url)
    except RuntimeError as e:
        print("[SKIP] Error processing : {}, message : {}".format(url, e))
        pass
    url_paperinfo[original_url] = paper_info
            
    return url_paperinfo