From e258fab1eac2f2cbc6c1fdaaf7f119e57b9a38f3 Mon Sep 17 00:00:00 2001 From: Jeremy Bowman Date: Thu, 17 Oct 2019 10:43:04 -0400 Subject: [PATCH] Fix YouTube stub under Python 3 BOM-930 (#22056) --- common/djangoapps/terrain/stubs/youtube.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/terrain/stubs/youtube.py b/common/djangoapps/terrain/stubs/youtube.py index 73a8b6778a..0cb447ce4c 100644 --- a/common/djangoapps/terrain/stubs/youtube.py +++ b/common/djangoapps/terrain/stubs/youtube.py @@ -105,7 +105,7 @@ class StubYouTubeHandler(StubHttpRequestHandler): # We need to do this every time because Google sometimes sends different responses # as part of their own experiments, which has caused our tests to become "flaky" self.log_message("Getting iframe api from youtube.com") - iframe_api_response = requests.get('https://www.youtube.com/iframe_api').content.strip("\n") + iframe_api_response = requests.get('https://www.youtube.com/iframe_api').content.strip(b"\n") self.send_response(200, content=iframe_api_response, headers={'Content-type': 'text/html'}) else: