In [2]:
url = "https://pub.orcid.org/0000-0002-2907-3313/orcid-works"

import requests
import json

resp = requests.get(url,
                    headers={'Accept':'application/orcid+json'})

orcid_data = resp.json()

works =  orcid_data['orcid-profile']['orcid-activities']['orcid-works']['orcid-work']

In [141]:
#for key in orcid_data.keys():
#    print(key)

In [13]:
works


Out[13]:
[{'country': {'value': 'GB', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': None,
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': {'value': '12'},
   'media-type': None,
   'month': {'value': '11'},
   'year': {'value': '2015'}},
  'put-code': '20197255',
  'short-description': None,
  'source': None,
  'url': {'value': 'http://www.scissorsandpaste.net'},
  'visibility': 'PUBLIC',
  'work-citation': {'citation': 'M. H. Beals Scissors and Paste Core Dataset and Derived Data v1.0.0. (Zenodo, 2015). DOI:10.5281/zenodo.33682',
   'work-citation-type': 'FORMATTED_CHICAGO'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.5281/zenodo.33682'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'The Scissors and Paste Database'},
   'translated-title': None},
  'work-type': 'DATA_SET'},
 {'country': {'value': 'GB', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': None,
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': {'value': '15'},
   'media-type': None,
   'month': {'value': '10'},
   'year': {'value': '2010'}},
  'put-code': '18679694',
  'short-description': None,
  'source': None,
  'url': {'value': 'http://www2.warwick.ac.uk/fac/cross_fac/heahistory/elibrary/internal/br_beals_internationalfirstyear_20101015/'},
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '9780956460370'},
     'work-external-identifier-type': 'ISBN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'A Comparative Study of First-Year Transition'},
   'title': {'value': 'International Students in History'},
   'translated-title': None},
  'work-type': 'REPORT'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'International Journal of Regional and Local Studies'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2008'}},
  'put-code': '18655431',
  'short-description': 'Pre-Print Version',
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': "@misc{datacite48186a25-89de-4495-bba7-90cb8790a966,\n  doi = {10.6084/M9.FIGSHARE.949624},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.949624},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {'Passengers Wishing to Embrace This Commodious Conveyance, Will Apply Immediately': The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800-1830},\n  year = {2014}\n}",
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.949624'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Pre-Print'},
   'title': {'value': "'Passengers Wishing to Embrace This Commodious Conveyance, Will Apply Immediately': The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800-1830"},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '18655399',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@misc{datacite7a79b6aa-2a4a-4d91-b3b7-66839a34f7de,\n  doi = {10.6084/M9.FIGSHARE.1021491},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.1021491},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {Introduction to Digital Analysis Techniques},\n  year = {2014}\n}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.1021491'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'Introduction to Digital Analysis Techniques'},
   'translated-title': None},
  'work-type': 'REPORT'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'Historical Networks in the Book Trade'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': {'value': '10'},
   'year': {'value': '2015'}},
  'put-code': '18655391',
  'short-description': 'Pre-Print Version',
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@misc{datacite6ffd17ae-a304-4065-b61c-a86ba86adf67,\n  doi = {10.6084/M9.FIGSHARE.944593},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.944593},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {The Role of the Sydney Gazette in the Creation of Australia in the Scottish Public Sphere},\n  year = {2014}\n}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.944593'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Pre-Print'},
   'title': {'value': 'The Role of the Sydney Gazette in the Creation of Australia in the Scottish Public Sphere'},
   'translated-title': None},
  'work-type': 'BOOK_CHAPTER'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'Journal for Eighteenth-Century Studies'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '18655378',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': ' @article{BEALS_2014, title={Reading the Scottish Enlightenment: Books and Their Readers in Provincial Scotland, 1750-1820. By MARK TOWSEY. Leiden: Brill. 2010. 361 p. â\x82¬104 (hb). ISBN 978-90-04-18432-9.}, volume={37}, ISSN={1754-0194}, url={http://dx.doi.org/10.1111/1754-0208.12061}, DOI={10.1111/1754-0208.12061}, number={1}, journal={J 18th Cent Stud}, publisher={Wiley-Blackwell}, author={BEALS, M. H.}, year={2014}, month={Mar}, pages={122â\x80\x93123}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1111/1754-0208.12061'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '1754-0194'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Journal for Eighteenth-Century Studies'},
   'title': {'value': 'Reading the Scottish Enlightenment: Books and Their Readers in Provincial Scotland, 1750-1820. By Mark Towsey. Leiden: Brill. 2010. 361 p. €104 (hb). ISBN 978-90-04-18432-9.'},
   'translated-title': None},
  'work-type': 'BOOK_REVIEW'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2012'}},
  'put-code': '18655377',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{Beals_2012, title={              Scottishness and Irishness in New Zealand since 1840              By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.            }, volume={91}, url={http://dx.doi.org/10.3366/shr.2012.0131}, DOI={10.3366/shr.2012.0131}, number={2}, journal={Scottish Historical Review}, publisher={Edinburgh University Press}, author={Beals, M. H.}, year={2012}, month={Oct}, pages={382-383}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '0036-9241'},
     'work-external-identifier-type': 'ISSN'},
    {'work-external-identifier-id': {'value': '10.3366/shr.2012.0131'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Scottish Historical Review'},
   'title': {'value': 'Scottishness and Irishness in New Zealand since 1840 By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.'},
   'translated-title': None},
  'work-type': 'BOOK_REVIEW'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'Journal of Historical Geography'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': {'value': '07'},
   'year': {'value': '2014'}},
  'put-code': '18655375',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{Beals_2014,doi = {10.1016/j.jhg.2014.05.007},url = {http://dx.doi.org/10.1016/j.jhg.2014.05.007},year = 2014,month = {Jul},publisher = {Elsevier BV},volume = {45},pages = {121-122},author = {M.H. Beals},title = {The American Idea of England, 1776$\\textendash$1840},journal = {Journal of Historical Geography}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1016/j.jhg.2014.05.007'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '0305-7488'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'The American Idea of England, 1776–1840'},
   'translated-title': None},
  'work-type': 'BOOK_REVIEW'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'Journal for Eighteenth-Century Studies'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2013'}},
  'put-code': '18655373',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{BEALS_2013, title={The Shaping of Scottish Identities: Family, Nation, and the Worlds Beyond. Edited by JODI A.CAMPBELL, ELIZABETHEWEN and HEATHERPARKER. Guelph, Ontario: Centre for Scottish Studies, University of Guelph. 2011. 263 p. £25 (hb). ISBN 978-0-8895-5589-1.}, volume={36}, url={http://dx.doi.org/10.1111/1754-0208.12012}, DOI={10.1111/1754-0208.12012}, number={3}, journal={Journal for Eighteenth-Century Studies}, publisher={Wiley Blackwell (Blackwell Publishing)}, author={BEALS, M. H.}, year={2013}, month={Sep}, pages={459-460}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1111/1754-0208.12012'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '1754-0194'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Journal for Eighteenth-Century Studies'},
   'title': {'value': 'The Shaping of Scottish Identities: Family, Nation, and the Worlds Beyond. Edited by Jodi A. Campbell, Elizabeth Ewen and Heather Parker. Guelph, Ontario: Centre for Scottish Studies, University of Guelph. 2011. 263 p. £25 (hb). ISBN 978-0-8895-5589-1.'},
   'translated-title': None},
  'work-type': 'BOOK_REVIEW'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'Journal of Historical Geography'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': {'value': '07'},
   'year': {'value': '2014'}},
  'put-code': '13361874',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{Beals_2014,doi = {10.1016/j.jhg.2014.05.007},url = {http://dx.doi.org/10.1016/j.jhg.2014.05.007},year = 2014,month = {Jul},publisher = {Elsevier BV},volume = {45},pages = {121-122},author = {M.H. Beals},title = {The American Idea of England, 1776$\\textendash$1840},journal = {Journal of Historical Geography}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': {'value': 'M.H. Beals', 'visibility': 'PUBLIC'}}]},
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1016/j.jhg.2014.05.007'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '0305-7488'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'The American Idea of England, 1776–1840'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '18350343',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@misc{datacite6ffd17ae-a304-4065-b61c-a86ba86adf67,\n  doi = {10.6084/M9.FIGSHARE.944593},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.944593},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {The Role of the Sydney Gazette in the Creation of Australia in the Scottish Public Sphere},\n  year = {2014}\n}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.944593'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0001-8099-6984',
   'uri': 'http://orcid.org/0000-0001-8099-6984',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'The Role of the Sydney Gazette in the Creation of Australia in the Scottish Public Sphere'},
   'translated-title': None},
  'work-type': 'DATA_SET'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '11857494',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': ' @article{BEALS_2014, title={Reading the Scottish Enlightenment: Books and Their Readers in Provincial Scotland, 1750-1820. By MARK TOWSEY. Leiden: Brill. 2010. 361 p. â\x82¬104 (hb). ISBN 978-90-04-18432-9.}, volume={37}, ISSN={1754-0194}, url={http://dx.doi.org/10.1111/1754-0208.12061}, DOI={10.1111/1754-0208.12061}, number={1}, journal={J 18th Cent Stud}, publisher={Wiley-Blackwell}, author={BEALS, M. H.}, year={2014}, month={Mar}, pages={122â\x80\x93123}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1111/1754-0208.12061'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '1754-0194'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'Journal for Eighteenth-Century Studies'},
   'title': {'value': 'Reading the Scottish Enlightenment: Books and Their Readers in Provincial Scotland, 1750-1820. By MARK TOWSEY. Leiden: Brill. 2010. 361 p. €104 (hb). ISBN 978-90-04-18432-9.'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '18350345',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@misc{datacite7a79b6aa-2a4a-4d91-b3b7-66839a34f7de,\n  doi = {10.6084/M9.FIGSHARE.1021491},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.1021491},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {Introduction to Digital Analysis Techniques},\n  year = {2014}\n}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.1021491'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0001-8099-6984',
   'uri': 'http://orcid.org/0000-0001-8099-6984',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'Introduction to Digital Analysis Techniques'},
   'translated-title': None},
  'work-type': 'DATA_SET'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2014'}},
  'put-code': '18350344',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': "@misc{datacite48186a25-89de-4495-bba7-90cb8790a966,\n  doi = {10.6084/M9.FIGSHARE.949624},\n  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.949624},\n  author = {M. H. Beals; },\n  publisher = {Figshare},\n  title = {'Passengers Wishing to Embrace This Commodious Conveyance, Will Apply Immediately': The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800-1830},\n  year = {2014}\n}",
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.6084/M9.FIGSHARE.949624'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0001-8099-6984',
   'uri': 'http://orcid.org/0000-0001-8099-6984',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': "'Passengers Wishing to Embrace This Commodious Conveyance, Will Apply Immediately': The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800-1830"},
   'translated-title': None},
  'work-type': 'DATA_SET'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2013'}},
  'put-code': '11345932',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{BEALS_2013, title={The Shaping of Scottish Identities: Family, Nation, and the Worlds Beyond. Edited by JODI A.CAMPBELL, ELIZABETHEWEN and HEATHERPARKER. Guelph, Ontario: Centre for Scottish Studies, University of Guelph. 2011. 263 p. £25 (hb). ISBN 978-0-8895-5589-1.}, volume={36}, url={http://dx.doi.org/10.1111/1754-0208.12012}, DOI={10.1111/1754-0208.12012}, number={3}, journal={Journal for Eighteenth-Century Studies}, publisher={Wiley Blackwell (Blackwell Publishing)}, author={BEALS, M. H.}, year={2013}, month={Sep}, pages={459-460}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1111/1754-0208.12012'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '1754-0194'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'Journal for Eighteenth-Century Studies'},
   'title': {'value': 'The Shaping of Scottish Identities: Family, Nation, and the Worlds Beyond. Edited by JODI A.CAMPBELL, ELIZABETHEWEN and HEATHERPARKER. Guelph, Ontario: Centre for Scottish Studies, University of Guelph. 2011. 263 p. £25 (hb). ISBN 978-0-8895-5589-1.'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2013'}},
  'put-code': '11345942',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{Beals_2013, title={Rapunzel and the Ivory Tower: How Open Access Will Save the Humanities (from Themselves)}, volume={18}, url={http://dx.doi.org/10.1080/13555502.2013.865977}, DOI={10.1080/13555502.2013.865977}, number={4}, journal={Journal of Victorian Culture}, publisher={Informa UK (Taylor & Francis)}, author={Beals, M. H.}, year={2013}, month={Dec}, pages={543-550}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1080/13555502.2013.865977'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '1355-5502'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'Journal of Victorian Culture'},
   'title': {'value': 'Rapunzel and the Ivory Tower: How Open Access Will Save the Humanities (from Themselves)'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2012'}},
  'put-code': '11345930',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@article{Beals_2012, title={              Scottishness and Irishness in New Zealand since 1840              By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.            }, volume={91}, url={http://dx.doi.org/10.3366/shr.2012.0131}, DOI={10.3366/shr.2012.0131}, number={2}, journal={Scottish Historical Review}, publisher={Edinburgh University Press}, author={Beals, M. H.}, year={2012}, month={Oct}, pages={382-383}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '0036-9241'},
     'work-external-identifier-type': 'ISSN'},
    {'work-external-identifier-id': {'value': '10.3366/shr.2012.0131'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'Scottish Historical Review'},
   'title': {'value': 'Scottishness and Irishness in New Zealand since 1840 By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': None,
  'created-date': None,
  'journal-title': {'value': 'British Identities since 1707'},
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': {'value': '08'},
   'year': {'value': '2011'}},
  'put-code': '20196568',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': {'citation': '@book{Beals_2011,doi = {10.3726/978-3-0353-0113-7},url = {http://dx.doi.org/10.3726/978-3-0353-0113-7},year = 2011,month = {aug},publisher = {Peter Lang {AG}, Internationaler Verlag der Wissenschaften},author = {Melodee Beals},title = {Coin, Kirk, Class and Kin}}',
   'work-citation-type': 'BIBTEX'},
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': {'value': 'Melodee Beals', 'visibility': 'PUBLIC'}}]},
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.3726/978-3-0353-0113-7'},
     'work-external-identifier-type': 'DOI'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'Emigration, Social Change and Identity in Southern Scotland'},
   'title': {'value': 'Coin, Kirk, Class and Kin'},
   'translated-title': None},
  'work-type': 'BOOK'},
 {'country': {'value': 'GB', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': {'value': 'Historical Insights: Focus on Research'},
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2011'}},
  'put-code': '11346307',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': {'host': 'orcid.org',
      'path': 'null',
      'uri': 'http://orcid.org/null',
      'value': None},
     'credit-name': None}]},
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '9780956688330'},
     'work-external-identifier-type': 'ISBN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'Newspapers'},
   'translated-title': None},
  'work-type': 'REPORT'},
 {'country': {'value': 'GB', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': {'value': 'Journal of Irish and Scottish Studies'},
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2009'}},
  'put-code': '11913510',
  'short-description': None,
  'source': None,
  'url': {'value': 'http://www.abdn.ac.uk/riiss/content-images/JISSv3.1_OpenAccess.pdf#page=170'},
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': None,
      'contributor-sequence': 'FIRST'},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': None}]},
  'work-external-identifiers': None,
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'Transatlantic Networks and Identities in the British-American Tobacco Trade, 1740-1841'},
   'title': {'value': 'The Sojourning Settler'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': {'value': 'GB', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': {'value': 'University of Glasgow'},
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2009'}},
  'put-code': '11346304',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': None}]},
  'work-external-identifiers': None,
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': None,
   'title': {'value': 'Perceptions of emigration in southern Scotland, c1770-c1830'},
   'translated-title': None},
  'work-type': 'DISSERTATION'},
 {'country': None,
  'created-date': None,
  'journal-title': None,
  'language-code': None,
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2008'}},
  'put-code': '11771776',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': None,
  'work-external-identifiers': {'scope': None,
   'work-external-identifier': [{'work-external-identifier-id': {'value': '10.1179/jrl.2008.4.1.21'},
     'work-external-identifier-type': 'DOI'},
    {'work-external-identifier-id': {'value': '2051-4530'},
     'work-external-identifier-type': 'ISSN'}]},
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-3054-1567',
   'uri': 'http://orcid.org/0000-0002-3054-1567',
   'value': None},
  'work-title': {'subtitle': {'value': 'International Journal of Regional and Local History'},
   'title': {'value': '‘Passengers Wishing to Embrace this Commodious Conveyance, Will Apply Immediately’: The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800–1830'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'},
 {'country': {'value': 'US', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': {'value': 'Clark University'},
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2005'}},
  'put-code': '11346303',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': None}]},
  'work-external-identifiers': None,
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'National, Familial, and Commercial Identity in the British Atlantic World, 1740-1840'},
   'title': {'value': 'Thinning Acquaintances'},
   'translated-title': None},
  'work-type': 'DISSERTATION'},
 {'country': {'value': 'CA', 'visibility': 'PUBLIC'},
  'created-date': None,
  'journal-title': {'value': 'International Review of Scottish Studies'},
  'language-code': 'en',
  'last-modified-date': None,
  'publication-date': {'day': None,
   'media-type': None,
   'month': None,
   'year': {'value': '2005'}},
  'put-code': '11346302',
  'short-description': None,
  'source': None,
  'url': None,
  'visibility': 'PUBLIC',
  'work-citation': None,
  'work-contributors': {'contributor': [{'contributor-attributes': {'contributor-role': 'AUTHOR',
      'contributor-sequence': None},
     'contributor-email': None,
     'contributor-orcid': None,
     'credit-name': None}]},
  'work-external-identifiers': None,
  'work-source': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'work-title': {'subtitle': {'value': 'The Scotch-American Company of Farmers (SACF) and Scottish Cultural Identity in Colonial New England'},
   'title': {'value': 'Caledonian Canaan'},
   'translated-title': None},
  'work-type': 'JOURNAL_ARTICLE'}]
 orcid_data['orcid-profile']['orcid-bio'] contains the bio info

In [9]:
def dic_item(item):
    dobj={}
    if item['work-external-identifiers'] and item['work-citation']:
        doi = item['work-external-identifiers']['work-external-identifier'][0]['work-external-identifier-id']['value']
        dobj['cite'] = item['work-citation']['citation']
        dobj['url'] = item['url']
        dobj['journal'] = item['journal-title']
        return doi, dobj,
    else:
        return None, None

d = {}
for n,item in enumerate(works):
    doi, tmp_d =  dic_item(item)
    if doi:
        print(n, doi)
        d[doi] = tmp_d


0 10.5281/zenodo.33682
2 10.6084/M9.FIGSHARE.949624
3 10.6084/M9.FIGSHARE.1021491
4 10.6084/M9.FIGSHARE.944593
5 10.1111/1754-0208.12061
6 0036-9241
7 10.1016/j.jhg.2014.05.007
8 10.1111/1754-0208.12012
9 10.1016/j.jhg.2014.05.007
10 10.6084/M9.FIGSHARE.944593
11 10.1111/1754-0208.12061
12 10.6084/M9.FIGSHARE.1021491
13 10.6084/M9.FIGSHARE.949624
14 10.1111/1754-0208.12012
15 10.1080/13555502.2013.865977
16 0036-9241
17 10.3726/978-3-0353-0113-7

In [10]:
for item in d.values():
    if item:
        print(item['cite'],'\n')
    else:
        pass


@misc{datacite48186a25-89de-4495-bba7-90cb8790a966,
  doi = {10.6084/M9.FIGSHARE.949624},
  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.949624},
  author = {M. H. Beals; },
  publisher = {Figshare},
  title = {'Passengers Wishing to Embrace This Commodious Conveyance, Will Apply Immediately': The Rise in Emigrant Passage Advertising in the Scottish Borders, 1800-1830},
  year = {2014}
} 

@article{BEALS_2013, title={The Shaping of Scottish Identities: Family, Nation, and the Worlds Beyond. Edited by JODI A.CAMPBELL, ELIZABETHEWEN and HEATHERPARKER. Guelph, Ontario: Centre for Scottish Studies, University of Guelph. 2011. 263 p. £25 (hb). ISBN 978-0-8895-5589-1.}, volume={36}, url={http://dx.doi.org/10.1111/1754-0208.12012}, DOI={10.1111/1754-0208.12012}, number={3}, journal={Journal for Eighteenth-Century Studies}, publisher={Wiley Blackwell (Blackwell Publishing)}, author={BEALS, M. H.}, year={2013}, month={Sep}, pages={459-460}} 

 @article{BEALS_2014, title={Reading the Scottish Enlightenment: Books and Their Readers in Provincial Scotland, 1750-1820. By MARK TOWSEY. Leiden: Brill. 2010. 361 p. €104 (hb). ISBN 978-90-04-18432-9.}, volume={37}, ISSN={1754-0194}, url={http://dx.doi.org/10.1111/1754-0208.12061}, DOI={10.1111/1754-0208.12061}, number={1}, journal={J 18th Cent Stud}, publisher={Wiley-Blackwell}, author={BEALS, M. H.}, year={2014}, month={Mar}, pages={122–123}} 

@book{Beals_2011,doi = {10.3726/978-3-0353-0113-7},url = {http://dx.doi.org/10.3726/978-3-0353-0113-7},year = 2011,month = {aug},publisher = {Peter Lang {AG}, Internationaler Verlag der Wissenschaften},author = {Melodee Beals},title = {Coin, Kirk, Class and Kin}} 

M. H. Beals Scissors and Paste Core Dataset and Derived Data v1.0.0. (Zenodo, 2015). DOI:10.5281/zenodo.33682 

@misc{datacite6ffd17ae-a304-4065-b61c-a86ba86adf67,
  doi = {10.6084/M9.FIGSHARE.944593},
  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.944593},
  author = {M. H. Beals; },
  publisher = {Figshare},
  title = {The Role of the Sydney Gazette in the Creation of Australia in the Scottish Public Sphere},
  year = {2014}
} 

@article{Beals_2014,doi = {10.1016/j.jhg.2014.05.007},url = {http://dx.doi.org/10.1016/j.jhg.2014.05.007},year = 2014,month = {Jul},publisher = {Elsevier BV},volume = {45},pages = {121-122},author = {M.H. Beals},title = {The American Idea of England, 1776$\textendash$1840},journal = {Journal of Historical Geography}} 

@misc{datacite7a79b6aa-2a4a-4d91-b3b7-66839a34f7de,
  doi = {10.6084/M9.FIGSHARE.1021491},
  url = {http://dx.doi.org/10.6084/M9.FIGSHARE.1021491},
  author = {M. H. Beals; },
  publisher = {Figshare},
  title = {Introduction to Digital Analysis Techniques},
  year = {2014}
} 

@article{Beals_2012, title={              Scottishness and Irishness in New Zealand since 1840              By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.            }, volume={91}, url={http://dx.doi.org/10.3366/shr.2012.0131}, DOI={10.3366/shr.2012.0131}, number={2}, journal={Scottish Historical Review}, publisher={Edinburgh University Press}, author={Beals, M. H.}, year={2012}, month={Oct}, pages={382-383}} 

@article{Beals_2013, title={Rapunzel and the Ivory Tower: How Open Access Will Save the Humanities (from Themselves)}, volume={18}, url={http://dx.doi.org/10.1080/13555502.2013.865977}, DOI={10.1080/13555502.2013.865977}, number={4}, journal={Journal of Victorian Culture}, publisher={Informa UK (Taylor & Francis)}, author={Beals, M. H.}, year={2013}, month={Dec}, pages={543-550}} 


In [12]:
#from pybtex.database.input import bibtex

In [15]:
d['0036-9241']


Out[15]:
{'cite': '@article{Beals_2012, title={              Scottishness and Irishness in New Zealand since 1840              By Angela McCarthy. Pp. xvi, 235. ISBN: 97800719077616. Manchester: Manchester University Press, 2011. £60.00.            }, volume={91}, url={http://dx.doi.org/10.3366/shr.2012.0131}, DOI={10.3366/shr.2012.0131}, number={2}, journal={Scottish Historical Review}, publisher={Edinburgh University Press}, author={Beals, M. H.}, year={2012}, month={Oct}, pages={382-383}}',
 'journal': None,
 'url': None}

In [23]:
import logging
logging.basicConfig(level=logging.DEBUG)

In [24]:
def _get_raw_json(url):
    """Get raw JSON file for orcid_id."""
    #url = orcid_url(orcid_id)
    url = "https://pub.orcid.org/0000-0002-2907-3313"
    logging.info(url)
    resp = requests.get(url,
                        headers={'Accept':'application/orcid+json'})

    return resp.json()

auth_raw = _get_raw_json(url)

In [27]:
auth_raw


Out[27]:
{'error-desc': None,
 'message-version': '1.1',
 'orcid-profile': {'client-type': None,
  'group-type': None,
  'orcid': None,
  'orcid-activities': {'affiliations': None,
   'funding-list': None,
   'orcid-works': None},
  'orcid-bio': {'biography': {'value': 'I am a Lecturer in Digital History at the Department of Politics, History and International Relations at Loughborough University. The main focus of my research and publication has been Scottish emigration, including both settlement communities and those who remained in Scotland, and I am particularly interested in the role of newspapers in public perceptions of demography and migration. \n\nMy current research project is Here and There, Us and Them: Migration and the Public Sphere before Telegraphy. Using newspapers, literary magazines and other public documents, this project explores public perceptions of identity at the start of the second British Empire and the relationship between demographic and economic pressures and cultural identity within the Anglophone world. It aims to trace the composition, reprinting, abridgement and paraphrasing of newspaper content as it travelled along periodical dissemination networks.\n\n In my search for a more perfect understanding of past migrations, I have come to believe that those models that have been developed throughout the humanities and social sciences to describe modern globalisation can and should be used to understand the social, cultural and economic networks of the past. More importantly, should these models contradict historical evidence, this must be fed back to practitioners in other fields in order to better refine our collective knowledge. To promote a more collaborative research community, I am an ardent supporter of social media for academic purposes and am happy to discuss my research and teaching through the various networks with which I am affiliated.',
    'visibility': 'PUBLIC'},
   'contact-details': {'address': {'country': {'value': 'GB',
      'visibility': 'PUBLIC'}},
    'email': [{'current': True,
      'primary': True,
      'source': '0000-0002-2907-3313',
      'source-client-id': None,
      'value': 'm.h.beals@lboro.ac.uk',
      'verified': True,
      'visibility': 'PUBLIC'}]},
   'delegation': None,
   'external-identifiers': None,
   'keywords': {'keyword': [{'value': 'British North America'},
     {'value': 'Digital History'},
     {'value': 'History'},
     {'value': 'Media History'},
     {'value': 'Migration'},
     {'value': 'Newspapers'},
     {'value': 'Scotland'},
     {'value': 'United States of America'}],
    'visibility': 'PUBLIC'},
   'personal-details': {'credit-name': {'value': 'M. H. Beals',
     'visibility': 'PUBLIC'},
    'family-name': {'value': 'Beals', 'visibility': None},
    'given-names': {'value': 'Melodee', 'visibility': None},
    'other-names': {'other-name': [{'value': 'Melodee Beals'},
      {'value': 'Melodee Helene Beals'}],
     'visibility': 'PUBLIC'}},
   'researcher-urls': {'researcher-url': [{'url': {'value': 'http://www.lboro.ac.uk/departments/phir/staff/melodee-beals-.html'},
      'url-name': {'value': 'Departmental Profile'}},
     {'url': {'value': 'http://www.mhbeals.com/research'},
      'url-name': {'value': 'Research Blog'}},
     {'url': {'value': 'http://www.mhbeals.com/teaching'},
      'url-name': {'value': 'Teaching Blog'}},
     {'url': {'value': 'http://www.scissorsandpaste.net'},
      'url-name': {'value': 'Scissors & Paste Database'}}],
    'visibility': 'PUBLIC'},
   'scope': None},
  'orcid-deprecated': None,
  'orcid-history': {'claimed': {'value': True},
   'completion-date': {'value': 1360435410087},
   'creation-method': 'WEBSITE',
   'deactivation-date': None,
   'last-modified-date': {'value': 1456991236292},
   'source': None,
   'submission-date': {'value': 1360327402445},
   'verified-email': None,
   'verified-primary-email': None,
   'visibility': None},
  'orcid-id': None,
  'orcid-identifier': {'host': 'orcid.org',
   'path': '0000-0002-2907-3313',
   'uri': 'http://orcid.org/0000-0002-2907-3313',
   'value': None},
  'orcid-internal': None,
  'orcid-preferences': {'locale': 'EN'},
  'type': 'USER'},
 'orcid-search-results': None}

In [26]:
def get_json(orcid_id):
    """Get JSON for Orcid and clean it."""
    raw_json = _get_raw_json(orcid_id)

    # TODO Add information
    myjson = {
            "given_names":
            raw_json.get("orcid-profile").get("orcid-bio").get("personal-details").get("given-names").get("value"),
            "family_name":
            raw_json.get("orcid-profile").get("orcid-bio").get("personal-details").get("family-name").get("value"),
            "affiliation": None,
            "summary": None,
            "doiurl": None,
            "title": None,
            "gravatarhash": None,
            }

    return myjson

In [94]:
bio = auth_raw.get('orcid-profile').get('orcid-bio').get('biography').get('value')


Out[94]:
'I am a Lecturer in Digital History at the Department of Politics, History and International Relations at Loughborough University. The main focus of my research and publication has been Scottish emigration, including both settlement communities and those who remained in Scotland, and I am particularly interested in the role of newspapers in public perceptions of demography and migration. \n\nMy current research project is Here and There, Us and Them: Migration and the Public Sphere before Telegraphy. Using newspapers, literary magazines and other public documents, this project explores public perceptions of identity at the start of the second British Empire and the relationship between demographic and economic pressures and cultural identity within the Anglophone world. It aims to trace the composition, reprinting, abridgement and paraphrasing of newspaper content as it travelled along periodical dissemination networks.\n\n In my search for a more perfect understanding of past migrations, I have come to believe that those models that have been developed throughout the humanities and social sciences to describe modern globalisation can and should be used to understand the social, cultural and economic networks of the past. More importantly, should these models contradict historical evidence, this must be fed back to practitioners in other fields in order to better refine our collective knowledge. To promote a more collaborative research community, I am an ardent supporter of social media for academic purposes and am happy to discuss my research and teaching through the various networks with which I am affiliated.'

In [42]:
auth_raw.get('email')

In [82]:
auth_raw['orcid-profile']['orcid-bio']


Out[82]:
{'biography': {'value': 'I am a Lecturer in Digital History at the Department of Politics, History and International Relations at Loughborough University. The main focus of my research and publication has been Scottish emigration, including both settlement communities and those who remained in Scotland, and I am particularly interested in the role of newspapers in public perceptions of demography and migration. \n\nMy current research project is Here and There, Us and Them: Migration and the Public Sphere before Telegraphy. Using newspapers, literary magazines and other public documents, this project explores public perceptions of identity at the start of the second British Empire and the relationship between demographic and economic pressures and cultural identity within the Anglophone world. It aims to trace the composition, reprinting, abridgement and paraphrasing of newspaper content as it travelled along periodical dissemination networks.\n\n In my search for a more perfect understanding of past migrations, I have come to believe that those models that have been developed throughout the humanities and social sciences to describe modern globalisation can and should be used to understand the social, cultural and economic networks of the past. More importantly, should these models contradict historical evidence, this must be fed back to practitioners in other fields in order to better refine our collective knowledge. To promote a more collaborative research community, I am an ardent supporter of social media for academic purposes and am happy to discuss my research and teaching through the various networks with which I am affiliated.',
  'visibility': 'PUBLIC'},
 'contact-details': {'address': {'country': {'value': 'GB',
    'visibility': 'PUBLIC'}},
  'email': [{'current': True,
    'primary': True,
    'source': '0000-0002-2907-3313',
    'source-client-id': None,
    'value': 'm.h.beals@lboro.ac.uk',
    'verified': True,
    'visibility': 'PUBLIC'}]},
 'delegation': None,
 'external-identifiers': None,
 'keywords': {'keyword': [{'value': 'British North America'},
   {'value': 'Digital History'},
   {'value': 'History'},
   {'value': 'Media History'},
   {'value': 'Migration'},
   {'value': 'Newspapers'},
   {'value': 'Scotland'},
   {'value': 'United States of America'}],
  'visibility': 'PUBLIC'},
 'personal-details': {'credit-name': {'value': 'M. H. Beals',
   'visibility': 'PUBLIC'},
  'family-name': {'value': 'Beals', 'visibility': None},
  'given-names': {'value': 'Melodee', 'visibility': None},
  'other-names': {'other-name': [{'value': 'Melodee Beals'},
    {'value': 'Melodee Helene Beals'}],
   'visibility': 'PUBLIC'}},
 'researcher-urls': {'researcher-url': [{'url': {'value': 'http://www.lboro.ac.uk/departments/phir/staff/melodee-beals-.html'},
    'url-name': {'value': 'Departmental Profile'}},
   {'url': {'value': 'http://www.mhbeals.com/research'},
    'url-name': {'value': 'Research Blog'}},
   {'url': {'value': 'http://www.mhbeals.com/teaching'},
    'url-name': {'value': 'Teaching Blog'}},
   {'url': {'value': 'http://www.scissorsandpaste.net'},
    'url-name': {'value': 'Scissors & Paste Database'}}],
  'visibility': 'PUBLIC'},
 'scope': None}

In [69]:
auth.get("orcid-profile").get("orcid-bio").get("personal-details").get("given-names")


Out[69]:
{'value': 'Melodee', 'visibility': None}

In [108]:
email = auth_raw.get("orcid-profile").get("orcid-bio").get("contact-details").get("email")[0].get("value").lower().strip()

In [79]:
first_name = auth_raw.get("orcid-profile").get("orcid-bio").get("personal-details").get("given-names").get("value")

In [89]:
" ".join(["one","two"])


Out[89]:
'one two'

In [105]:
test = " aa@aa.com "

In [106]:
test.strip()


Out[106]:
'aa@aa.com'

In [109]:
email


Out[109]:
'm.h.beals@lboro.ac.uk'

In [97]:
import hashlib

In [101]:
import hashlib
gravatarhash = hashlib.md5(email.encode('utf-8')).hexdigest()


Out[101]:
'82b4d22865fcd47198ac2bd283b3f08e'

In [ ]:


In [13]:
#import re
orcid = '999-999-999-999'
if len(orcid) is not 23:
    None
    return render_template('sample.html',
                           feedback={
                           "title": 'Sorry page can\'t be created: ',
                           "details": 'ORCID provided is not correct length'})


  File "<ipython-input-13-72fe1d263350>", line 5
    return render_template('sample.html',
    ^
SyntaxError: 'return' outside function

In [ ]:


In [ ]: