diff --git a/youtube_dl_gui/downloaders.py b/youtube_dl_gui/downloaders.py index c3c89e3..87c4017 100644 --- a/youtube_dl_gui/downloaders.py +++ b/youtube_dl_gui/downloaders.py @@ -38,6 +38,18 @@ class YoutubeDLDownloader(object): Note: For available data keys check self._data under __init__() + Example: + How to use YoutubeDLDownloader from a python script. + + from downloaders import YoutubeDLDownloader + + def data_hook(data): + print data + + downloader = YoutubeDLDownloader('/usr/bin/youtube-dl', data_hook) + + downloader.download(, ['-f', 'flv']) + """ OK = 0 @@ -217,6 +229,9 @@ class YoutubeDLDownloader(object): stream (subprocess.PIPE): Subprocess pipe. Can be either STDOUT or STDERR. + Returns: + String that contains the stream (STDOUT or STDERR) string. + """ if self._proc is None: return ''