Forming a dictionary where all values are only conditionally set I have lots of dictionary keys with conditional values, ternary in this case:

# cover page 
data_coverPage.append({'reportCalendarOrQuarter': coverPage.reportcalendarorquarter.string if coverPage.reportcalendarorquarter else "N/A",
            'filingManager_name': coverPage.filingmanager.find_all('name')[0].text if coverPage.filingmanager.find_all('name') else "N/A",
            'filingManager_street1': coverPage.find('com:street1').string if coverPage.find('com:street1') else "N/A",
            'filingManager_city': coverPage.filingmanager.find('com:city').text if coverPage.filingmanager.find('com:city') else "N/A",
            'filingManager_stateOrCountry': coverPage.filingmanager.find('com:stateorcountry').text if coverPage.filingmanager.find('com:stateorcountry') else "N/A",
            'filingManager_zipCode': coverPage.filingmanager.find('com:zipcode').text if coverPage.filingmanager.find('com:zipcode') else "N/A",
            'reportType': coverPage.reporttype.string if coverPage.reporttype else "N/A",
            'form13FFileNumber': coverPage.form13ffilenumber.string if coverPage.form13ffilenumber else "N/A",
            'provideInfoForInstruction5': coverPage.provideinfoforinstruction5.text if coverPage.provideinfoforinstruction5 else "N/A"
            })

data.append(data_coverPage)
# print data

# info tables
for it in bf.find_all('infotable'):
    # print it.nameofissuer.text
    data_infoTable.append({'nameOfIssuer': it.nameofissuer.text if it.nameofissuer else "N/A",
                 'titleOfClass': it.titleofclass.text if it.titleofclass else "N/A",
                 'cusip': it.cusip.text if it.cusip else "N/A",
                 'value': it.value.text if it.value else "N/A",
                 'sshPrnamt': it.shrsorprnamt.sshprnamt.text if it.shrsorprnamt else "N/A",
                 'sshPrnamtType': it.shrsorprnamt.sshprnamttype.text if it.shrsorprnamt.sshprnamttype else "N/A",
                 'investmentDiscretion': it.investmentdiscretion.text if it.investmentdiscretion else "N/A",
                 'putCall': it.putCall.string if it.putCall else "N/A",
                 'otherManager': it.otherManager.string if it.otherManager else "N/A", 
                 'sole': it.votingauthority.sole.text if it.votingauthority.sole else "N/A",
                 'shared': it.votingauthority.shared.text if it.votingauthority.shared else "N/A",
                 'none': it.votingauthority.none.text if it.votingauthority.none else "N/A"})


Is there a much shorter way to represent so many conditional values? I'm repeating "else 'N/A'" throughout that block of code. I could store "N/A" with a variable and refer to that variable instead of the raw string. Other than that, how would I keep things essentially DRY in this situation?
The easiest thing to do, seeing how similar most of these are, would be to have a lambda for the ternary if.

gettext = lambda var: var.text if var else "N/A"
'titleOfClass' : gettext(it.titleofclass)


If you do one for .string as well, then you only have a few (3?) cases where your if cannot be shortened to a lambda call.  You could pass in another lambda to pull the value you want to store out of var, but for just three cases the added indirection doesn't seem useful.