We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[bigo] Extractor returning invalid parameters
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.06.22.1** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

_No response_

### Description

As of about 3 weeks ago, I now receive the following error on all live streams: `Bigo says: paramters invalid (code 1)`

### Verbose log

```shell
$ yt-dlp -vU -g https://www.bigo.tv/841947363
[debug] Command-line config: ['-vU', '-g', 'https://www.bigo.tv/841947363']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.22.1 [a86e01e]
[debug] Python version 3.10.4 (CPython 64bit) - macOS-12.4-arm64-arm-64bit
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.06.22.1, Current version: 2022.06.22.1
yt-dlp is up to date (2022.06.22.1)
[debug] [Bigo] Extracting URL: https://www.bigo.tv/841947363
[Bigo] 841947363: Downloading JSON metadata
ERROR: [Bigo] 841947363: Bigo says: paramters invalid (code 1)
  File "/opt/homebrew/Cellar/yt-dlp/2022.6.22.1/libexec/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 647, in extract
    ie_result = self._real_extract(url)
  File "/opt/homebrew/Cellar/yt-dlp/2022.6.22.1/libexec/lib/python3.10/site-packages/yt_dlp/extractor/bigo.py", line 37, in _real_extract
    raise ExtractorError(
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `yt_dlp/extractor/bigo.py`
Content:
```
1 from .common import InfoExtractor
2 from ..utils import ExtractorError, urlencode_postdata
3 
4 
5 class BigoIE(InfoExtractor):
6     _VALID_URL = r'https?://(?:www\.)?bigo\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)'
7 
8     _TESTS = [{
9         'url': 'https://www.bigo.tv/ja/221338632',
10         'info_dict': {
11             'id': '6576287577575737440',
12             'title': '土よ〜💁‍♂️ 休憩室/REST room',
13             'thumbnail': r're:https?://.+',
14             'uploader': '✨Shin💫',
15             'uploader_id': '221338632',
16             'is_live': True,
17         },
18         'skip': 'livestream',
19     }, {
20         'url': 'https://www.bigo.tv/th/Tarlerm1304',
21         'only_matching': True,
22     }, {
23         'url': 'https://bigo.tv/115976881',
24         'only_matching': True,
25     }]
26 
27     def _real_extract(self, url):
28         user_id = self._match_id(url)
29 
30         info_raw = self._download_json(
31             'https://bigo.tv/studio/getInternalStudioInfo',
32             user_id, data=urlencode_postdata({'siteId': user_id}))
33 
34         if not isinstance(info_raw, dict):
35             raise ExtractorError('Received invalid JSON data')
36         if info_raw.get('code'):
37             raise ExtractorError(
38                 'Bigo says: %s (code %s)' % (info_raw.get('msg'), info_raw.get('code')), expected=True)
39         info = info_raw.get('data') or {}
40 
41         if not info.get('alive'):
42             raise ExtractorError('This user is offline.', expected=True)
43 
44         return {
45             'id': info.get('roomId') or user_id,
46             'title': info.get('roomTopic') or info.get('nick_name') or user_id,
47             'formats': [{
48                 'url': info.get('hls_src'),
49                 'ext': 'mp4',
50                 'protocol': 'm3u8',
51             }],
52             'thumbnail': info.get('snapshot'),
53             'uploader': info.get('nick_name'),
54             'uploader_id': user_id,
55             'is_live': True,
56         }
57
```
--- 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()

```

diff --git a/yt_dlp/extractor/bigo.py b/yt_dlp/extractor/bigo.py
--- a/yt_dlp/extractor/bigo.py
+++ b/yt_dlp/extractor/bigo.py
@@ -28,7 +28,7 @@
         user_id = self._match_id(url)
 
         info_raw = self._download_json(
-            'https://bigo.tv/studio/getInternalStudioInfo',
+            'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',
             user_id, data=urlencode_postdata({'siteId': user_id}))
 
         if not isinstance(info_raw, dict):
@@ -41,14 +41,14 @@
         if not info.get('alive'):
             raise ExtractorError('This user is offline.', expected=True)
 
+        formats, subs = self._extract_m3u8_formats_and_subtitles(
+            info.get('hls_src'), user_id, 'mp4', 'm3u8')
+
         return {
             'id': info.get('roomId') or user_id,
             'title': info.get('roomTopic') or info.get('nick_name') or user_id,
-            'formats': [{
-                'url': info.get('hls_src'),
-                'ext': 'mp4',
-                'protocol': 'm3u8',
-            }],
+            'formats': formats,
+            'subtitles': subs,
             'thumbnail': info.get('snapshot'),
             'uploader': info.get('nick_name'),
             'uploader_id': user_id,

{"golden_diff": "diff --git a/yt_dlp/extractor/bigo.py b/yt_dlp/extractor/bigo.py\n--- a/yt_dlp/extractor/bigo.py\n+++ b/yt_dlp/extractor/bigo.py\n@@ -28,7 +28,7 @@\n         user_id = self._match_id(url)\n \n         info_raw = self._download_json(\n-            'https://bigo.tv/studio/getInternalStudioInfo',\n+            'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',\n             user_id, data=urlencode_postdata({'siteId': user_id}))\n \n         if not isinstance(info_raw, dict):\n@@ -41,14 +41,14 @@\n         if not info.get('alive'):\n             raise ExtractorError('This user is offline.', expected=True)\n \n+        formats, subs = self._extract_m3u8_formats_and_subtitles(\n+            info.get('hls_src'), user_id, 'mp4', 'm3u8')\n+\n         return {\n             'id': info.get('roomId') or user_id,\n             'title': info.get('roomTopic') or info.get('nick_name') or user_id,\n-            'formats': [{\n-                'url': info.get('hls_src'),\n-                'ext': 'mp4',\n-                'protocol': 'm3u8',\n-            }],\n+            'formats': formats,\n+            'subtitles': subs,\n             'thumbnail': info.get('snapshot'),\n             'uploader': info.get('nick_name'),\n             'uploader_id': user_id,\n", "issue": "[bigo] Extractor returning invalid parameters\n### Checklist\n\n- [X] I'm reporting a broken site\n- [X] I've verified that I'm running yt-dlp version **2022.06.22.1** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)\n- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details\n- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)\n- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates\n- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)\n- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required\n\n### Region\n\n_No response_\n\n### Description\n\nAs of about 3 weeks ago, I now receive the following error on all live streams: `Bigo says: paramters invalid (code 1)`\n\n### Verbose log\n\n```shell\n$ yt-dlp -vU -g https://www.bigo.tv/841947363\r\n[debug] Command-line config: ['-vU', '-g', 'https://www.bigo.tv/841947363']\r\n[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8\r\n[debug] yt-dlp version 2022.06.22.1 [a86e01e]\r\n[debug] Python version 3.10.4 (CPython 64bit) - macOS-12.4-arm64-arm-64bit\r\n[debug] Checking exe version: ffmpeg -bsfs\r\n[debug] Checking exe version: ffprobe -bsfs\r\n[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1\r\n[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3\r\n[debug] Proxy map: {}\r\n[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest\r\nLatest version: 2022.06.22.1, Current version: 2022.06.22.1\r\nyt-dlp is up to date (2022.06.22.1)\r\n[debug] [Bigo] Extracting URL: https://www.bigo.tv/841947363\r\n[Bigo] 841947363: Downloading JSON metadata\r\nERROR: [Bigo] 841947363: Bigo says: paramters invalid (code 1)\r\n  File \"/opt/homebrew/Cellar/yt-dlp/2022.6.22.1/libexec/lib/python3.10/site-packages/yt_dlp/extractor/common.py\", line 647, in extract\r\n    ie_result = self._real_extract(url)\r\n  File \"/opt/homebrew/Cellar/yt-dlp/2022.6.22.1/libexec/lib/python3.10/site-packages/yt_dlp/extractor/bigo.py\", line 37, in _real_extract\r\n    raise ExtractorError(\n```\n\n", "before_files": [{"content": "from .common import InfoExtractor\nfrom ..utils import ExtractorError, urlencode_postdata\n\n\nclass BigoIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?bigo\\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)'\n\n    _TESTS = [{\n        'url': 'https://www.bigo.tv/ja/221338632',\n        'info_dict': {\n            'id': '6576287577575737440',\n            'title': '\u571f\u3088\u301c\ud83d\udc81\u200d\u2642\ufe0f \u4f11\u61a9\u5ba4/REST room',\n            'thumbnail': r're:https?://.+',\n            'uploader': '\u2728Shin\ud83d\udcab',\n            'uploader_id': '221338632',\n            'is_live': True,\n        },\n        'skip': 'livestream',\n    }, {\n        'url': 'https://www.bigo.tv/th/Tarlerm1304',\n        'only_matching': True,\n    }, {\n        'url': 'https://bigo.tv/115976881',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        user_id = self._match_id(url)\n\n        info_raw = self._download_json(\n            'https://bigo.tv/studio/getInternalStudioInfo',\n            user_id, data=urlencode_postdata({'siteId': user_id}))\n\n        if not isinstance(info_raw, dict):\n            raise ExtractorError('Received invalid JSON data')\n        if info_raw.get('code'):\n            raise ExtractorError(\n                'Bigo says: %s (code %s)' % (info_raw.get('msg'), info_raw.get('code')), expected=True)\n        info = info_raw.get('data') or {}\n\n        if not info.get('alive'):\n            raise ExtractorError('This user is offline.', expected=True)\n\n        return {\n            'id': info.get('roomId') or user_id,\n            'title': info.get('roomTopic') or info.get('nick_name') or user_id,\n            'formats': [{\n                'url': info.get('hls_src'),\n                'ext': 'mp4',\n                'protocol': 'm3u8',\n            }],\n            'thumbnail': info.get('snapshot'),\n            'uploader': info.get('nick_name'),\n            'uploader_id': user_id,\n            'is_live': True,\n        }\n", "path": "yt_dlp/extractor/bigo.py"}], "after_files": [{"content": "from .common import InfoExtractor\nfrom ..utils import ExtractorError, urlencode_postdata\n\n\nclass BigoIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?bigo\\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)'\n\n    _TESTS = [{\n        'url': 'https://www.bigo.tv/ja/221338632',\n        'info_dict': {\n            'id': '6576287577575737440',\n            'title': '\u571f\u3088\u301c\ud83d\udc81\u200d\u2642\ufe0f \u4f11\u61a9\u5ba4/REST room',\n            'thumbnail': r're:https?://.+',\n            'uploader': '\u2728Shin\ud83d\udcab',\n            'uploader_id': '221338632',\n            'is_live': True,\n        },\n        'skip': 'livestream',\n    }, {\n        'url': 'https://www.bigo.tv/th/Tarlerm1304',\n        'only_matching': True,\n    }, {\n        'url': 'https://bigo.tv/115976881',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        user_id = self._match_id(url)\n\n        info_raw = self._download_json(\n            'https://ta.bigo.tv/official_website/studio/getInternalStudioInfo',\n            user_id, data=urlencode_postdata({'siteId': user_id}))\n\n        if not isinstance(info_raw, dict):\n            raise ExtractorError('Received invalid JSON data')\n        if info_raw.get('code'):\n            raise ExtractorError(\n                'Bigo says: %s (code %s)' % (info_raw.get('msg'), info_raw.get('code')), expected=True)\n        info = info_raw.get('data') or {}\n\n        if not info.get('alive'):\n            raise ExtractorError('This user is offline.', expected=True)\n\n        formats, subs = self._extract_m3u8_formats_and_subtitles(\n            info.get('hls_src'), user_id, 'mp4', 'm3u8')\n\n        return {\n            'id': info.get('roomId') or user_id,\n            'title': info.get('roomTopic') or info.get('nick_name') or user_id,\n            'formats': formats,\n            'subtitles': subs,\n            'thumbnail': info.get('snapshot'),\n            'uploader': info.get('nick_name'),\n            'uploader_id': user_id,\n            'is_live': True,\n        }\n", "path": "yt_dlp/extractor/bigo.py"}]}