youtube-dl: SVT Play is broken

Checklist

  • I’m reporting a broken site support
  • I’ve verified that I’m running youtube-dl version 2020.07.28
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar issues including closed ones

Verbose log

debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.svtplay.se/video/27782111/en-andra-chans', u'--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.07.28
[debug] Python version 2.7.16 (CPython) - Darwin-19.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2, rtmpdump 2.4
[debug] Proxy map: {}
[debug] Using fake IP 78.74.182.000 (SE) as X-Forwarded-For.
[SVTPlay] 27782111: Downloading webpage
ERROR: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info
ie_result = ie.extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/svt.py", line 229, in _real_extract
webpage, 'video id')
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1005, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Just moments ago youtube-dl stopped working for svtplay.se. It has been working all morning but suddenly stopped this afternoon.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 36 (2 by maintainers)

Commits related to this issue

Most upvoted comments

In extractor/svt.py, line 227, replace :

svt_id = self._search_regex(
            r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
            webpage, 'video id')

by

svt_id = self._search_regex(
            (r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
             r'"content":\{"id":"([\da-zA-Z-]+)'),
            webpage, 'video id')

Here’s a quick fix. I don’t guarantee that the downloaded video is the right one every time.

In extractor/svt.py, line 236, replace :

svt_id = self._search_regex(
                (r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
                 r'"content"\s*:\s*{.*?"id"\s*:\s*"([\da-zA-Z-]+)"'),
                webpage, 'video id')

by

svt_id = self._search_regex(
                (r'<video[^>]+data-video-id=["\']([\da-zA-Z-]+)',
                 r'"content"\s*:\s*{.*?"id"\s*:\s*"([\da-zA-Z-]+)"',
                 r'"videoSvtId"\s*:\s*"([\da-zA-Z-]+)"'),
                webpage, 'video id')