diff --git a/datasources/tiktok/search_tiktok.py b/datasources/tiktok/search_tiktok.py index 7a9f88fa3..c54d02eda 100644 --- a/datasources/tiktok/search_tiktok.py +++ b/datasources/tiktok/search_tiktok.py @@ -91,7 +91,7 @@ def map_item(post): "is_ad": "yes" if post.get("isAd", False) else "no", "music_name": post["music"]["title"], "music_id": post["music"]["id"], - "music_url": post["music"]["playUrl"], + "music_url": post["music"].get("playUrl", ""), "music_thumbnail": post["music"].get("coverLarge", ""), "music_author": post["music"].get("authorName", ""), "video_url": post["video"].get("downloadAddr", ""),