Repository: yt-dlp/yt-dlp

Issue:
Add support for ETTU.tv
### 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 a new site support request
- [X] I've verified that I'm running yt-dlp version **2023.02.17** ([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 none of provided URLs [violate any copyrights](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [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 am willing to share it if required

### Region

France

### Example URLs

https://www.ettu.tv/en-int/playerpage/1573849

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

Cannot download replays from ettu.tv

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', 'https://www.ettu.tv/en-int/playerpage/1573849']
[debug] User config "/home/cuicui/.config/yt-dlp/config": ['--merge-output-format', 'mkv']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.02.17 [a0a7c01] (zip)
[debug] Python 3.8.10 (CPython x86_64 64bit) - Linux-5.4.0-139-generic-x86_64-with-glibc2.29 (OpenSSL 1.1.1f  31 Mar 2020, glibc 2.31)
[debug] exe versions: ffmpeg 4.2.7, ffprobe 4.2.7, phantomjs 2.1.1
[debug] Optional libraries: certifi-2022.12.07, pycrypto-3.15.0, pyxattr-0.6.1, secretstorage-2.3.1, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.02.17, Current version: 2023.02.17
yt-dlp is up to date (2023.02.17)
[generic] Extracting URL: https://www.ettu.tv/en-int/playerpage/1573849
[generic] 1573849: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] 1573849: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.ettu.tv/en-int/playerpage/1573849
Traceback (most recent call last):
  File "/home/cuicui/Sync/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1502, in wrapper
    return func(self, *args, **kwargs)
  File "/home/cuicui/Sync/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1578, in __extract_info
    ie_result = ie.extract(url)
  File "/home/cuicui/Sync/bin/yt-dlp/yt_dlp/extractor/common.py", line 693, in extract
    ie_result = self._real_extract(url)
  File "/home/cuicui/Sync/bin/yt-dlp/yt_dlp/extractor/generic.py", line 2509, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.ettu.tv/en-int/playerpage/1573849
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py
--- a/yt_dlp/extractor/_extractors.py
+++ b/yt_dlp/extractor/_extractors.py
@@ -553,6 +553,7 @@
     ESPNCricInfoIE,
 )
 from .esri import EsriVideoIE
+from .ettutv import EttuTvIE
 from .europa import EuropaIE, EuroParlWebstreamIE
 from .europeantour import EuropeanTourIE
 from .eurosport import EurosportIE
diff --git a/yt_dlp/extractor/ettutv.py b/yt_dlp/extractor/ettutv.py
new file mode 100644
--- /dev/null
+++ b/yt_dlp/extractor/ettutv.py
@@ -0,0 +1,60 @@
+from .common import InfoExtractor
+from ..utils import bool_or_none, traverse_obj, unified_timestamp, url_or_none
+
+
+class EttuTvIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:www\.)?ettu\.tv/[^?#]+/playerpage/(?P<id>[0-9]+)'
+
+    _TESTS = [{
+        'url': 'https://www.ettu.tv/en-int/playerpage/1573849',
+        'md5': '5874b7639a2aa866d1f6c3a4037c7c09',
+        'info_dict': {
+            'id': '1573849',
+            'title': 'Ni Xia Lian - Shao Jieni',
+            'description': 'ITTF Europe Top 16 Cup',
+            'timestamp': 1677348600,
+            'upload_date': '20230225',
+            'thumbnail': r're:^https?://.*\.(?:jpg|png)',
+            'ext': 'mp4',
+        },
+    }, {
+        'url': 'https://www.ettu.tv/en-int/playerpage/1573753',
+        'md5': '1fc094bf96cf2d5ec0f434d3a6dec9aa',
+        'info_dict': {
+            'id': '1573753',
+            'title': 'Qiu Dang - Jorgic Darko',
+            'description': 'ITTF Europe Top 16 Cup',
+            'timestamp': 1677423600,
+            'upload_date': '20230226',
+            'thumbnail': r're:^https?://.*\.(?:jpg|png)',
+            'ext': 'mp4',
+        },
+    }]
+
+    def _real_extract(self, url):
+        video_id = self._match_id(url)
+
+        player_settings = self._download_json(
+            f'https://www.ettu.tv/api/v3/contents/{video_id}/player-settings', video_id, query={
+                'language': 'en',
+                'showTitle': 'true',
+                'device': 'desktop',
+            })
+
+        stream_response = self._download_json(player_settings['streamAccess'], video_id, data={})
+
+        formats, subtitles = self._extract_m3u8_formats_and_subtitles(
+            stream_response['data']['stream'], video_id, 'mp4')
+
+        return {
+            'id': video_id,
+            'formats': formats,
+            'subtitles': subtitles,
+            **traverse_obj(player_settings, {
+                'title': 'title',
+                'description': ('metaInformation', 'competition'),
+                'thumbnail': ('image', {url_or_none}),
+                'timestamp': ('date', {unified_timestamp}),
+                'is_live': ('isLivestream', {bool_or_none}),
+            })
+        }


Test patch: