Can be extracted with a simple regular expression, as long as the text file is in the same format as the Python log output you posted (Returns all of them):
import re
file="".join([i for i in open("yourfileinthesamefolder.txt")])
serials=re.findall("u'serial_number': u'(.+)'",file)
print(serials)
I suggest reading up on how to use regular expressions in Python:
solved Python – Read string from log file