Repository: yt-dlp/yt-dlp

Issue:
Medal.TV requires input for first-time visit
### 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)
- [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

Germany

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

As of a few weeks ago, Medal.tv started to show a "Download Medal" screen that required a manual user input (button click) to proceed to the video page itself. Clicking the "Continue in Browser" button instead appends the URL param `?mobilebypass=true` at the end of the link and reloads with the now accessible video page.

Manually adding `?mobilebypass=true` to the end of the URL works and successfully fetches the video.  

<details><summary>I'm aware you don't like screenshots, but this is for the actual relevant webpage, not code</summary>

![image](https://github.com/yt-dlp/yt-dlp/assets/33236409/f7817b35-d1ef-4ba8-8b16-8a6151ca33dc)  
![image](https://github.com/yt-dlp/yt-dlp/assets/33236409/80ab76e8-9140-42e1-9f6e-489b946ee5c6)
</details>


### 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: ['https://medal.tv/de/games/euro-truck-sim-2/clips/1FBcjEIkRoypA6/vFFvmZEfbk2g', '-vU']
[debug] Home config "yt-dlp.conf": ['-o', '~/Videos/ydl/%(id)s_%(title)s.%(ext)s', '--merge-output-format', 'mp4', '-f', '617+ba/137+ba/136+ba/135+ba/22+ba/18+ba/bestvideo+bestaudio', '--audio-format', 'mp3']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.11.16 from yt-dlp/yt-dlp [24f827875] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.0-full_build-www.gyan.dev (setts), ffprobe 6.0-full_build-www.gyan.dev
[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.35.5, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests
[debug] Loaded 1901 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2023.11.16 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2023.11.16 from yt-dlp/yt-dlp)
[generic] Extracting URL: https://medal.tv/de/games/euro-truck-sim-2/clips/1FBcjEIkRoypA6/vFFvmZEfbk2g
[generic] vFFvmZEfbk2g: Downloading webpage
[redirect] Following redirect to https://medal.tv/games/euro-truck-sim-2/clips/1FBcjEIkRoypA6/vFFvmZEfbk2g/
[MedalTV] Extracting URL: https://medal.tv/games/euro-truck-sim-2/clips/1FBcjEIkRoypA6/vFFvmZEfbk2g/
[MedalTV] 1FBcjEIkRoypA6: Downloading webpage
WARNING: [MedalTV] unable to extract next data; 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
ERROR: [MedalTV] 1FBcjEIkRoypA6: Could not find video information.; 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

  File "yt_dlp\extractor\common.py", line 715, in extract
  File "yt_dlp\extractor\medaltv.py", line 92, in _real_extract
```



Discussion:
@bashonly I would like to work on the problem. Can you please provide me the related test cases so that I can ensure I have correct changes before pushing. 
https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/medaltv.py
Thank you for the `?mobilebypass=true` tip! hope this gets fixed

Resolving patch:
diff --git a/yt_dlp/extractor/medaltv.py b/yt_dlp/extractor/medaltv.py
--- a/yt_dlp/extractor/medaltv.py
+++ b/yt_dlp/extractor/medaltv.py
@@ -8,7 +8,8 @@
     float_or_none,
     int_or_none,
     str_or_none,
-    traverse_obj
+    traverse_obj,
+    update_url_query,
 )
 
 
@@ -16,7 +17,7 @@ class MedalTVIE(InfoExtractor):
     _VALID_URL = r'https?://(?:www\.)?medal\.tv/games/[^/?#&]+/clips/(?P<id>[^/?#&]+)'
     _TESTS = [{
         'url': 'https://medal.tv/games/valorant/clips/jTBFnLKdLy15K',
-        'md5': '6930f8972914b6b9fdc2bb3918098ba0',
+        'md5': '03e4911fdcf7fce563090705c2e79267',
         'info_dict': {
             'id': 'jTBFnLKdLy15K',
             'ext': 'mp4',
@@ -33,8 +34,8 @@ class MedalTVIE(InfoExtractor):
             'duration': 13,
         }
     }, {
-        'url': 'https://medal.tv/games/cod%20cold%20war/clips/2mA60jWAGQCBH',
-        'md5': '3d19d426fe0b2d91c26e412684e66a06',
+        'url': 'https://medal.tv/games/cod-cold-war/clips/2mA60jWAGQCBH',
+        'md5': 'fc7a3e4552ae8993c1c4006db46be447',
         'info_dict': {
             'id': '2mA60jWAGQCBH',
             'ext': 'mp4',
@@ -52,7 +53,7 @@ class MedalTVIE(InfoExtractor):
             'duration': 23,
         }
     }, {
-        'url': 'https://medal.tv/games/cod%20cold%20war/clips/2um24TWdty0NA',
+        'url': 'https://medal.tv/games/cod-cold-war/clips/2um24TWdty0NA',
         'md5': 'b6dc76b78195fff0b4f8bf4a33ec2148',
         'info_dict': {
             'id': '2um24TWdty0NA',
@@ -81,7 +82,7 @@ class MedalTVIE(InfoExtractor):
     def _real_extract(self, url):
         video_id = self._match_id(url)
 
-        webpage = self._download_webpage(url, video_id)
+        webpage = self._download_webpage(update_url_query(url, {'mobilebypass': 'true'}), video_id)
 
         hydration_data = self._search_json(
             r'<script[^>]*>[^<]*\bhydrationData\s*=', webpage,


Test patch: