Skip to content

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.

Copy link

commented Mar 5, 2015

Great! This saved me lots of headache ! :)

@marekborowiec

This comment has been minimized.

Copy link

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.

Copy link

commented May 1, 2016

Awesome!!! .. truly thank you

@aFelipeSP

This comment has been minimized.

Copy link

commented Oct 11, 2016

can you explain it please, I would be very thankful

@myeghaneh

This comment has been minimized.

Copy link

commented Aug 12, 2019

thank you for the code, could you please how can I download entire file of DOI in zenobi using python, imagine this file

https://zenodo.org/record/3269732#.XVGJJehKhaS

how can I download the entire file. many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.