MarshalX / atproto

The AT Protocol (🦋 Bluesky) SDK for Python 🐍
https://atproto.blue
MIT License
278 stars 30 forks source link

Parsing Alt Text #284

Closed git-scott closed 7 months ago

git-scott commented 7 months ago

Hi, sorry for the novice question but I’m struggling to work out how to access alt-text for embedded images in posts. How is this done, assuming there may be multiple images’ text to parse per post.

Thanks

MarshalX commented 7 months ago

Hi, in data_filter.py line no 22 you can add this one:

if post_with_images:
    for image in record.embed.images:
        print('Alt:', image.alt)
git-scott commented 7 months ago

Thanks very much!