| skipped 115 lines |
116 | 116 | | else: |
117 | 117 | | file_open_mode = 'wb' |
118 | 118 | | with open(output_path, file_open_mode) as outfile: |
119 | | - | outfile.write(bytes(file_content, "utf-8")) |
| 119 | + | outfile.write(file_content) |
120 | 120 | | output = "File Downloaded correctly to " + output_path |
121 | 121 | | return output |
122 | 122 | | |
| skipped 40 lines |
163 | 163 | | encrypted_request = self._encrypt_request(req) |
164 | 164 | | encrypted_response = self._post_request(encrypted_request) |
165 | 165 | | decrypted_response = self._decrypt_response(encrypted_response) |
166 | | - | file_content = self._parse_response(decrypted_response) |
| 166 | + | file_content = decrypted_response |
167 | 167 | | if len(requests) > 1: |
168 | 168 | | parsed_response = self.__write_local_file(file_content, download_output_path, split=True) |
169 | 169 | | print ('Chunk ' + str(i + 1) + ' --> ' + str(chunk_size * i) + ' - ' +\ |
| skipped 10 lines |