Instantly share code, notes, and snippets.

Embed
What would you like to do?
Python method to access crossref.org DOI bibtex metadata resolver
import requests
def doi2bib(doi):
"""
Return a bibTeX string of metadata for a given DOI.
"""
url = "http://dx.doi.org/" + doi
headers = {"accept": "application/x-bibtex"}
r = requests.get(url, headers = headers)
return r.text
@johnro

This comment has been minimized.

johnro commented Mar 5, 2015

Great! This saved me lots of headache ! :)

@marekborowiec

This comment has been minimized.

marekborowiec commented Feb 2, 2016

The most useful six lines of code I've seen in a long time. Thanks!

@GabrielFonsecaGuerra

This comment has been minimized.

GabrielFonsecaGuerra commented May 1, 2016

Awesome!!! .. truly thank you

@aFelipeSP

This comment has been minimized.

aFelipeSP commented Oct 11, 2016

can you explain it please, I would be very thankful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment