Browse Source

Update downloaders.py docstring

doc-issue-template
MrS0m30n3 9 years ago
parent
commit
5837e03bc3
1 changed files with 15 additions and 0 deletions
  1. 15
      youtube_dl_gui/downloaders.py

15
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(<URL STRING>, ['-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 ''

Loading…
Cancel
Save