Add Post.accessibility_caption property
This commit is contained in:
parent
5d18857695
commit
a23b832a69
@ -397,6 +397,16 @@ class Post:
|
|||||||
return (pcaption[:30] + u"\u2026") if len(pcaption) > 31 else pcaption
|
return (pcaption[:30] + u"\u2026") if len(pcaption) > 31 else pcaption
|
||||||
return _elliptify(self.caption) if self.caption else ''
|
return _elliptify(self.caption) if self.caption else ''
|
||||||
|
|
||||||
|
@property
|
||||||
|
def accessibility_caption(self) -> Optional[str]:
|
||||||
|
"""Accessibility caption of the post, if available.
|
||||||
|
|
||||||
|
.. versionadded:: 4.9"""
|
||||||
|
try:
|
||||||
|
return self._field("accessibility_caption")
|
||||||
|
except KeyError:
|
||||||
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def tagged_users(self) -> List[str]:
|
def tagged_users(self) -> List[str]:
|
||||||
"""List of all lowercased users that are tagged in the Post."""
|
"""List of all lowercased users that are tagged in the Post."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user