password: Password for authentication purposes.
usenetrc: Use netrc for authentication instead.
quiet: Do not print messages to stdout.
+ forceurl: Force printing final URL.
+ forcetitle: Force printing title.
simulate: Do not download the video files.
format: Video format code.
outtmpl: Template for output names.
if len(results) > 1 and self.fixed_template():
sys.exit('ERROR: fixed output name but more than one file to download')
- if self._params.get('simulate', False):
- continue
-
for result in results:
+
+ # Forced printings
+ if self._params.get('forcetitle', False):
+ print result['title']
+ if self._params.get('forceurl', False):
+ print result['url']
+
+ # Do nothing else if in simulate mode
+ if self._params.get('simulate', False):
+ continue
+
try:
filename = self._params['outtmpl'] % result
except (ValueError, KeyError), err:
'username': None,
'password': None,
'quiet': False,
+ 'forceurl': False,
+ 'forcetitle': False,
'simulate': False,
'format': None,
'outtmpl': '%(ext)s/%(ext)s/%(id)s.%(ext)s'