Я пытаюсь выяснить вывод в API crossref.org. Используя скрипт на python, моя цель - взять имя DOI или статьи / автора и вывести обратное. Поэтому, когда они вводят название статьи, я надеюсь вывести список DOI.
from habanero import Crossref
cr = Crossref()
article_input = raw_input('Enter name/author/DOI of article:')
if type(input) == 'int': # checks if input is an integer
# deal with doi
article_output = cr.works(article_input)
# article_output['message']
# article_output['message']['total-results']
# article_output['message']['items']
print(article_output)
if type(input) == 'str': # checks if input is a string
# deal with title/author
doi = cr.works(query=article_input)
# doi['message']
# doi['message']['total-results']
# doi['message']['items']
print(doi)