def get_uri_name(url):
"""Gets the file name from the end of the URL. Only useful for PyBEL's testing though since it looks specifically
if the file is from the weird owncloud resources distributed by Fraunhofer"""
url_parsed = urlparse(url)
if url.startswith(FRAUNHOFER_RESOURCES):
return url_parsed.query.split('=')[-1]
else:
url_parts = url_parsed.path.split('/')
return url_parts[-1]
评论列表
文章目录