fork download
  1. dados_recuperados = [{'Title': b'\xfe\xff\x00C\x00O\x00M\x00I\x00S\x00S\x00\xc3\x00O', 'Author': b'Ivanete de Araujo Costa', 'Subject': b'EMD ADI - Emenda Aditiva', 'Creator': b'\xfe\xff\x00M\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00\xae\x00 \x00W\x00o\x00r\x00d\x00 \x002\x000\x001\x000', 'CreationDate': b"D:20170314114321-07'00'", 'ModDate': b"D:20170314114321-07'00'", 'Producer': b'\xfe\xff\x00M\x00i\x00c\x00r\x00o\x00s\x00o\x00f\x00t\x00\xae\x00 \x00W\x00o\x00r\x00d\x00 \x002\x000\x001\x000'}]
  2.  
  3. dados_recuperados = dados_recuperados[0]
  4.  
  5. def decode_str(string):
  6. return string.decode("utf8")
  7.  
  8. author = decode_str(dados_recuperados.get("Author"))
  9. subject = decode_str(dados_recuperados.get("Subject"))
  10. creation_date = decode_str(dados_recuperados.get("CreationDate"))
  11. mod_date = decode_str(dados_recuperados.get("ModDate"))
  12.  
  13. print(author)
  14. print(subject)
  15. print(creation_date)
  16. print(mod_date)
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
Ivanete de Araujo Costa
EMD ADI - Emenda Aditiva
D:20170314114321-07'00'
D:20170314114321-07'00'