prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  BritTV in need of password ? 
   - [x] I have read the contribution guidelines.
   
  Brit TV won't open for me any more, could it be it needs One's credentials ? 
  How would that look ? --brittv-username=xxxx  --brittv-password=xxxx ?
  (Tested of course).
  ```
  C:\Users\Ordval>call streamlink.exe "http://brittv.co.uk/watch/?channel=1" best
  [cli][info] Found matching plugin brittv for URL http://brittv.co.uk/watch/?channel=1
  [cli][info] Waiting for streams, retrying every 1.0 second(s)
  ```
  
  ```
  C:\Users\Ordval>call streamlink.exe  -l debug --http-header User-Agent=Chrome/54.0.2840.59 "https://brittv.co.uk/watch/?channel=1" best
  [cli][debug] OS:   Windows 10
  [cli][debug] Python:        3.5.2
  [cli][debug] Streamlink: 0.11.0
  [cli][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.47.0)
  [cli][info] Found matching plugin brittv for URL https://brittv.co.uk/watch/?channel=1
  [plugin.brittv][debug] Found js key: aHR0cDovL2IxYTJmODdjLmFyY2guYmx1d2FyZS50di9kYWcxLm0zdTg/c2lkPWV6ZCZjaWQ9YmJjMSZhdXRoPWMzUnBiV1U5TVRVeU5EUXlNVEEzTnlaMllXeHBaR2wwZVQwekptRm5iajB3Sm1OdmJtWTlkVEFtYzJsbmJqMDBZVEk1WVdFeE4yRmtNamswWWpWaFpqWXlaR1JpWkRnek5qZGtObUl6Wmc9PQ==
  error: No playable streams found on this URL: https://brittv.co.uk/watch/?channel=1 
  ```
  Opens on website.  The temporary:
  `call streamlink.exe hls://"http://b1a2f87c.arch.bluware.tv/dag1.m3u8?sid=ezd&cid=bbc1&auth=c3RpbWU9MTUyNDQwMzQ5OCZ2YWxpZGl0eT0zJmFnbj0wJmNvbmY9dTAmc2lnbj00ZWY4NTExMjNmODBlOGU5MmVjZWE1ZWUzZDc4YzQ0Mg==" best `
  will play.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/streamlink/plugins/brittv.py`
  Content:
  ```
  1 import re
  2 
  3 from streamlink.plugin import Plugin
  4 from streamlink.plugin.api import http
  5 from streamlink.plugin.api import useragents
  6 from streamlink.compat import urljoin
  7 from streamlink.stream import HLSStream
  8 
  9 
  10 class BritTV(Plugin):
  11     url_re = re.compile(r"https?://(?:www\.)?brittv\.co.uk/watch/")
  12     js_re = re.compile(r"""/js/brittv\.player\.js\.php\?key=([^'"]+)['"]""")
  13     player_re = re.compile(r"file: '(http://[^']+)'")
  14 
  15     @classmethod
  16     def can_handle_url(cls, url):
  17         return cls.url_re.match(url) is not None
  18 
  19     def _get_streams(self):
  20         res = http.get(self.url, headers={"User-Agent": useragents.CHROME})
  21         m = self.js_re.search(res.text)
  22         if m:
  23             self.logger.debug("Found js key: {0}", m.group(1))
  24             js_url = m.group(0)
  25             res = http.get(urljoin(self.url, js_url))
  26 
  27             for url in self.player_re.findall(res.text):
  28                 if "adblock" not in url:
  29                     yield "live", HLSStream(self.session, url)
  30 
  31 
  32 __plugin__ = BritTV
  33
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/src/streamlink/plugins/brittv.py b/src/streamlink/plugins/brittv.py
  --- a/src/streamlink/plugins/brittv.py
  +++ b/src/streamlink/plugins/brittv.py
  @@ -10,7 +10,7 @@
   class BritTV(Plugin):
       url_re = re.compile(r"https?://(?:www\.)?brittv\.co.uk/watch/")
       js_re = re.compile(r"""/js/brittv\.player\.js\.php\?key=([^'"]+)['"]""")
  -    player_re = re.compile(r"file: '(http://[^']+)'")
  +    player_re = re.compile(r'''src\s*:\s*(?P<quote>['"])(https?://.+?)(?P=quote)''')
   
       @classmethod
       def can_handle_url(cls, url):
  @@ -24,6 +24,7 @@
               js_url = m.group(0)
               res = http.get(urljoin(self.url, js_url))
   
  +            self.logger.debug("Looking for stream URL...")
               for url in self.player_re.findall(res.text):
                   if "adblock" not in url:
                       yield "live", HLSStream(self.session, url)
  
verification_info: {"golden_diff": "diff --git a/src/streamlink/plugins/brittv.py b/src/streamlink/plugins/brittv.py\n--- a/src/streamlink/plugins/brittv.py\n+++ b/src/streamlink/plugins/brittv.py\n@@ -10,7 +10,7 @@\n class BritTV(Plugin):\n     url_re = re.compile(r\"https?://(?:www\\.)?brittv\\.co.uk/watch/\")\n     js_re = re.compile(r\"\"\"/js/brittv\\.player\\.js\\.php\\?key=([^'\"]+)['\"]\"\"\")\n-    player_re = re.compile(r\"file: '(http://[^']+)'\")\n+    player_re = re.compile(r'''src\\s*:\\s*(?P<quote>['\"])(https?://.+?)(?P=quote)''')\n \n     @classmethod\n     def can_handle_url(cls, url):\n@@ -24,6 +24,7 @@\n             js_url = m.group(0)\n             res = http.get(urljoin(self.url, js_url))\n \n+            self.logger.debug(\"Looking for stream URL...\")\n             for url in self.player_re.findall(res.text):\n                 if \"adblock\" not in url:\n                     yield \"live\", HLSStream(self.session, url)\n", "issue": "BritTV in need of password ? \n - [x] I have read the contribution guidelines.\r\n \r\nBrit TV won't open for me any more, could it be it needs One's credentials ? \r\nHow would that look ? --brittv-username=xxxx  --brittv-password=xxxx ?\r\n(Tested of course).\r\n```\r\nC:\\Users\\Ordval>call streamlink.exe \"http://brittv.co.uk/watch/?channel=1\" best\r\n[cli][info] Found matching plugin brittv for URL http://brittv.co.uk/watch/?channel=1\r\n[cli][info] Waiting for streams, retrying every 1.0 second(s)\r\n```\r\n\r\n```\r\nC:\\Users\\Ordval>call streamlink.exe  -l debug --http-header User-Agent=Chrome/54.0.2840.59 \"https://brittv.co.uk/watch/?channel=1\" best\r\n[cli][debug] OS:   Windows 10\r\n[cli][debug] Python:        3.5.2\r\n[cli][debug] Streamlink: 0.11.0\r\n[cli][debug] Requests(2.18.4), Socks(1.6.7), Websocket(0.47.0)\r\n[cli][info] Found matching plugin brittv for URL https://brittv.co.uk/watch/?channel=1\r\n[plugin.brittv][debug] Found js key: aHR0cDovL2IxYTJmODdjLmFyY2guYmx1d2FyZS50di9kYWcxLm0zdTg/c2lkPWV6ZCZjaWQ9YmJjMSZhdXRoPWMzUnBiV1U5TVRVeU5EUXlNVEEzTnlaMllXeHBaR2wwZVQwekptRm5iajB3Sm1OdmJtWTlkVEFtYzJsbmJqMDBZVEk1WVdFeE4yRmtNamswWWpWaFpqWXlaR1JpWkRnek5qZGtObUl6Wmc9PQ==\r\nerror: No playable streams found on this URL: https://brittv.co.uk/watch/?channel=1 \r\n```\r\nOpens on website.  The temporary:\r\n`call streamlink.exe hls://\"http://b1a2f87c.arch.bluware.tv/dag1.m3u8?sid=ezd&cid=bbc1&auth=c3RpbWU9MTUyNDQwMzQ5OCZ2YWxpZGl0eT0zJmFnbj0wJmNvbmY9dTAmc2lnbj00ZWY4NTExMjNmODBlOGU5MmVjZWE1ZWUzZDc4YzQ0Mg==\" best `\r\nwill play.\n", "before_files": [{"content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http\nfrom streamlink.plugin.api import useragents\nfrom streamlink.compat import urljoin\nfrom streamlink.stream import HLSStream\n\n\nclass BritTV(Plugin):\n    url_re = re.compile(r\"https?://(?:www\\.)?brittv\\.co.uk/watch/\")\n    js_re = re.compile(r\"\"\"/js/brittv\\.player\\.js\\.php\\?key=([^'\"]+)['\"]\"\"\")\n    player_re = re.compile(r\"file: '(http://[^']+)'\")\n\n    @classmethod\n    def can_handle_url(cls, url):\n        return cls.url_re.match(url) is not None\n\n    def _get_streams(self):\n        res = http.get(self.url, headers={\"User-Agent\": useragents.CHROME})\n        m = self.js_re.search(res.text)\n        if m:\n            self.logger.debug(\"Found js key: {0}\", m.group(1))\n            js_url = m.group(0)\n            res = http.get(urljoin(self.url, js_url))\n\n            for url in self.player_re.findall(res.text):\n                if \"adblock\" not in url:\n                    yield \"live\", HLSStream(self.session, url)\n\n\n__plugin__ = BritTV\n", "path": "src/streamlink/plugins/brittv.py"}], "after_files": [{"content": "import re\n\nfrom streamlink.plugin import Plugin\nfrom streamlink.plugin.api import http\nfrom streamlink.plugin.api import useragents\nfrom streamlink.compat import urljoin\nfrom streamlink.stream import HLSStream\n\n\nclass BritTV(Plugin):\n    url_re = re.compile(r\"https?://(?:www\\.)?brittv\\.co.uk/watch/\")\n    js_re = re.compile(r\"\"\"/js/brittv\\.player\\.js\\.php\\?key=([^'\"]+)['\"]\"\"\")\n    player_re = re.compile(r'''src\\s*:\\s*(?P<quote>['\"])(https?://.+?)(?P=quote)''')\n\n    @classmethod\n    def can_handle_url(cls, url):\n        return cls.url_re.match(url) is not None\n\n    def _get_streams(self):\n        res = http.get(self.url, headers={\"User-Agent\": useragents.CHROME})\n        m = self.js_re.search(res.text)\n        if m:\n            self.logger.debug(\"Found js key: {0}\", m.group(1))\n            js_url = m.group(0)\n            res = http.get(urljoin(self.url, js_url))\n\n            self.logger.debug(\"Looking for stream URL...\")\n            for url in self.player_re.findall(res.text):\n                if \"adblock\" not in url:\n                    yield \"live\", HLSStream(self.session, url)\n\n\n__plugin__ = BritTV\n", "path": "src/streamlink/plugins/brittv.py"}]}