def entry_from_vertex(v): info = crossref.doi_info_or_none(v["name"]) vresult = dict(doi=v["name"].decode('utf-8'), title=crossref.title_from_info(info), author=crossref.authors_from_info(info)) if "weight" in v.attributes(): vresult['weight'] = int(v['weight']) return vresult
def entry_from_doi(doi): info = crossref.doi_info_or_none(doi) try: vresult = dict(doi=doi.decode('utf-8'), title=crossref.title_from_info(info), author=crossref.authors_from_info(info)) return vresult except: logging.exception("Error on info {0}".format(info)) return None