From 6a9cb29509a3b1fa2c1ffce82acb2fa7a2699c29 Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Thu, 15 Jun 2017 13:04:36 +0800 Subject: [extractor/common] Fix json dumping with --geo-bypass The line "[debug] Using fake IP %s (%s) as X-Forwarded-For." was printed to stdout even with -j/-J, which breaks the resultant JSON. --- youtube_dl/extractor/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube_dl') diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 941385ae2..6e415ea41 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -420,7 +420,7 @@ class InfoExtractor(object): if country_code: self._x_forwarded_for_ip = GeoUtils.random_ipv4(country_code) if self._downloader.params.get('verbose', False): - self._downloader.to_stdout( + self._downloader.to_screen( '[debug] Using fake IP %s (%s) as X-Forwarded-For.' % (self._x_forwarded_for_ip, country_code.upper())) -- cgit v1.2.3