Created
December 31, 2020 21:47
-
-
Save kevinoconnor7/dced6a9f4ebcf6002c97a64eb5788fe3 to your computer and use it in GitHub Desktop.
Revisions
-
kevinoconnor7 created this gist
Dec 31, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ diff --git a/youtube_dl/downloader/hls.py b/youtube_dl/downloader/hls.py index 0f2c06f40..77ffa7789 100644 --- a/youtube_dl/downloader/hls.py +++ b/youtube_dl/downloader/hls.py @@ -138,6 +138,9 @@ class HlsFD(FragmentFD): else compat_urlparse.urljoin(man_url, line)) if extra_query: frag_url = update_url_query(frag_url, extra_query) + if '_ad/creative/' in frag_url: + self.to_screen('[AD!] Found ad url: %s' % frag_url) + continue count = 0 headers = info_dict.get('http_headers', {}) if byte_range: