Skip to content

Commit

Permalink
don't download the SWF player for videos
Browse files Browse the repository at this point in the history
  • Loading branch information
beaufour committed Nov 8, 2022
1 parent 3d3aded commit 921b4fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flickr_download/flick_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@ def do_download_photo(
except Exception:
logging.warning("Trouble saving photo info: %s", sys.exc_info()[0])

if not size_label and photo._getLargestSizeLabel() == "Video Player":
# For old videos there doesn't seem to be an actual video url
# available. The largest video size ends up being a SWF video player,
# and it's the SWF that'll be downloaded...
logging.error("Video not available for: %s", get_photo_page(photo))
return

if os.path.exists(fname):
# TODO: Ideally we should check for file size / md5 here
# to handle failed downloads.
Expand Down

0 comments on commit 921b4fe

Please sign in to comment.