Skip to content

Commit ed1a8a3

Browse files
committed
link sticker [#463] Small fixes for StoryBuilder
1 parent 166a456 commit ed1a8a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

instagrapi/story.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import tempfile
2-
from urllib.parse import urlparse
32
from pathlib import Path
43
from typing import List
4+
from urllib.parse import urlparse
55

66
from .types import StoryBuild, StoryMention, StorySticker
77

@@ -137,17 +137,17 @@ def build_main(self, clip, max_duration: int = 0, font: str = 'Arial', fontsize:
137137
)
138138
link_sticker = StorySticker(
139139
# x=160.0, y=641.0, z=0, width=400.0, height=88.0,
140-
x=link_clip_left / self.width, # e.g. 0.49953705
141-
y=link_clip_top / self.height, # e.g. 0.5
140+
x=round(link_clip_left / self.width, 7), # e.g. 0.49953705
141+
y=round(link_clip_top / self.height, 7), # e.g. 0.5
142142
z=0,
143-
width=link_clip.size[0] / self.width, # e.g. 0.50912
144-
height=link_clip.size[1] / self.height, # e.g. 0.06875
143+
width=round(link_clip.size[0] / self.width, 7), # e.g. 0.50912
144+
height=round(link_clip.size[1] / self.height, 7), # e.g. 0.06875
145145
rotation=0.0,
146146
# id="link_sticker_default",
147147
type="story_link",
148148
extra=dict(
149149
link_type="web",
150-
url=link, # e.g. "https//github.com/"
150+
url=str(link), # e.g. "https//github.com/"
151151
tap_state_str_id="link_sticker_default",
152152
)
153153
)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
setup(
3232
name='instagrapi',
33-
version='1.16.6',
33+
version='1.16.7',
3434
author='Mikhail Andreev',
3535
author_email='[email protected]',
3636
license='MIT',

0 commit comments

Comments
 (0)