Extracting different content-type of MHT file into multiple mht file
问题 I am writing an mht script to parse an mht file and extract the part message from the parent and write them to a separate mht file I wrote the below function which opens a mht file at file_location and searches for specific content_id and writes it to a new mht file def extract_content(self, file_location, content_id,extension): first_part = file_location.split(extension)[0] #checking if file exists new_file = first_part + "-" + content_id.split('.')[0] + extension while os.path.exists(new