Skip to content Skip to sidebar Skip to footer

Reading Protobuf In Python. Extracting Data

I am trying to work with data from spinn3r. The data is returned as a protobuf. In python, when I print the protobuf object, I get this: print data source { link { href: ''

Solution 1:

It looks like u.feed_entry.author is a list. Note the square brackets:

[<spinn3rApi_pb2.Author object at 0x362e6d0>]

This should solve your problem (assuming you have at least one author):

print data.feed_entry.author[0].name

Post a Comment for "Reading Protobuf In Python. Extracting Data"