diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..028437db --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +Release type: minor + +Add exception to deal with broken embedded video links when importing from Tumblr. diff --git a/pelican/tools/pelican_import.py b/pelican/tools/pelican_import.py index 7833ebbe..abd7949a 100755 --- a/pelican/tools/pelican_import.py +++ b/pelican/tools/pelican_import.py @@ -499,8 +499,11 @@ def tumblr2fields(api_key, blogname): fmtstr = '
\n' source = fmtstr % post.get('source_url') caption = post.get('caption') - players = '\n'.join(player.get('embed_code') - for player in post.get('player')) + try: + players = '\n'.join(player.get('embed_code') + for player in post.get('player')) + except TypeError: + players = '\n' content = source + caption + players elif type == 'answer': title = post.get('question')