Skip to content

Commit

Permalink
Fix instagram stories (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
amadejkastelic authored Nov 29, 2024
1 parent 9fd7f4d commit 1864fed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bot/integrations/instagram/aiograpi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ async def _get_story(self, url: str, pk: str) -> domain.Post:

post = domain.Post(
url=url,
author=story_info.user.username,
author=story_info.user.username or story_info.user.full_name,
created=story_info.taken_at,
)

Expand All @@ -106,5 +106,7 @@ async def _get_story(self, url: str, pk: str) -> domain.Post:
url=str(media_info.video_url or media_info.image_versions2['candidates'][0]['url']),
cookies=self.client.cookie_dict,
)
elif story_info.thumbnail_url:
post.buffer = await self._download(url=str(story_info.thumbnail_url), cookies=self.client.cookie_dict)

return post

0 comments on commit 1864fed

Please sign in to comment.