Repository: yt-dlp/yt-dlp

Issue:
premiershiprugby.com not working
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [X] I've checked that all provided URLs are alive and playable in a browser
- [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

UK (or maybe global)

### Description

premiershiprugby.com videos don't download.

### Verbose log

```shell
[debug] Command-line config: ['-vU', 'https://www.premiershiprugby.com/watch/full-match-harlequins-v-newcastle-falcons']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.10.2 (CPython 64bit) - macOS-11.6.4-x86_64-i386-64bit
[debug] exe versions: ffmpeg 5.0 (setts), ffprobe 5.0, phantomjs 2.1.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [generic] Extracting URL: https://www.premiershiprugby.com/watch/full-match-harlequins-v-newcastle-falcons
[generic] full-match-harlequins-v-newcastle-falcons: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] full-match-harlequins-v-newcastle-falcons: Downloading webpage
[generic] full-match-harlequins-v-newcastle-falcons: Extracting information
[debug] Looking for video embeds
[debug] Identified a JW Player JS loader
ERROR: [generic] Extractor failed to obtain "id"; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
Traceback (most recent call last):
  File "/usr/local/Cellar/yt-dlp/2022.2.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1381, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/Cellar/yt-dlp/2022.2.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1465, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/Cellar/yt-dlp/2022.2.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1517, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/local/Cellar/yt-dlp/2022.2.4/libexec/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 2308, in process_video_result
    raise ExtractorError('Extractor failed to obtain "id"', ie=info_dict['extractor'])
yt_dlp.utils.ExtractorError: [generic] Extractor failed to obtain "id"; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
```



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
@@ -1329,6 +1329,7 @@
     PuhuTVIE,
     PuhuTVSerieIE,
 )
+from .premiershiprugby import PremiershipRugbyIE
 from .presstv import PressTVIE
 from .projectveritas import ProjectVeritasIE
 from .prosiebensat1 import ProSiebenSat1IE
diff --git a/yt_dlp/extractor/premiershiprugby.py b/yt_dlp/extractor/premiershiprugby.py
new file mode 100644
--- /dev/null
+++ b/yt_dlp/extractor/premiershiprugby.py
@@ -0,0 +1,39 @@
+from .common import InfoExtractor
+from ..utils import int_or_none, traverse_obj
+
+
+class PremiershipRugbyIE(InfoExtractor):
+    _VALID_URL = r'https?://(?:\w+\.)premiershiprugby\.(?:com)/watch/(?P<id>[\w-]+)'
+    _TESTS = [{
+        'url': 'https://www.premiershiprugby.com/watch/full-match-harlequins-v-newcastle-falcons',
+        'info_dict': {
+            'id': '0_mbkb7ldt',
+            'title': 'Full Match: Harlequins v Newcastle Falcons',
+            'ext': 'mp4',
+            'thumbnail': 'https://open.http.mp.streamamg.com/p/3000914/sp/300091400/thumbnail/entry_id/0_mbkb7ldt//width/960/height/540/type/1/quality/75',
+            'duration': 6093.0,
+            'tags': ['video'],
+            'categories': ['Full Match', 'Harlequins', 'Newcastle Falcons', 'gallaher premiership'],
+        }
+    }]
+
+    def _real_extract(self, url):
+        display_id = self._match_id(url)
+        json_data = self._download_json(
+            f'https://article-cms-api.incrowdsports.com/v2/articles/slug/{display_id}',
+            display_id, query={'clientId': 'PRL'})['data']['article']
+
+        formats, subs = self._extract_m3u8_formats_and_subtitles(
+            json_data['heroMedia']['content']['videoLink'], display_id)
+
+        return {
+            'id': json_data['heroMedia']['content']['sourceSystemId'],
+            'display_id': display_id,
+            'title': traverse_obj(json_data, ('heroMedia', 'title')),
+            'formats': formats,
+            'subtitles': subs,
+            'thumbnail': traverse_obj(json_data, ('heroMedia', 'content', 'videoThumbnail')),
+            'duration': int_or_none(traverse_obj(json_data, ('heroMedia', 'content', 'metadata', 'msDuration')), scale=1000),
+            'tags': json_data.get('tags'),
+            'categories': traverse_obj(json_data, ('categories', ..., 'text')),
+        }


Test patch: