Skip to content

πŸ“˜ Download Single Photo

Syashin , Chen edited this page Sep 2, 2018 · 8 revisions

PyFlick gives a class function to download single photo : PyFlickr.singlePhoto_DL

✏️ PyFlickr.singlePhoto_DL

πŸ”Έ PyFlickr.singlePhoto_DL([photo_url], [photo_name_to_save], [photo_size], [folder_path], [chunk_size])

Parameters :

Name Type Description
photo_url str This photo_url is like: https://www.flickr.com/photos/139958401@N06/43371871895/
photo_name_to_save str Name your photo to be downloaded. Default photo_name_to_save is an empty string, and it will save with id as name.
photo_size str Give a photo_size string from Photo Instance Properties (see Photo Size Information). Default photo_size = "medium_800"
folder_path str Give a folder_path string to set where to save your photo. Default folder_path is an empty string, and your photo will be save locally.
chunk_size int Set chunk_size of your download. Default chunk_size = 512

Example :

slide_url = "https://www.flickr.com/photos/139958401@N06/43371867585/"

# Download as "43371867585.jpg"
PyFlickr.singlePhoto_DL(photo_url = slide_url)

# Download as "A_new_photo.jpg" and photo_size = "small_320"
PyFlickr.singlePhoto_DL(photo_url = slide_url, photo_name_to_save = "A_new_photo", photo_size = "small_320")

# Download as "43371867585.jpg" in a folder named "FILE"
PyFlickr.singlePhoto_DL(photo_url = slide_url, folder_path = "FILE")