In [1]:

    from lxml import etree
    import requests
    import pandas as pd

In [2]:

    def getDCDataMMS(mms_id):
        cont=requests.get('https://obv-at-oenb.alma.exlibrisgroup.com/view/sru/43ACC_ONB?version=1.2&query=alma.mms_id='
                          + mms_id + '&startRecord=0&maximumRecords=1&operation=searchRetrieve&recordSchema=dc').content
        e = etree.XML(cont)
        namespaces = {
            'srw': 'http://www.loc.gov/zing/srw/',
            'srw_dc': 'info:srw/schema/1/dc-schema',
            'dc': 'http://purl.org/dc/elements/1.1/'
        }
        xpath = '/srw:searchRetrieveResponse/srw:records/srw:record/srw:recordData/srw_dc:dc/dc:{}/text()'

        titleResult = e.xpath(xpath.format('title'), namespaces=namespaces)
        title = "; ".join(titleResult) if titleResult else ''

        contributorResult = e.xpath(xpath.format('contributor'), namespaces=namespaces)
        contributor = "; ".join(contributorResult) if contributorResult else ''

        dateResult = e.xpath(xpath.format('date'), namespaces=namespaces)
        date = "; ".join(dateResult) if dateResult else ''
        return [title, contributor, date]

In [3]:

    getDCDataMMS(str(990048102650603338))

Out[3]:

    ['Sammlung der besten Reisebeschreibungen', '', '1784']

In [ ]: