andyjsmith / SmugMug-Downloader

Download all the images from a SmugMug user
47 stars 19 forks source link

Certain album names causing issues #9

Closed thedeany closed 3 years ago

thedeany commented 3 years ago

The instructions for downloading specific albums by name says to "split by $". I attempted to get some albums with the following string:

--albums "02. Bride$03. Groom$04. Bride + Groom$05. First Look$06. Bridesmaids$07. Groomsmen$08. Bridal Party$09. Ceremony$10. Family$11. Reception$12. Details"

The output in the terminal kept telling me

Downloading album list...done.
Creating output directories...done.
All Albums              : 100%|███████████████████████████████████████████████████████████████████████████████████████████|  34/34 
Completed.

and wouldn't actually download anything at all. I put in some basic print statements (I'm not a Python dev) so I could see what specificAlbums was coming out as and it was the following:

['02. Bride. Groom. Bride + Groom. First Look. Bridesmaids. Groomsmen. Bridal Party. Ceremony. Family. Reception. Details']

I'm assuming something with the leading 0s was causing an issue perhaps? Anyhow, I was able to solve it by using 02. Bride $ 03. Groom... (spaces around the $) as the delimiter rather than just $ and that seems to have worked in my case, giving the following output for specificAlbums:

['02. Bride', '03. Groom', '04. Bride + Groom', '05. First Look', '06. Bridesmaids', '07. Groomsmen', '08. Bridal Party', '09. Ceremony', '10. Family', '11. Reception', '12. Details']

Just wanted to log this for others who might have the same issue.

andyjsmith commented 3 years ago

If you use bash/powershell/etc, using a dollar sign indicates a variable and it tries to fill in your $02 for example with a variable. Fixed this by adding to the help message that you need to use single quotes around your album list, not double quotes, so your shell won't substitute them.