如果我像这样使用 vobject 导入 vcard:
with open(some_file_containing_a_vcard,
"r" , encoding="utf-8") as fd:
vcard_content = vobject.readOne(fd.read(),
ignoreUnreadable=True)
如果电子卡提供多个电话号码或电子邮件,我如何获得所有电话号码或电子邮件?
我只发现:
vcard_content.tel.value
vcard_content.email.value
...但这仅返回每个中的第一个。
当我深入研究代码时,似乎实体是作为类创建的。因此,vcard 的属性“TEL”被创建为“tel”。如果我有手机和工作电话号码怎么办?
我完全被困住了:-)