We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Dropbox] "No video formats found!" on some pages
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [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/yt-dlp/yt-dlp/wiki/FAQ#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 [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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)
- [ ] 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_

### Provide a description that is worded well enough to be understood

For some videos hosted on Dropbox yt-dlp gives an error "No video formats found!" Others are downloaded without problems. The example of a problematic URL is https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0 (Warning: NSFW!)

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-F', 'https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0', '-vU']
[debug] User config "/home/tkzv/yt-dlp.conf": ['--alias', 'tg', '--write-info-json -o "%(channel)s[%(id)s].%(ext)s"']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds [e5d4f1110] (pip)
[debug] Python 3.11.8 (CPython x86_64 64bit) - Linux-5.15.32-gentoo-r1-x86_64-AMD_FX-tm-8300_Eight-Core_Processor-with-glibc2.38 (OpenSSL 3.0.13 30 Jan 2024, glibc 2.38)
[debug] exe versions: ffmpeg 6.0.1 (fdk,setts), ffprobe 6.0.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, requests-2.31.0, sqlite3-3.45.1, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1807 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds)
[Dropbox] Extracting URL: https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0
[Dropbox] h4nny8z62nnhezj: Downloading webpage
ERROR: [Dropbox] h4nny8z62nnhezj: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
Traceback (most recent call last):
  File "/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1605, in wrapper
    return func(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1761, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1820, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 2808, in process_video_result
    self.raise_no_formats(info_dict)
  File "/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py", line 1103, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [Dropbox] h4nny8z62nnhezj: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
```


--- 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/dropbox.py`
Content:
```
1 import base64
2 import os.path
3 import re
4 
5 from .common import InfoExtractor
6 from ..compat import compat_urllib_parse_unquote
7 from ..utils import (
8     ExtractorError,
9     update_url_query,
10     url_basename,
11 )
12 
13 
14 class DropboxIE(InfoExtractor):
15     _VALID_URL = r'https?://(?:www\.)?dropbox\.com/(?:(?:e/)?scl/fi|sh?)/(?P<id>\w+)'
16     _TESTS = [
17         {
18             'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/youtube-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0',
19             'info_dict': {
20                 'id': 'nelirfsxnmcfbfh',
21                 'ext': 'mp4',
22                 'title': 'youtube-dl test video \'ä"BaW_jenozKc'
23             }
24         }, {
25             'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh',
26             'only_matching': True,
27         }, {
28             'url': 'https://www.dropbox.com/sh/2mgpiuq7kv8nqdf/AABy-fW4dkydT4GmWi2mdOUDa?dl=0&preview=Drone+Shot.mp4',
29             'only_matching': True,
30         }, {
31             'url': 'https://www.dropbox.com/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',
32             'only_matching': True,
33         }, {
34             'url': 'https://www.dropbox.com/e/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',
35             'only_matching': True,
36         },
37     ]
38 
39     def _real_extract(self, url):
40         mobj = self._match_valid_url(url)
41         video_id = mobj.group('id')
42         webpage = self._download_webpage(url, video_id)
43         fn = compat_urllib_parse_unquote(url_basename(url))
44         title = os.path.splitext(fn)[0]
45 
46         password = self.get_param('videopassword')
47         if (self._og_search_title(webpage) == 'Dropbox - Password Required'
48                 or 'Enter the password for this link' in webpage):
49 
50             if password:
51                 content_id = self._search_regex(r'content_id=(.*?)["\']', webpage, 'content_id')
52                 payload = f'is_xhr=true&t={self._get_cookies("https://www.dropbox.com").get("t").value}&content_id={content_id}&password={password}&url={url}'
53                 response = self._download_json(
54                     'https://www.dropbox.com/sm/auth', video_id, 'POSTing video password', data=payload.encode('UTF-8'),
55                     headers={'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})
56 
57                 if response.get('status') != 'authed':
58                     raise ExtractorError('Authentication failed!', expected=True)
59                 webpage = self._download_webpage(url, video_id)
60             elif self._get_cookies('https://dropbox.com').get('sm_auth'):
61                 webpage = self._download_webpage(url, video_id)
62             else:
63                 raise ExtractorError('Password protected video, use --video-password <password>', expected=True)
64 
65         formats, subtitles, has_anonymous_download = [], {}, False
66         for encoded in reversed(re.findall(r'registerStreamedPrefetch\s*\(\s*"[\w/+=]+"\s*,\s*"([\w/+=]+)"', webpage)):
67             decoded = base64.b64decode(encoded).decode('utf-8', 'ignore')
68             transcode_url = self._search_regex(
69                 r'\n.(https://[^\x03\x08\x12\n]+\.m3u8)', decoded, 'transcode url', default=None)
70             if not transcode_url:
71                 continue
72             formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id, 'mp4')
73             has_anonymous_download = self._search_regex(r'(anonymous:\tanonymous)', decoded, 'anonymous', default=False)
74             break
75 
76         # downloads enabled we can get the original file
77         if has_anonymous_download:
78             formats.append({
79                 'url': update_url_query(url, {'dl': '1'}),
80                 'format_id': 'original',
81                 'format_note': 'Original',
82                 'quality': 1
83             })
84 
85         return {
86             'id': video_id,
87             'title': title,
88             'formats': formats,
89             'subtitles': subtitles
90         }
91
```
--- 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/dropbox.py b/yt_dlp/extractor/dropbox.py
--- a/yt_dlp/extractor/dropbox.py
+++ b/yt_dlp/extractor/dropbox.py
@@ -65,12 +65,14 @@
         formats, subtitles, has_anonymous_download = [], {}, False
         for encoded in reversed(re.findall(r'registerStreamedPrefetch\s*\(\s*"[\w/+=]+"\s*,\s*"([\w/+=]+)"', webpage)):
             decoded = base64.b64decode(encoded).decode('utf-8', 'ignore')
+            if not has_anonymous_download:
+                has_anonymous_download = self._search_regex(
+                    r'(anonymous:\tanonymous)', decoded, 'anonymous', default=False)
             transcode_url = self._search_regex(
                 r'\n.(https://[^\x03\x08\x12\n]+\.m3u8)', decoded, 'transcode url', default=None)
             if not transcode_url:
                 continue
             formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id, 'mp4')
-            has_anonymous_download = self._search_regex(r'(anonymous:\tanonymous)', decoded, 'anonymous', default=False)
             break
 
         # downloads enabled we can get the original file

{"golden_diff": "diff --git a/yt_dlp/extractor/dropbox.py b/yt_dlp/extractor/dropbox.py\n--- a/yt_dlp/extractor/dropbox.py\n+++ b/yt_dlp/extractor/dropbox.py\n@@ -65,12 +65,14 @@\n         formats, subtitles, has_anonymous_download = [], {}, False\n         for encoded in reversed(re.findall(r'registerStreamedPrefetch\\s*\\(\\s*\"[\\w/+=]+\"\\s*,\\s*\"([\\w/+=]+)\"', webpage)):\n             decoded = base64.b64decode(encoded).decode('utf-8', 'ignore')\n+            if not has_anonymous_download:\n+                has_anonymous_download = self._search_regex(\n+                    r'(anonymous:\\tanonymous)', decoded, 'anonymous', default=False)\n             transcode_url = self._search_regex(\n                 r'\\n.(https://[^\\x03\\x08\\x12\\n]+\\.m3u8)', decoded, 'transcode url', default=None)\n             if not transcode_url:\n                 continue\n             formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id, 'mp4')\n-            has_anonymous_download = self._search_regex(r'(anonymous:\\tanonymous)', decoded, 'anonymous', default=False)\n             break\n \n         # downloads enabled we can get the original file\n", "issue": "[Dropbox] \"No video formats found!\" on some pages\n### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE\n\n- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\\* field\n\n### Checklist\n\n- [X] I'm reporting that yt-dlp is broken on a **supported** site\n- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))\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/yt-dlp/yt-dlp/wiki/FAQ#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 [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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- [ ] 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### Provide a description that is worded well enough to be understood\n\nFor some videos hosted on Dropbox yt-dlp gives an error \"No video formats found!\" Others are downloaded without problems. The example of a problematic URL is https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0 (Warning: NSFW!)\n\n### Provide verbose output that clearly demonstrates the problem\n\n- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)\n- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead\n- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below\n\n### Complete Verbose Output\n\n```shell\n[debug] Command-line config: ['-F', 'https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0', '-vU']\r\n[debug] User config \"/home/tkzv/yt-dlp.conf\": ['--alias', 'tg', '--write-info-json -o \"%(channel)s[%(id)s].%(ext)s\"']\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 nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds [e5d4f1110] (pip)\r\n[debug] Python 3.11.8 (CPython x86_64 64bit) - Linux-5.15.32-gentoo-r1-x86_64-AMD_FX-tm-8300_Eight-Core_Processor-with-glibc2.38 (OpenSSL 3.0.13 30 Jan 2024, glibc 2.38)\r\n[debug] exe versions: ffmpeg 6.0.1 (fdk,setts), ffprobe 6.0.1, rtmpdump 2.4\r\n[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.07.22, mutagen-1.47.0, requests-2.31.0, sqlite3-3.45.1, urllib3-2.1.0, websockets-12.0\r\n[debug] Proxy map: {}\r\n[debug] Request Handlers: urllib, requests, websockets\r\n[debug] Loaded 1807 extractors\r\n[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest\r\nLatest version: nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds\r\nyt-dlp is up to date (nightly@2024.03.22.232703 from yt-dlp/yt-dlp-nightly-builds)\r\n[Dropbox] Extracting URL: https://www.dropbox.com/s/h4nny8z62nnhezj/Side.Milf.Milk.mp4?dl=0\r\n[Dropbox] h4nny8z62nnhezj: Downloading webpage\r\nERROR: [Dropbox] h4nny8z62nnhezj: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U\r\nTraceback (most recent call last):\r\n  File \"/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py\", line 1605, in wrapper\r\n    return func(self, *args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py\", line 1761, in __extract_info\r\n    return self.process_ie_result(ie_result, download, extra_info)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py\", line 1820, in process_ie_result\r\n    ie_result = self.process_video_result(ie_result, download=download)\r\n                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py\", line 2808, in process_video_result\r\n    self.raise_no_formats(info_dict)\r\n  File \"/home/tkzv/.local/lib/python3.11/site-packages/yt_dlp/YoutubeDL.py\", line 1103, in raise_no_formats\r\n    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],\r\nyt_dlp.utils.ExtractorError: [Dropbox] h4nny8z62nnhezj: No video formats found!; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U\n```\n\n", "before_files": [{"content": "import base64\nimport os.path\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_urllib_parse_unquote\nfrom ..utils import (\n    ExtractorError,\n    update_url_query,\n    url_basename,\n)\n\n\nclass DropboxIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?dropbox\\.com/(?:(?:e/)?scl/fi|sh?)/(?P<id>\\w+)'\n    _TESTS = [\n        {\n            'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/youtube-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0',\n            'info_dict': {\n                'id': 'nelirfsxnmcfbfh',\n                'ext': 'mp4',\n                'title': 'youtube-dl test video \\'\u00e4\"BaW_jenozKc'\n            }\n        }, {\n            'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/sh/2mgpiuq7kv8nqdf/AABy-fW4dkydT4GmWi2mdOUDa?dl=0&preview=Drone+Shot.mp4',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/e/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',\n            'only_matching': True,\n        },\n    ]\n\n    def _real_extract(self, url):\n        mobj = self._match_valid_url(url)\n        video_id = mobj.group('id')\n        webpage = self._download_webpage(url, video_id)\n        fn = compat_urllib_parse_unquote(url_basename(url))\n        title = os.path.splitext(fn)[0]\n\n        password = self.get_param('videopassword')\n        if (self._og_search_title(webpage) == 'Dropbox - Password Required'\n                or 'Enter the password for this link' in webpage):\n\n            if password:\n                content_id = self._search_regex(r'content_id=(.*?)[\"\\']', webpage, 'content_id')\n                payload = f'is_xhr=true&t={self._get_cookies(\"https://www.dropbox.com\").get(\"t\").value}&content_id={content_id}&password={password}&url={url}'\n                response = self._download_json(\n                    'https://www.dropbox.com/sm/auth', video_id, 'POSTing video password', data=payload.encode('UTF-8'),\n                    headers={'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})\n\n                if response.get('status') != 'authed':\n                    raise ExtractorError('Authentication failed!', expected=True)\n                webpage = self._download_webpage(url, video_id)\n            elif self._get_cookies('https://dropbox.com').get('sm_auth'):\n                webpage = self._download_webpage(url, video_id)\n            else:\n                raise ExtractorError('Password protected video, use --video-password <password>', expected=True)\n\n        formats, subtitles, has_anonymous_download = [], {}, False\n        for encoded in reversed(re.findall(r'registerStreamedPrefetch\\s*\\(\\s*\"[\\w/+=]+\"\\s*,\\s*\"([\\w/+=]+)\"', webpage)):\n            decoded = base64.b64decode(encoded).decode('utf-8', 'ignore')\n            transcode_url = self._search_regex(\n                r'\\n.(https://[^\\x03\\x08\\x12\\n]+\\.m3u8)', decoded, 'transcode url', default=None)\n            if not transcode_url:\n                continue\n            formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id, 'mp4')\n            has_anonymous_download = self._search_regex(r'(anonymous:\\tanonymous)', decoded, 'anonymous', default=False)\n            break\n\n        # downloads enabled we can get the original file\n        if has_anonymous_download:\n            formats.append({\n                'url': update_url_query(url, {'dl': '1'}),\n                'format_id': 'original',\n                'format_note': 'Original',\n                'quality': 1\n            })\n\n        return {\n            'id': video_id,\n            'title': title,\n            'formats': formats,\n            'subtitles': subtitles\n        }\n", "path": "yt_dlp/extractor/dropbox.py"}], "after_files": [{"content": "import base64\nimport os.path\nimport re\n\nfrom .common import InfoExtractor\nfrom ..compat import compat_urllib_parse_unquote\nfrom ..utils import (\n    ExtractorError,\n    update_url_query,\n    url_basename,\n)\n\n\nclass DropboxIE(InfoExtractor):\n    _VALID_URL = r'https?://(?:www\\.)?dropbox\\.com/(?:(?:e/)?scl/fi|sh?)/(?P<id>\\w+)'\n    _TESTS = [\n        {\n            'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh/youtube-dl%20test%20video%20%27%C3%A4%22BaW_jenozKc.mp4?dl=0',\n            'info_dict': {\n                'id': 'nelirfsxnmcfbfh',\n                'ext': 'mp4',\n                'title': 'youtube-dl test video \\'\u00e4\"BaW_jenozKc'\n            }\n        }, {\n            'url': 'https://www.dropbox.com/s/nelirfsxnmcfbfh',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/sh/2mgpiuq7kv8nqdf/AABy-fW4dkydT4GmWi2mdOUDa?dl=0&preview=Drone+Shot.mp4',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',\n            'only_matching': True,\n        }, {\n            'url': 'https://www.dropbox.com/e/scl/fi/r2kd2skcy5ylbbta5y1pz/DJI_0003.MP4?dl=0&rlkey=wcdgqangn7t3lnmmv6li9mu9h',\n            'only_matching': True,\n        },\n    ]\n\n    def _real_extract(self, url):\n        mobj = self._match_valid_url(url)\n        video_id = mobj.group('id')\n        webpage = self._download_webpage(url, video_id)\n        fn = compat_urllib_parse_unquote(url_basename(url))\n        title = os.path.splitext(fn)[0]\n\n        password = self.get_param('videopassword')\n        if (self._og_search_title(webpage) == 'Dropbox - Password Required'\n                or 'Enter the password for this link' in webpage):\n\n            if password:\n                content_id = self._search_regex(r'content_id=(.*?)[\"\\']', webpage, 'content_id')\n                payload = f'is_xhr=true&t={self._get_cookies(\"https://www.dropbox.com\").get(\"t\").value}&content_id={content_id}&password={password}&url={url}'\n                response = self._download_json(\n                    'https://www.dropbox.com/sm/auth', video_id, 'POSTing video password', data=payload.encode('UTF-8'),\n                    headers={'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'})\n\n                if response.get('status') != 'authed':\n                    raise ExtractorError('Authentication failed!', expected=True)\n                webpage = self._download_webpage(url, video_id)\n            elif self._get_cookies('https://dropbox.com').get('sm_auth'):\n                webpage = self._download_webpage(url, video_id)\n            else:\n                raise ExtractorError('Password protected video, use --video-password <password>', expected=True)\n\n        formats, subtitles, has_anonymous_download = [], {}, False\n        for encoded in reversed(re.findall(r'registerStreamedPrefetch\\s*\\(\\s*\"[\\w/+=]+\"\\s*,\\s*\"([\\w/+=]+)\"', webpage)):\n            decoded = base64.b64decode(encoded).decode('utf-8', 'ignore')\n            if not has_anonymous_download:\n                has_anonymous_download = self._search_regex(\n                    r'(anonymous:\\tanonymous)', decoded, 'anonymous', default=False)\n            transcode_url = self._search_regex(\n                r'\\n.(https://[^\\x03\\x08\\x12\\n]+\\.m3u8)', decoded, 'transcode url', default=None)\n            if not transcode_url:\n                continue\n            formats, subtitles = self._extract_m3u8_formats_and_subtitles(transcode_url, video_id, 'mp4')\n            break\n\n        # downloads enabled we can get the original file\n        if has_anonymous_download:\n            formats.append({\n                'url': update_url_query(url, {'dl': '1'}),\n                'format_id': 'original',\n                'format_note': 'Original',\n                'quality': 1\n            })\n\n        return {\n            'id': video_id,\n            'title': title,\n            'formats': formats,\n            'subtitles': subtitles\n        }\n", "path": "yt_dlp/extractor/dropbox.py"}]}