marqetive-lib 0.1.15__py3-none-any.whl → 0.1.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- marqetive/platforms/instagram/client.py +45 -8
- marqetive/platforms/linkedin/client.py +10 -2
- marqetive/platforms/tiktok/client.py +3 -9
- {marqetive_lib-0.1.15.dist-info → marqetive_lib-0.1.17.dist-info}/METADATA +1 -1
- {marqetive_lib-0.1.15.dist-info → marqetive_lib-0.1.17.dist-info}/RECORD +6 -6
- {marqetive_lib-0.1.15.dist-info → marqetive_lib-0.1.17.dist-info}/WHEEL +0 -0
|
@@ -314,10 +314,17 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
314
314
|
if media_type_str in type_map:
|
|
315
315
|
return type_map[media_type_str]
|
|
316
316
|
|
|
317
|
-
# Auto-detect
|
|
317
|
+
# Auto-detect from URL extension and count
|
|
318
318
|
if len(request.media_urls) > 1:
|
|
319
319
|
return MediaType.CAROUSEL
|
|
320
320
|
|
|
321
|
+
# Check if single media is a video (should be treated as reel)
|
|
322
|
+
if request.media_urls:
|
|
323
|
+
url_lower = request.media_urls[0].lower()
|
|
324
|
+
video_extensions = (".mp4", ".mov", ".avi", ".webm", ".m4v")
|
|
325
|
+
if any(url_lower.endswith(ext) for ext in video_extensions):
|
|
326
|
+
return MediaType.REEL
|
|
327
|
+
|
|
321
328
|
return MediaType.IMAGE
|
|
322
329
|
|
|
323
330
|
async def _create_single_image_post(self, request: PostCreateRequest) -> Post:
|
|
@@ -360,7 +367,16 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
360
367
|
)
|
|
361
368
|
|
|
362
369
|
result = await self._media_manager.publish_container(container_ids[0])
|
|
363
|
-
|
|
370
|
+
|
|
371
|
+
# Return minimal Post object without fetching details
|
|
372
|
+
return Post(
|
|
373
|
+
post_id=result.media_id,
|
|
374
|
+
platform=self.platform_name,
|
|
375
|
+
content=request.content,
|
|
376
|
+
status=PostStatus.PUBLISHED,
|
|
377
|
+
created_at=datetime.now(),
|
|
378
|
+
url=cast(HttpUrl, result.permalink) if result.permalink else None,
|
|
379
|
+
)
|
|
364
380
|
|
|
365
381
|
async def _create_carousel_post(self, request: PostCreateRequest) -> Post:
|
|
366
382
|
"""Create a carousel post (2-10 images).
|
|
@@ -803,8 +819,15 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
803
819
|
# Publish
|
|
804
820
|
result = await self._media_manager.publish_container(container_ids[0])
|
|
805
821
|
|
|
806
|
-
#
|
|
807
|
-
return
|
|
822
|
+
# Return minimal Post object without fetching details
|
|
823
|
+
return Post(
|
|
824
|
+
post_id=result.media_id,
|
|
825
|
+
platform=self.platform_name,
|
|
826
|
+
content=caption,
|
|
827
|
+
status=PostStatus.PUBLISHED,
|
|
828
|
+
created_at=datetime.now(),
|
|
829
|
+
url=cast(HttpUrl, result.permalink) if result.permalink else None,
|
|
830
|
+
)
|
|
808
831
|
|
|
809
832
|
async def create_reel(
|
|
810
833
|
self,
|
|
@@ -860,8 +883,15 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
860
883
|
# Publish
|
|
861
884
|
result = await self._media_manager.publish_container(container_id)
|
|
862
885
|
|
|
863
|
-
#
|
|
864
|
-
return
|
|
886
|
+
# Return minimal Post object without fetching details
|
|
887
|
+
return Post(
|
|
888
|
+
post_id=result.media_id,
|
|
889
|
+
platform=self.platform_name,
|
|
890
|
+
content=caption,
|
|
891
|
+
status=PostStatus.PUBLISHED,
|
|
892
|
+
created_at=datetime.now(),
|
|
893
|
+
url=cast(HttpUrl, result.permalink) if result.permalink else None,
|
|
894
|
+
)
|
|
865
895
|
|
|
866
896
|
async def create_story(
|
|
867
897
|
self,
|
|
@@ -904,8 +934,15 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
904
934
|
# Publish
|
|
905
935
|
result = await self._media_manager.publish_container(container_id)
|
|
906
936
|
|
|
907
|
-
#
|
|
908
|
-
return
|
|
937
|
+
# Return minimal Post object without fetching details
|
|
938
|
+
return Post(
|
|
939
|
+
post_id=result.media_id,
|
|
940
|
+
platform=self.platform_name,
|
|
941
|
+
content=None, # Stories don't have captions
|
|
942
|
+
status=PostStatus.PUBLISHED,
|
|
943
|
+
created_at=datetime.now(),
|
|
944
|
+
url=cast(HttpUrl, result.permalink) if result.permalink else None,
|
|
945
|
+
)
|
|
909
946
|
|
|
910
947
|
# ==================== Helper Methods ====================
|
|
911
948
|
|
|
@@ -426,8 +426,16 @@ class LinkedInClient(SocialMediaPlatform):
|
|
|
426
426
|
platform=self.platform_name,
|
|
427
427
|
)
|
|
428
428
|
|
|
429
|
-
#
|
|
430
|
-
return
|
|
429
|
+
# Return minimal Post object without fetching details
|
|
430
|
+
return Post(
|
|
431
|
+
post_id=post_id,
|
|
432
|
+
platform=self.platform_name,
|
|
433
|
+
content=request.content or "",
|
|
434
|
+
status=PostStatus.PUBLISHED,
|
|
435
|
+
created_at=datetime.now(),
|
|
436
|
+
author_id=self.author_urn,
|
|
437
|
+
raw_data=response.data,
|
|
438
|
+
)
|
|
431
439
|
|
|
432
440
|
except httpx.HTTPError as e:
|
|
433
441
|
raise PlatformError(
|
|
@@ -231,24 +231,18 @@ class TikTokClient(SocialMediaPlatform):
|
|
|
231
231
|
wait_for_publish=True,
|
|
232
232
|
)
|
|
233
233
|
|
|
234
|
-
# 4. Return
|
|
235
|
-
if upload_result.video_id:
|
|
236
|
-
# Fetch the created post to return full Post object
|
|
237
|
-
return await self.get_post(upload_result.video_id)
|
|
238
|
-
|
|
239
|
-
# For private/SELF_ONLY posts, TikTok may not return video_id
|
|
240
|
-
# Return a minimal Post object with publish_id
|
|
234
|
+
# 4. Return minimal Post object without fetching details
|
|
241
235
|
return Post(
|
|
242
|
-
post_id=upload_result.publish_id,
|
|
236
|
+
post_id=upload_result.video_id or upload_result.publish_id,
|
|
243
237
|
platform=self.platform_name,
|
|
244
238
|
content=request.content,
|
|
245
239
|
status=PostStatus.PUBLISHED,
|
|
246
240
|
created_at=datetime.now(),
|
|
247
241
|
raw_data={
|
|
248
242
|
"publish_id": upload_result.publish_id,
|
|
243
|
+
"video_id": upload_result.video_id,
|
|
249
244
|
"upload_status": upload_result.status,
|
|
250
245
|
"privacy_level": privacy_level.value,
|
|
251
|
-
"note": "Video published but video_id not returned (common for private posts)",
|
|
252
246
|
},
|
|
253
247
|
)
|
|
254
248
|
|
|
@@ -7,17 +7,17 @@ marqetive/core/models.py,sha256=L2gA4FhW0feAXQFsz2ce1ttd0vScMRhatoTclhDGCU0,1472
|
|
|
7
7
|
marqetive/factory.py,sha256=irZ5oN8a__kXZH70UN2uI7TzqTXu66d4QZ1FoxSoiK8,14092
|
|
8
8
|
marqetive/platforms/__init__.py,sha256=RBxlQSGyELsulSnwf5uaE1ohxFc7jC61OO9CrKaZp48,1312
|
|
9
9
|
marqetive/platforms/instagram/__init__.py,sha256=c1Gs0ozG6D7Z-Uz_UQ7S3joL0qUTT9eUZPWcePyESk8,229
|
|
10
|
-
marqetive/platforms/instagram/client.py,sha256=
|
|
10
|
+
marqetive/platforms/instagram/client.py,sha256=6jnoIt4CbdIQdVoVuZ_2DI2tQKj6dKBF_-RbFUljVps,33744
|
|
11
11
|
marqetive/platforms/instagram/exceptions.py,sha256=TcD_pX4eSx_k4yW8DgfA6SGPiAz3VW7cMqM8DmiXIhg,8978
|
|
12
12
|
marqetive/platforms/instagram/media.py,sha256=0ZbUbpwJ025_hccL9X8qced_-LJGoL_-NdS84Op97VE,23228
|
|
13
13
|
marqetive/platforms/instagram/models.py,sha256=20v3m1037y3b_WlsKF8zAOgV23nFu63tfmmUN1CefOI,2769
|
|
14
14
|
marqetive/platforms/linkedin/__init__.py,sha256=_FrdZpqcXjcUW6C-25zGV7poGih9yzs6y1AFnuizTUQ,1384
|
|
15
|
-
marqetive/platforms/linkedin/client.py,sha256=
|
|
15
|
+
marqetive/platforms/linkedin/client.py,sha256=8M34VJXFe_34QQZzhR7SVK8ee3iE6UOGsSVTv5Hf31U,58712
|
|
16
16
|
marqetive/platforms/linkedin/exceptions.py,sha256=i5fARUkZik46bS3htZBwUInVzetsZx1APpKEXLrCKf0,9762
|
|
17
17
|
marqetive/platforms/linkedin/media.py,sha256=iWXUfqDYGsrTqeM6CGZ7a8xjpbdJ5qESolQL8Fv2PIg,20341
|
|
18
18
|
marqetive/platforms/linkedin/models.py,sha256=n7DqwVxYSbGYBmeEJ1woCZ6XhUIHcLx8Gpm8uCBACzI,12620
|
|
19
19
|
marqetive/platforms/tiktok/__init__.py,sha256=BqjkXTZDyBlcY3lvREy13yP9h3RcDga8E6Rl6f5KPp8,238
|
|
20
|
-
marqetive/platforms/tiktok/client.py,sha256=
|
|
20
|
+
marqetive/platforms/tiktok/client.py,sha256=c-XYV3XsLU04jv61mBEYivP-oO-aZhuEq6g7J55OEY8,17387
|
|
21
21
|
marqetive/platforms/tiktok/exceptions.py,sha256=vxwyAKujMGZJh0LetG1QsLF95QfUs_kR6ujsWSHGqL0,10124
|
|
22
22
|
marqetive/platforms/tiktok/media.py,sha256=NmvzvzfaZMmzIx88wkXI5tWLd4vYN1VJXN-IkaEAO2c,28638
|
|
23
23
|
marqetive/platforms/tiktok/models.py,sha256=WWdjuFqhTIR8SnHkz-8UaNc5Mm2PrGomwQ3W7pJcQFg,2962
|
|
@@ -33,6 +33,6 @@ marqetive/utils/helpers.py,sha256=Sh5HZD6AOJig_6T84n6JsKLosIkKIkpkiYTl69rnOOw,13
|
|
|
33
33
|
marqetive/utils/media.py,sha256=reVousdueG-h5jeI6uLGqVCfjYxlsMiWhx6XZwg-iHY,14664
|
|
34
34
|
marqetive/utils/oauth.py,sha256=x30XAW5VlND6TAPBsw9kZShko_Jsmn_NE-KOZjnBxGo,14359
|
|
35
35
|
marqetive/utils/retry.py,sha256=UcgrmVBVG5zd30_11mZnRnTaSFrbUYXBO1DrXPR0f8E,7627
|
|
36
|
-
marqetive_lib-0.1.
|
|
37
|
-
marqetive_lib-0.1.
|
|
38
|
-
marqetive_lib-0.1.
|
|
36
|
+
marqetive_lib-0.1.17.dist-info/METADATA,sha256=mXa8m82FUduoiT9f6hCpeoNe-ygPA8TCqI7EOon__a8,7876
|
|
37
|
+
marqetive_lib-0.1.17.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
38
|
+
marqetive_lib-0.1.17.dist-info/RECORD,,
|
|
File without changes
|