Skip to content

Commit

Permalink
link sticker [#463] Small fixes for StoryBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
adw0rd committed Dec 26, 2021
1 parent 166a456 commit ed1a8a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions instagrapi/story.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import tempfile
from urllib.parse import urlparse
from pathlib import Path
from typing import List
from urllib.parse import urlparse

from .types import StoryBuild, StoryMention, StorySticker

Expand Down Expand Up @@ -137,17 +137,17 @@ def build_main(self, clip, max_duration: int = 0, font: str = 'Arial', fontsize:
)
link_sticker = StorySticker(
# x=160.0, y=641.0, z=0, width=400.0, height=88.0,
x=link_clip_left / self.width, # e.g. 0.49953705
y=link_clip_top / self.height, # e.g. 0.5
x=round(link_clip_left / self.width, 7), # e.g. 0.49953705
y=round(link_clip_top / self.height, 7), # e.g. 0.5
z=0,
width=link_clip.size[0] / self.width, # e.g. 0.50912
height=link_clip.size[1] / self.height, # e.g. 0.06875
width=round(link_clip.size[0] / self.width, 7), # e.g. 0.50912
height=round(link_clip.size[1] / self.height, 7), # e.g. 0.06875
rotation=0.0,
# id="link_sticker_default",
type="story_link",
extra=dict(
link_type="web",
url=link, # e.g. "https//github.com/"
url=str(link), # e.g. "https//github.com/"
tap_state_str_id="link_sticker_default",
)
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

setup(
name='instagrapi',
version='1.16.6',
version='1.16.7',
author='Mikhail Andreev',
author_email='[email protected]',
license='MIT',
Expand Down

0 comments on commit ed1a8a3

Please sign in to comment.