Fix YouTube stub under Python 3 BOM-930 (#22056)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user