Учитывая этот фрагмент XML:
Код: Выделить всё
Sebben:
This is the text of the interview.
Birdman:
That's correct.
Код: Выделить всё
Sebben:
This is the text of the interview.
Birdman:
That's correct.
Код: Выделить всё
interview = get_transcript(bn)
interviewer=""
date=""
location=""
transcript=""
if interview is not None:
interviewer = interview.get('interviewer')
date = interview.get('dateSingleRawTime')
location = interview.get('location')
transcript = interview
out = htmltemplate.substitute(title=title, interviewer=interviewer, date=date, location=location,
transcript=transcript)
Подробнее здесь: https://stackoverflow.com/questions/786 ... et-just-wh