The solution was really simple - you just need to replace "/" symbol in photo_url to "/" Python:
data_check_string = data_check_string.replace("/", "\/")