- # Extract information from URL
- all_results = ie.extract(url)
- results = [x for x in all_results if x is not None]
-
- # See if there were problems extracting any information
- if len(results) != len(all_results):
- retcode = self.trouble()
-
- # Two results could go to the same file
- if len(results) > 1 and self.fixed_template():
- raise SameFileError(self.params['outtmpl'])
-
- # Process each result
- for result in results:
- result = self.process_info(result)
-
- # Do not overwrite an error code with a success code
- if result != 0:
- retcode = result