Skip to content

Commit 921b4fe

Browse files
committed
don't download the SWF player for videos
1 parent 3d3aded commit 921b4fe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

flickr_download/flick_download.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,13 @@ def do_download_photo(
245245
except Exception:
246246
logging.warning("Trouble saving photo info: %s", sys.exc_info()[0])
247247

248+
if not size_label and photo._getLargestSizeLabel() == "Video Player":
249+
# For old videos there doesn't seem to be an actual video url
250+
# available. The largest video size ends up being a SWF video player,
251+
# and it's the SWF that'll be downloaded...
252+
logging.error("Video not available for: %s", get_photo_page(photo))
253+
return
254+
248255
if os.path.exists(fname):
249256
# TODO: Ideally we should check for file size / md5 here
250257
# to handle failed downloads.

0 commit comments

Comments
 (0)