From ed1a8a301097d811a55e036774a61d6c4cab5224 Mon Sep 17 00:00:00 2001 From: "Mikhail Andreev (adw0rd)" Date: Sun, 26 Dec 2021 17:11:17 +0100 Subject: [PATCH] link sticker [#463] Small fixes for StoryBuilder --- instagrapi/story.py | 12 ++++++------ setup.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/instagrapi/story.py b/instagrapi/story.py index ec236e1b..51538862 100644 --- a/instagrapi/story.py +++ b/instagrapi/story.py @@ -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 @@ -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", ) ) diff --git a/setup.py b/setup.py index 6cc0b4f6..79be19a9 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name='instagrapi', - version='1.16.6', + version='1.16.7', author='Mikhail Andreev', author_email='x11org@gmail.com', license='MIT',