Repository: yt-dlp/yt-dlp

Issue:
Add support for Philharmonie de Paris (philharmoniedeparis.fr)
### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2022.06.29** ([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/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [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 am willing to share it if required

### Region

France

### Example URLs

- random example: https://philharmoniedeparis.fr/live/concert/1139191-hisaishi-symphonique
- list of other examples: https://philharmoniedeparis.fr/live/concerts

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

Those videos are not downloadable with yt-dlp.
They don't require account to be watched from within the browser.

### 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', '--list-formats', 'https://philharmoniedeparis.fr/live/concert/1139191-hisaishi-symphonique']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.06.29 [9d339c4] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-92132-g0a41a8bf29, ffprobe N-92132-g0a41a8bf29
[debug] Optional libraries: Cryptodome-3.15.0, 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
[debug] Downloading _update_spec from https://github.com/yt-dlp/yt-dlp/releases/download/2022.06.29/_update_spec
Latest version: 2022.06.29, Current version: 2022.06.29
yt-dlp is up to date (2022.06.29)
[debug] [generic] Extracting URL: https://philharmoniedeparis.fr/live/concert/1139191-hisaishi-symphonique
[generic] 1139191-hisaishi-symphonique: Requesting header
[redirect] Following redirect to https://philharmoniedeparis.fr/fr/live/concert/1139191-hisaishi-symphonique
[debug] [generic] Extracting URL: https://philharmoniedeparis.fr/fr/live/concert/1139191-hisaishi-symphonique
[generic] 1139191-hisaishi-symphonique: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] 1139191-hisaishi-symphonique: Downloading webpage
[generic] 1139191-hisaishi-symphonique: Extracting information
[debug] Looking for video embeds
ERROR: Unsupported URL: https://philharmoniedeparis.fr/fr/live/concert/1139191-hisaishi-symphonique
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1420, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1490, in __extract_info
  File "yt_dlp\extractor\common.py", line 640, in extract
  File "yt_dlp\extractor\generic.py", line 4130, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://philharmoniedeparis.fr/fr/live/concert/1139191-hisaishi-symphonique
```

[WSJ] Unable to extract video id
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.06.29** ([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

Anywhere

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

Test link:
https://www.wsj.com/articles/ceos-give-dueling-visions-of-the-future-of-work-11651735535

### 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
./yt-dlp -vU -F "https://www.wsj.com/articles/ceos-give-dueling-visions-of-the-future-of-work-11651735535"
[debug] Command-line config: ['-vU', '-F', 'https://www.wsj.com/articles/ceos-give-dueling-visions-of-the-future-of-work-11651735535']
[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.29 [9d339c41e] (zip)
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Python 3.9.13 (CPython 64bit) - macOS-12.4-arm64-arm-64bit 
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: avconv -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: avprobe -bsfs
[debug] exe versions: none
[debug] Optional libraries: sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.06.29, Current version: 2022.06.29
yt-dlp is up to date (2022.06.29)
[debug] [WSJArticle] Extracting URL: https://www.wsj.com/articles/ceos-give-dueling-visions-of-the-future-of-work-11651735535
[WSJArticle] ceos-give-dueling-visions-of-the-future-of-work-11651735535: Downloading webpage
ERROR: [WSJArticle] ceos-give-dueling-visions-of-the-future-of-work-11651735535: Unable to extract video id; 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/yt_dlp/extractor/common.py", line 640, in extract
    ie_result = self._real_extract(url)
  File "./yt-dlp/yt_dlp/extractor/wsj.py", line 118, in _real_extract
    video_id = self._search_regex(
  File "./yt-dlp/yt_dlp/extractor/common.py", line 1192, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/philharmoniedeparis.py b/yt_dlp/extractor/philharmoniedeparis.py
--- a/yt_dlp/extractor/philharmoniedeparis.py
+++ b/yt_dlp/extractor/philharmoniedeparis.py
@@ -1,9 +1,6 @@
 from .common import InfoExtractor
 from ..compat import compat_str
-from ..utils import (
-    try_get,
-    urljoin,
-)
+from ..utils import try_get
 
 
 class PhilharmonieDeParisIE(InfoExtractor):
@@ -12,27 +9,29 @@ class PhilharmonieDeParisIE(InfoExtractor):
                     https?://
                         (?:
                             live\.philharmoniedeparis\.fr/(?:[Cc]oncert/|embed(?:app)?/|misc/Playlist\.ashx\?id=)|
-                            pad\.philharmoniedeparis\.fr/doc/CIMU/
+                            pad\.philharmoniedeparis\.fr/(?:doc/CIMU/|player\.aspx\?id=)|
+                            philharmoniedeparis\.fr/fr/live/concert/|
+                            otoplayer\.philharmoniedeparis\.fr/fr/embed/
                         )
                         (?P<id>\d+)
                     '''
     _TESTS = [{
-        'url': 'http://pad.philharmoniedeparis.fr/doc/CIMU/1086697/jazz-a-la-villette-knower',
-        'md5': 'a0a4b195f544645073631cbec166a2c2',
+        'url': 'https://philharmoniedeparis.fr/fr/live/concert/1129666-danses-symphoniques',
+        'md5': '24bdb7e86c200c107680e1f7770330ae',
         'info_dict': {
-            'id': '1086697',
+            'id': '1129666',
             'ext': 'mp4',
-            'title': 'Jazz à la Villette : Knower',
+            'title': 'Danses symphoniques. Orchestre symphonique Divertimento - Zahia Ziouani. Bizet, de Falla, Stravinski, Moussorgski, Saint-Saëns',
         },
     }, {
-        'url': 'http://live.philharmoniedeparis.fr/concert/1032066.html',
+        'url': 'https://philharmoniedeparis.fr/fr/live/concert/1032066-akademie-fur-alte-musik-berlin-rias-kammerchor-rene-jacobs-passion-selon-saint-jean-de-johann',
         'info_dict': {
             'id': '1032066',
-            'title': 'md5:0a031b81807b3593cffa3c9a87a167a0',
+            'title': 'Akademie für alte Musik Berlin, Rias Kammerchor, René Jacobs : Passion selon saint Jean de Johann Sebastian Bach',
         },
         'playlist_mincount': 2,
     }, {
-        'url': 'http://live.philharmoniedeparis.fr/Concert/1030324.html',
+        'url': 'https://philharmoniedeparis.fr/fr/live/concert/1030324-orchestre-philharmonique-de-radio-france-myung-whun-chung-renaud-capucon-pascal-dusapin-johannes',
         'only_matching': True,
     }, {
         'url': 'http://live.philharmoniedeparis.fr/misc/Playlist.ashx?id=1030324&track=&lang=fr',
@@ -41,16 +40,15 @@ class PhilharmonieDeParisIE(InfoExtractor):
         'url': 'https://live.philharmoniedeparis.fr/embedapp/1098406/berlioz-fantastique-lelio-les-siecles-national-youth-choir-of.html?lang=fr-FR',
         'only_matching': True,
     }, {
-        'url': 'https://live.philharmoniedeparis.fr/embed/1098406/berlioz-fantastique-lelio-les-siecles-national-youth-choir-of.html?lang=fr-FR',
+        'url': 'https://otoplayer.philharmoniedeparis.fr/fr/embed/1098406?lang=fr-FR',
         'only_matching': True,
     }]
-    _LIVE_URL = 'https://live.philharmoniedeparis.fr'
 
     def _real_extract(self, url):
         video_id = self._match_id(url)
 
         config = self._download_json(
-            '%s/otoPlayer/config.ashx' % self._LIVE_URL, video_id, query={
+            'https://otoplayer.philharmoniedeparis.fr/fr/config/%s.json' % video_id, video_id, query={
                 'id': video_id,
                 'lang': 'fr-FR',
             })
@@ -72,9 +70,8 @@ def extract_entry(source):
                 if not format_url or format_url in format_urls:
                     continue
                 format_urls.add(format_url)
-                m3u8_url = urljoin(self._LIVE_URL, format_url)
                 formats.extend(self._extract_m3u8_formats(
-                    m3u8_url, video_id, 'mp4', entry_protocol='m3u8_native',
+                    format_url, video_id, 'mp4', entry_protocol='m3u8_native',
                     m3u8_id='hls', fatal=False))
             if not formats and not self.get_param('ignore_no_formats'):
                 return
@@ -82,21 +79,19 @@ def extract_entry(source):
             return {
                 'title': title,
                 'formats': formats,
+                'thumbnail': files.get('thumbnail'),
             }
-
-        thumbnail = urljoin(self._LIVE_URL, config.get('image'))
-
         info = extract_entry(config)
         if info:
             info.update({
                 'id': video_id,
-                'thumbnail': thumbnail,
             })
             return info
-
         entries = []
         for num, chapter in enumerate(config['chapters'], start=1):
             entry = extract_entry(chapter)
+            if entry is None:
+                continue
             entry['id'] = '%s-%d' % (video_id, num)
             entries.append(entry)
 


Test patch: