diff --git a/instagrapi/extractors.py b/instagrapi/extractors.py index ab2b5cf8..c67df0c8 100644 --- a/instagrapi/extractors.py +++ b/instagrapi/extractors.py @@ -24,10 +24,10 @@ Resource, Story, StoryLink, - StoryMedia, - StoryMention, StoryLocation, StoryHashtag, + StoryMedia, + StoryMention, Track, User, UserShort, @@ -414,6 +414,7 @@ def extract_story_v1(data): story["links"].append(StoryLink(**link)) story["user"] = extract_user_short(story.get("user")) story["sponsor_tags"] = [tag["sponsor"] for tag in story.get("sponsor_tags", [])] + story["is_paid_partnership"] = story.get("is_paid_partnership") return Story(**story) diff --git a/instagrapi/types.py b/instagrapi/types.py index 123eb9a7..500db742 100644 --- a/instagrapi/types.py +++ b/instagrapi/types.py @@ -30,6 +30,16 @@ class Resource(TypesBaseModel): media_type: int +class BioLink(TypesBaseModel): + link_id: str + url: str + lynx_url: Optional[str] = None + link_type: Optional[str] = None + title: Optional[str] = None + is_pinned: Optional[bool] = None + open_external_url_with_in_app_browser: Optional[bool] = None + + class User(TypesBaseModel): pk: str username: str @@ -42,6 +52,7 @@ class User(TypesBaseModel): follower_count: int following_count: int biography: Optional[str] = "" + bio_links: List[BioLink] = [] external_url: Optional[str] = None account_type: Optional[int] = None is_business: bool @@ -244,6 +255,7 @@ class StoryHashtag(TypesBaseModel): height: Optional[float] = None rotation: Optional[float] = None + class StoryLocation(TypesBaseModel): location: Location x: Optional[float] = None @@ -295,6 +307,7 @@ class Story(TypesBaseModel): id: str code: str taken_at: datetime + imported_taken_at: Optional[datetime] = None media_type: int product_type: Optional[str] = "" thumbnail_url: Optional[HttpUrl] = None @@ -302,6 +315,7 @@ class Story(TypesBaseModel): video_url: Optional[HttpUrl] = None # for Video and IGTV video_duration: Optional[float] = 0.0 # for Video and IGTV sponsor_tags: List[UserShort] + is_paid_partnership: Optional[bool] mentions: List[StoryMention] links: List[StoryLink] hashtags: List[StoryHashtag] diff --git a/setup.py b/setup.py index b46c4efb..0f6391f3 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( name="instagrapi", - version="2.0.4", + version="2.1.0", author="Mark Subzeroid", author_email="143403577+subzeroid@users.noreply.github.com", license="MIT",