aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-10-23 02:07:20 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-10-23 02:09:10 +0530
commit49a57e70a9105dfe1671e96bef24663bce5b563d (patch)
tree412489408925d1d454784382f2bd57dd5f1862fa /yt_dlp/extractor/common.py
parent457f6d68668704c20debc40ca77768796656d98b (diff)
downloadhypervideo-pre-49a57e70a9105dfe1671e96bef24663bce5b563d.tar.lz
hypervideo-pre-49a57e70a9105dfe1671e96bef24663bce5b563d.tar.xz
hypervideo-pre-49a57e70a9105dfe1671e96bef24663bce5b563d.zip
[cleanup] misc
Diffstat (limited to 'yt_dlp/extractor/common.py')
-rw-r--r--yt_dlp/extractor/common.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yt_dlp/extractor/common.py b/yt_dlp/extractor/common.py
index e00d8c42b..22b1ed69a 100644
--- a/yt_dlp/extractor/common.py
+++ b/yt_dlp/extractor/common.py
@@ -448,7 +448,9 @@ class InfoExtractor(object):
}
def __init__(self, downloader=None):
- """Constructor. Receives an optional downloader."""
+ """Constructor. Receives an optional downloader (a YoutubeDL instance).
+ If a downloader is not passed during initialization,
+ it must be set using "set_downloader()" before "extract()" is called"""
self._ready = False
self._x_forwarded_for_ip = None
self._printed_messages = set()
@@ -664,7 +666,7 @@ class InfoExtractor(object):
See _download_webpage docstring for arguments specification.
"""
if not self._downloader._first_webpage_request:
- sleep_interval = float_or_none(self.get_param('sleep_interval_requests')) or 0
+ sleep_interval = self.get_param('sleep_interval_requests') or 0
if sleep_interval > 0:
self.to_screen('Sleeping %s seconds ...' % sleep_interval)
time.sleep(sleep_interval)