Skip to content

Commit

Permalink
Don't crash TikTok map on missing music playUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-uva committed Oct 9, 2023
1 parent 3f74477 commit fc4d35c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasources/tiktok/search_tiktok.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", ""),
Expand Down

0 comments on commit fc4d35c

Please sign in to comment.