diff options
author | Ashish Gupta <39122144+Ashish0804@users.noreply.github.com> | 2021-09-23 14:30:49 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 14:30:49 +0530 |
commit | 388bc4a640561b78a8d38e95253721e7715b22cc (patch) | |
tree | 717622397b8b256c0cd33baac3e8c34670c2fdd0 /yt_dlp/YoutubeDL.py | |
parent | 50eff38c1c071e2d389799843530c294d31887ed (diff) | |
download | hypervideo-pre-388bc4a640561b78a8d38e95253721e7715b22cc.tar.lz hypervideo-pre-388bc4a640561b78a8d38e95253721e7715b22cc.tar.xz hypervideo-pre-388bc4a640561b78a8d38e95253721e7715b22cc.zip |
[Hotstar] Add referer for subs (#1062)
Authored by: Ashish0804
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index d05d85604..410186b91 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2594,7 +2594,9 @@ class YoutubeDL(object): return else: try: - self.dl(sub_filename, sub_info.copy(), subtitle=True) + sub_copy = sub_info.copy() + sub_copy.setdefault('http_headers', info_dict.get('http_headers')) + self.dl(sub_filename, sub_copy, subtitle=True) sub_info['filepath'] = sub_filename files_to_move[sub_filename] = sub_filename_final except (ExtractorError, IOError, OSError, ValueError) + network_exceptions as err: |