@@ -0,0 +1,1136 @@
+import requests%0Aimport json%0Afrom functools32 import lru_cache%0A%0Acrossref_url = 'http://api.crossref.org/'%0A%0A@lru_cache(maxsize=100)%0Adef get_metadata(doi):%0A    %22%22%22Returns the metadata of an article given its DOI from CrossRef%0A    as a JSON dict%22%22%22%0A    url = crossref_url + 'works/' + doi%0A    res = requests.get(url)%0A    if res.status_code != 200:%0A        print 'Could not get CrossRef metadata, code %25d' %25 res.status_code%0A        return None%0A    raw_message = res.json()%0A    metadata = raw_message.get('message')%0A    return metadata%0A%0Adef get_fulltext_links(doi):%0A    %22%22%22Return a list of links to the full text of an article given its DOI.%0A    Each list entry is a dictionary with keys:%0A    - URL: the URL to the full text%0A    - content-type: e.g. text/xml or text/plain%0A    - content-version%0A    - intended-application: e.g. text-mining%0A    %22%22%22%0A    metadata = get_metadata(doi)%0A    if metadata is None:%0A        return None%0A    links = metadata.get('link')%0A    return links%0A%0Adef get_publisher(doi):%0A    metadata = get_metadata(doi)%0A    if metadata is None:%0A        return None%0A    publisher = metadata.get('publisher')%0A    return publisher%0A

Add CrossRef client