jcarolinares/thingiverse_downloader

Colon in name causes failure

flips22 opened this issue · 1 comments

I came across a file with a colon (:) in the name. Changing line 246 from:
file_path = "./stls/"+data_pd[object]["name"].replace(" ", "").replace("/", "-")
to this:
file_path = "./stls/"+data_pd[object]["name"].replace(" ", "
").replace("/", "-").replace(":", "-")

Fixed the issue. Also need to update the zip file line as well.

Thanks for your work on this project!

Hello flips22,

thank you so much for the issue and the correction, next time if you want to do a pull request you are more than welcome!

Added on line 246 and 247 the colon replace, I'm starting to think about changing this way of replacement with something more "elegant", some info here:

https://stackoverflow.com/questions/3411771/best-way-to-replace-multiple-characters-in-a-string

Regards!