How to get "also known as" field
tbright17 opened this issue · comments
tbright17 commented
As in title, is there a way to get the "also known as" field in wikidata?
Thanks
njucsxh commented
As in title, is there a way to get the "also known as" field in wikidata?
Thanks
from wikidata.client import Client
client = Client()
entity = client.get('Q20145', load=True)
entity.attribute['aliases']['en']#get english “also know as”
Hong Minhee (洪 民憙) commented
As @cdhx answered, there is the Entity.attributes
attribute which has the entire raw data. As of now, you could get “also known as” field through entity.attributes['aliases']
.
However, it would be better if we have an attribute/property like Entity.aliases
.