mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-16 14:36:47 +00:00
Improve program documentation
This commit is contained in:
parent
0086d1ec32
commit
1c5e23021e
@ -67,6 +67,7 @@ class FileDownloader(object):
|
|||||||
_ies = []
|
_ies = []
|
||||||
|
|
||||||
def __init__(self, params):
|
def __init__(self, params):
|
||||||
|
"""Create a FileDownloader object with the given options."""
|
||||||
self._ies = []
|
self._ies = []
|
||||||
self.set_params(params)
|
self.set_params(params)
|
||||||
|
|
||||||
@ -305,7 +306,7 @@ class InfoExtractor(object):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
"""Initializes an instance (login, etc)."""
|
"""Initializes an instance (authentication, etc)."""
|
||||||
if not self._ready:
|
if not self._ready:
|
||||||
self._real_initialize()
|
self._real_initialize()
|
||||||
self._ready = True
|
self._ready = True
|
||||||
@ -320,10 +321,12 @@ class InfoExtractor(object):
|
|||||||
self._downloader = downloader
|
self._downloader = downloader
|
||||||
|
|
||||||
def to_stdout(self, message):
|
def to_stdout(self, message):
|
||||||
|
"""Print message to stdout if downloader is not in quiet mode."""
|
||||||
if self._downloader is None or not self._downloader.get_params().get('quiet', False):
|
if self._downloader is None or not self._downloader.get_params().get('quiet', False):
|
||||||
print message
|
print message
|
||||||
|
|
||||||
def to_stderr(self, message):
|
def to_stderr(self, message):
|
||||||
|
"""Print message to stderr."""
|
||||||
sys.stderr.write('%s\n' % message)
|
sys.stderr.write('%s\n' % message)
|
||||||
|
|
||||||
def _real_initialize(self):
|
def _real_initialize(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user