Forming a dictionary where all values are only conditionally set
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.