Repository: yt-dlp/yt-dlp

Issue:
[urplay] Fails to download podcasts / audio-only formats
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

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

### Checklist

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

_No response_

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

When trying to download audio-only material from UR Play, no media is found by yt-dlp. (This material is mostly podcasts.)

### 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
[15:33:50 barsnick@moonlight yt-dlp]$ python3 -m yt_dlp -vU https://urplay.se/program/222967-en-foralders-dagbok-mitt-barn-skadar-sig-sjalv
[debug] Command-line config: ['-vU', 'https://urplay.se/program/222967-en-foralders-dagbok-mitt-barn-skadar-sig-sjalv']
[debug] User config "/home/barsnick/.config/yt-dlp/config": ['-o', '%(title)s [%(extractor)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 2022.08.08 [3157158f7] (source)
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Git HEAD: c220d9efc
[debug] Python 3.10.6 (CPython 64bit) - Linux-5.18.13-200.fc36.x86_64-x86_64-with-glibc2.35 (glibc 2.35)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.1
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.08, Current version: 2022.08.08
yt-dlp is up to date (2022.08.08)
[debug] [URPlay] Extracting URL: https://urplay.se/program/222967-en-foralders-dagbok-mitt-barn-skadar-sig-sjalv
[URPlay] 222967: Downloading webpage
[URPlay] 222967: Downloading JSON metadata
ERROR: [URPlay] 222967: 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/barsnick/Development/yt-dlp/yt_dlp/YoutubeDL.py", line 1441, in wrapper
    return func(self, *args, **kwargs)
  File "/home/barsnick/Development/yt-dlp/yt_dlp/YoutubeDL.py", line 1538, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/barsnick/Development/yt-dlp/yt_dlp/YoutubeDL.py", line 1596, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/home/barsnick/Development/yt-dlp/yt_dlp/YoutubeDL.py", line 2514, in process_video_result
    self.raise_no_formats(info_dict)
  File "/home/barsnick/Development/yt-dlp/yt_dlp/YoutubeDL.py", line 1009, in raise_no_formats
    raise ExtractorError(msg, video_id=info['id'], ie=info['extractor'],
yt_dlp.utils.ExtractorError: [URPlay] 222967: 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
```



Discussion:

Resolving patch:
diff --git a/yt_dlp/extractor/urplay.py b/yt_dlp/extractor/urplay.py
--- a/yt_dlp/extractor/urplay.py
+++ b/yt_dlp/extractor/urplay.py
@@ -14,12 +14,13 @@ class URPlayIE(InfoExtractor):
     _VALID_URL = r'https?://(?:www\.)?ur(?:play|skola)\.se/(?:program|Produkter)/(?P<id>[0-9]+)'
     _TESTS = [{
         'url': 'https://urplay.se/program/203704-ur-samtiden-livet-universum-och-rymdens-markliga-musik-om-vetenskap-kritiskt-tankande-och-motstand',
-        'md5': 'ff5b0c89928f8083c74bbd5099c9292d',
+        'md5': '5ba36643c77cc3d34ffeadad89937d1e',
         'info_dict': {
             'id': '203704',
             'ext': 'mp4',
             'title': 'UR Samtiden - Livet, universum och rymdens märkliga musik : Om vetenskap, kritiskt tänkande och motstånd',
             'description': 'md5:5344508a52aa78c1ced6c1b8b9e44e9a',
+            'thumbnail': r're:^https?://.+\.jpg',
             'timestamp': 1513292400,
             'upload_date': '20171214',
             'series': 'UR Samtiden - Livet, universum och rymdens märkliga musik',
@@ -29,6 +30,24 @@ class URPlayIE(InfoExtractor):
             'episode': 'Om vetenskap, kritiskt tänkande och motstånd',
             'age_limit': 15,
         },
+    }, {
+        'url': 'https://urplay.se/program/222967-en-foralders-dagbok-mitt-barn-skadar-sig-sjalv',
+        'info_dict': {
+            'id': '222967',
+            'ext': 'mp4',
+            'title': 'En förälders dagbok : Mitt barn skadar sig själv',
+            'description': 'md5:9f771eef03a732a213b367b52fe826ca',
+            'thumbnail': r're:^https?://.+\.jpg',
+            'timestamp': 1629676800,
+            'upload_date': '20210823',
+            'series': 'En förälders dagbok',
+            'duration': 1740,
+            'age_limit': 15,
+            'episode_number': 3,
+            'categories': 'count:2',
+            'tags': 'count:7',
+            'episode': 'Mitt barn skadar sig själv',
+        },
     }, {
         'url': 'https://urskola.se/Produkter/190031-Tripp-Trapp-Trad-Sovkudde',
         'info_dict': {
@@ -36,12 +55,17 @@ class URPlayIE(InfoExtractor):
             'ext': 'mp4',
             'title': 'Tripp, Trapp, Träd : Sovkudde',
             'description': 'md5:b86bffdae04a7e9379d1d7e5947df1d1',
+            'thumbnail': r're:^https?://.+\.jpg',
             'timestamp': 1440086400,
             'upload_date': '20150820',
             'series': 'Tripp, Trapp, Träd',
             'duration': 865,
+            'age_limit': 1,
+            'episode_number': 1,
+            'categories': [],
             'tags': ['Sova'],
             'episode': 'Sovkudde',
+            'season': 'Säsong 1',
         },
     }, {
         'url': 'http://urskola.se/Produkter/155794-Smasagor-meankieli-Grodan-i-vida-varlden',
@@ -69,7 +93,7 @@ def _real_extract(self, url):
         urplayer_streams = urplayer_data.get('streamingInfo', {})
 
         for k, v in urplayer_streams.get('raw', {}).items():
-            if not (k in ('sd', 'hd') and isinstance(v, dict)):
+            if not (k in ('sd', 'hd', 'mp3', 'm4a') and isinstance(v, dict)):
                 continue
             file_http = v.get('location')
             if file_http:


Test patch: