The problem of path error when downloading python

name=data"items" ["name"] this is the source of name save_path = os.path.join ("/ home/shenjianlin/pdf_file", name)

this is the path, so if name is escaped with"/ "when downloading, it will report the wrong path error

is there any way to mask string escape without changing the original value of the variable name string? Because this is a variable, you can"t mask it with r

.
Mar.30,2021
Isn't the

escape character a backslash "\"?

Menu