Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vimeo: RegexNotFoundError('Unable to extract %s' % _name) #31311

Closed
5 tasks done
richlv opened this issue Oct 26, 2022 · 14 comments
Closed
5 tasks done

Vimeo: RegexNotFoundError('Unable to extract %s' % _name) #31311

richlv opened this issue Oct 26, 2022 · 14 comments
Labels
broken-IE problem with existing site extraction fixed patch-available

Comments

@richlv
Copy link

richlv commented Oct 26, 2022

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.12.17
  • 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

> youtube-dl -v 'https://player.vimeo.com/video/762862842'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://player.vimeo.com/video/762862842']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.10.7 (CPython) - Linux-6.0.1-1-default-x86_64-with-glibc2.36
[debug] exe versions: ffmpeg 4.4.3, ffprobe 4.4.3
[debug] Proxy map: {}
[vimeo] 762862842: Downloading webpage
ERROR: Unable to extract info section; 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/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 815, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 836, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 534, in extract
    ie_result = self._real_extract(url)
  File "/usr/bin/youtube-dl/youtube_dl/extractor/vimeo.py", line 651, in _real_extract
    config = self._parse_json(self._search_regex(
  File "/usr/bin/youtube-dl/youtube_dl/extractor/common.py", line 1012, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract info section; 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

Attempting to download a Vimeo video. The exact same URL opens just fine in a browser.
Tried the workarounds suggested in similar issues, no success.

@dirkf
Copy link
Contributor

dirkf commented Oct 26, 2022

Same problem with yt-dl 2021.12.17 [fdb16c0] and yt-dlp 2022.10.04 [4e0511f27]. I don't think this has been seen before.

The hydration variable has a new name:

--- old/youtube_dl/extractor/vimeo.py
+++ new/youtube_dl/extractor/vimeo.py
@@ -663,7 +663,7 @@
 
         if '//player.vimeo.com/video/' in url:
             config = self._parse_json(self._search_regex(
-                r'\bconfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
+                r'\b(?:playerC|c)onfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
             if config.get('view') == 4:
                 config = self._verify_player_video_password(
                     redirect_url, video_id, headers)

Then:

$ python -m youtube_dl -v -F 'https://player.vimeo.com/video/762862842'
[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://player.vimeo.com/video/762862842']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: fdb16c0d6
[debug] Python version 2.7.17 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[vimeo] 762862842: Downloading webpage
[vimeo] 762862842: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 762862842: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 762862842: Downloading fastly_skyfire m3u8 information
[vimeo] 762862842: Downloading fastly_skyfire m3u8 information
[vimeo] 762862842: Downloading akfire_interconnect_quic MPD information
[vimeo] 762862842: Downloading akfire_interconnect_quic MPD information
[vimeo] 762862842: Downloading fastly_skyfire MPD information
[vimeo] 762862842: Downloading fastly_skyfire MPD information
[info] Available formats for 762862842:
format code                                          extension  resolution note
hls-akfire_interconnect_quic_sep-audio-medium-audio  mp4        audio only 
hls-fastly_skyfire_sep-audio-medium-audio            mp4        audio only 
dash-akfire_interconnect_quic_sep-audio-f73b48d3     m4a        audio only DASH audio   64k , m4a_dash container, mp4a.40.2 (24000Hz)
dash-fastly_skyfire_sep-audio-f73b48d3               m4a        audio only DASH audio   64k , m4a_dash container, mp4a.40.2 (24000Hz)
dash-akfire_interconnect_quic_sep-audio-c4b195b3     m4a        audio only DASH audio   67k , m4a_dash container, opus  (48000Hz)
dash-fastly_skyfire_sep-audio-c4b195b3               m4a        audio only DASH audio   67k , m4a_dash container, opus  (48000Hz)
dash-akfire_interconnect_quic_sep-audio-33b5709a     m4a        audio only DASH audio   99k , m4a_dash container, opus  (48000Hz)
dash-fastly_skyfire_sep-audio-33b5709a               m4a        audio only DASH audio   99k , m4a_dash container, opus  (48000Hz)
dash-akfire_interconnect_quic_sep-audio-ea18f4fb     m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-ea18f4fb               m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-audio-449c0d17     m4a        audio only DASH audio  191k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-449c0d17               m4a        audio only DASH audio  191k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-audio-bf242b57     m4a        audio only DASH audio  255k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-bf242b57               m4a        audio only DASH audio  255k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-video-f73b48d3     mp4        426x240    DASH video  341k , mp4_dash container, avc1.640015, 25fps, video only
dash-fastly_skyfire_sep-video-f73b48d3               mp4        426x240    DASH video  341k , mp4_dash container, avc1.640015, 25fps, video only
hls-akfire_interconnect_quic_sep-435                 mp4        426x240     435k , avc1.640015, 25.0fps, video only
hls-fastly_skyfire_sep-435                           mp4        426x240     435k , avc1.640015, 25.0fps, video only
dash-akfire_interconnect_quic_sep-video-ea18f4fb     mp4        640x360    DASH video  777k , mp4_dash container, avc1.64001E, 25fps, video only
dash-fastly_skyfire_sep-video-ea18f4fb               mp4        640x360    DASH video  777k , mp4_dash container, avc1.64001E, 25fps, video only
hls-akfire_interconnect_quic_sep-809                 mp4        640x360     809k , avc1.64001E, 25.0fps, video only
hls-fastly_skyfire_sep-809                           mp4        640x360     809k , avc1.64001E, 25.0fps, video only
hls-akfire_interconnect_quic_sep-1357                mp4        960x540    1357k , avc1.64001F, 25.0fps, video only
hls-fastly_skyfire_sep-1357                          mp4        960x540    1357k , avc1.64001F, 25.0fps, video only
dash-akfire_interconnect_quic_sep-video-bf242b57     mp4        960x540    DASH video 1614k , mp4_dash container, avc1.64001F, 25fps, video only
dash-fastly_skyfire_sep-video-bf242b57               mp4        960x540    DASH video 1614k , mp4_dash container, avc1.64001F, 25fps, video only
http-240p                                            mp4        426x240    25fps
hls-akfire_interconnect_quic-372                     mp4        426x240     372k , avc1.640015, 25.0fps, mp4a.40.2
hls-fastly_skyfire-372                               mp4        426x240     372k , avc1.640015, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-f73b48d3         mp4        426x240    DASH video  405k , mp4_dash container, avc1.640015, 25fps, mp4a.40.2 (24000Hz)
dash-fastly_skyfire-video-f73b48d3                   mp4        426x240    DASH video  405k , mp4_dash container, avc1.640015, 25fps, mp4a.40.2 (24000Hz)
http-360p                                            mp4        640x360    25fps
hls-akfire_interconnect_quic-809                     mp4        640x360     809k , avc1.64001E, 25.0fps, mp4a.40.2
hls-fastly_skyfire-809                               mp4        640x360     809k , avc1.64001E, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-ea18f4fb         mp4        640x360    DASH video  904k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (48000Hz)
dash-fastly_skyfire-video-ea18f4fb                   mp4        640x360    DASH video  904k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (48000Hz)
http-540p                                            mp4        960x540    25fps
hls-akfire_interconnect_quic-1485                    mp4        960x540    1485k , avc1.64001F, 25.0fps, mp4a.40.2
hls-fastly_skyfire-1485                              mp4        960x540    1485k , avc1.64001F, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-bf242b57         mp4        960x540    DASH video 1869k , mp4_dash container, avc1.64001F, 25fps, mp4a.40.2 (48000Hz)
dash-fastly_skyfire-video-bf242b57                   mp4        960x540    DASH video 1869k , mp4_dash container, avc1.64001F, 25fps, mp4a.40.2 (48000Hz) (best)
$

@dirkf dirkf added broken-IE problem with existing site extraction patch-available labels Oct 26, 2022
@dirkf dirkf closed this as completed in 502cefa Oct 27, 2022
@hms54
Copy link

hms54 commented Oct 29, 2022

Thanks for fixing this problem.

Please excuse my ignorance of the process, but how can I get a Windows EXE that incorporates this fix?

@Phenomniverse
Copy link

@hms54 I assume this fix will eventually get pushed to an official release, at which time you should be able to update with youtube-dl -U

In the mean time, I got the fix to work by downloading the source code from the last official release, changing the code as per @dirkf 's fix, (any text editor can be used to change the code), and then running the python code directly from the command line with python -m youtube_dl -v [target url here].

@hms54
Copy link

hms54 commented Oct 30, 2022

Thanks, @Phenomniverse. I will give that a try. I'm using another download tool that relies on youtube-dl and am not sure I can make it work with the python script. But this may be a reasonable workaround until the new executable is distributed.

@hms54
Copy link

hms54 commented Nov 2, 2022

I was able to install Python to my Windows PC, install the youtube-dl module using pip, locate and patch vimeo.py, and successfully execute a player.vimeo.com download with the command you provided. Thanks.

@dirkf
Copy link
Contributor

dirkf commented Nov 3, 2022

The best way to use pip is to use it to install the git master. Then you get all the other fixes/improvements/new bugs at the same time:

@dirkf
Copy link
Contributor

dirkf commented Nov 30, 2022

Also note this work-around:

https://player.vimeo.com/video/nnnnnnnn --> https://vimeo.com/nnnnnnnn

@joepc74
Copy link

joepc74 commented Feb 8, 2023

new regex \b(?:playerC|c)onfig\s*=\s*({.+?})(?:\s*;|\n)

Same problem with yt-dl 2021.12.17 [fdb16c0] and yt-dlp 2022.10.04 [4e0511f27]. I don't think this has been seen before.

The hydration variable has a new name:

--- old/youtube_dl/extractor/vimeo.py
+++ new/youtube_dl/extractor/vimeo.py
@@ -663,7 +663,7 @@
 
         if '//player.vimeo.com/video/' in url:
             config = self._parse_json(self._search_regex(
-                r'\bconfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
+                r'\b(?:playerC|c)onfig\s*=\s*({.+?})\s*;', webpage, 'info section'), video_id)
             if config.get('view') == 4:
                 config = self._verify_player_video_password(
                     redirect_url, video_id, headers)

Then:

$ python -m youtube_dl -v -F 'https://player.vimeo.com/video/762862842'
[debug] System config: [u'--prefer-ffmpeg']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-F', u'https://player.vimeo.com/video/762862842']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.12.17
[debug] Git HEAD: fdb16c0d6
[debug] Python version 2.7.17 (CPython) - Linux-4.4.0-210-generic-i686-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 4.3, avprobe 4.3, ffmpeg 4.3, ffprobe 4.3
[debug] Proxy map: {}
[vimeo] 762862842: Downloading webpage
[vimeo] 762862842: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 762862842: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 762862842: Downloading fastly_skyfire m3u8 information
[vimeo] 762862842: Downloading fastly_skyfire m3u8 information
[vimeo] 762862842: Downloading akfire_interconnect_quic MPD information
[vimeo] 762862842: Downloading akfire_interconnect_quic MPD information
[vimeo] 762862842: Downloading fastly_skyfire MPD information
[vimeo] 762862842: Downloading fastly_skyfire MPD information
[info] Available formats for 762862842:
format code                                          extension  resolution note
hls-akfire_interconnect_quic_sep-audio-medium-audio  mp4        audio only 
hls-fastly_skyfire_sep-audio-medium-audio            mp4        audio only 
dash-akfire_interconnect_quic_sep-audio-f73b48d3     m4a        audio only DASH audio   64k , m4a_dash container, mp4a.40.2 (24000Hz)
dash-fastly_skyfire_sep-audio-f73b48d3               m4a        audio only DASH audio   64k , m4a_dash container, mp4a.40.2 (24000Hz)
dash-akfire_interconnect_quic_sep-audio-c4b195b3     m4a        audio only DASH audio   67k , m4a_dash container, opus  (48000Hz)
dash-fastly_skyfire_sep-audio-c4b195b3               m4a        audio only DASH audio   67k , m4a_dash container, opus  (48000Hz)
dash-akfire_interconnect_quic_sep-audio-33b5709a     m4a        audio only DASH audio   99k , m4a_dash container, opus  (48000Hz)
dash-fastly_skyfire_sep-audio-33b5709a               m4a        audio only DASH audio   99k , m4a_dash container, opus  (48000Hz)
dash-akfire_interconnect_quic_sep-audio-ea18f4fb     m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-ea18f4fb               m4a        audio only DASH audio  127k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-audio-449c0d17     m4a        audio only DASH audio  191k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-449c0d17               m4a        audio only DASH audio  191k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-audio-bf242b57     m4a        audio only DASH audio  255k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-fastly_skyfire_sep-audio-bf242b57               m4a        audio only DASH audio  255k , m4a_dash container, mp4a.40.2 (48000Hz)
dash-akfire_interconnect_quic_sep-video-f73b48d3     mp4        426x240    DASH video  341k , mp4_dash container, avc1.640015, 25fps, video only
dash-fastly_skyfire_sep-video-f73b48d3               mp4        426x240    DASH video  341k , mp4_dash container, avc1.640015, 25fps, video only
hls-akfire_interconnect_quic_sep-435                 mp4        426x240     435k , avc1.640015, 25.0fps, video only
hls-fastly_skyfire_sep-435                           mp4        426x240     435k , avc1.640015, 25.0fps, video only
dash-akfire_interconnect_quic_sep-video-ea18f4fb     mp4        640x360    DASH video  777k , mp4_dash container, avc1.64001E, 25fps, video only
dash-fastly_skyfire_sep-video-ea18f4fb               mp4        640x360    DASH video  777k , mp4_dash container, avc1.64001E, 25fps, video only
hls-akfire_interconnect_quic_sep-809                 mp4        640x360     809k , avc1.64001E, 25.0fps, video only
hls-fastly_skyfire_sep-809                           mp4        640x360     809k , avc1.64001E, 25.0fps, video only
hls-akfire_interconnect_quic_sep-1357                mp4        960x540    1357k , avc1.64001F, 25.0fps, video only
hls-fastly_skyfire_sep-1357                          mp4        960x540    1357k , avc1.64001F, 25.0fps, video only
dash-akfire_interconnect_quic_sep-video-bf242b57     mp4        960x540    DASH video 1614k , mp4_dash container, avc1.64001F, 25fps, video only
dash-fastly_skyfire_sep-video-bf242b57               mp4        960x540    DASH video 1614k , mp4_dash container, avc1.64001F, 25fps, video only
http-240p                                            mp4        426x240    25fps
hls-akfire_interconnect_quic-372                     mp4        426x240     372k , avc1.640015, 25.0fps, mp4a.40.2
hls-fastly_skyfire-372                               mp4        426x240     372k , avc1.640015, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-f73b48d3         mp4        426x240    DASH video  405k , mp4_dash container, avc1.640015, 25fps, mp4a.40.2 (24000Hz)
dash-fastly_skyfire-video-f73b48d3                   mp4        426x240    DASH video  405k , mp4_dash container, avc1.640015, 25fps, mp4a.40.2 (24000Hz)
http-360p                                            mp4        640x360    25fps
hls-akfire_interconnect_quic-809                     mp4        640x360     809k , avc1.64001E, 25.0fps, mp4a.40.2
hls-fastly_skyfire-809                               mp4        640x360     809k , avc1.64001E, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-ea18f4fb         mp4        640x360    DASH video  904k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (48000Hz)
dash-fastly_skyfire-video-ea18f4fb                   mp4        640x360    DASH video  904k , mp4_dash container, avc1.64001E, 25fps, mp4a.40.2 (48000Hz)
http-540p                                            mp4        960x540    25fps
hls-akfire_interconnect_quic-1485                    mp4        960x540    1485k , avc1.64001F, 25.0fps, mp4a.40.2
hls-fastly_skyfire-1485                              mp4        960x540    1485k , avc1.64001F, 25.0fps, mp4a.40.2
dash-akfire_interconnect_quic-video-bf242b57         mp4        960x540    DASH video 1869k , mp4_dash container, avc1.64001F, 25fps, mp4a.40.2 (48000Hz)
dash-fastly_skyfire-video-bf242b57                   mp4        960x540    DASH video 1869k , mp4_dash container, avc1.64001F, 25fps, mp4a.40.2 (48000Hz) (best)
$

@dirkf
Copy link
Contributor

dirkf commented Feb 8, 2023

This commit needs to pushed to the master branch.

@hdantas
Copy link

hdantas commented Feb 10, 2023

@dirkf that didn't work for me with this video but @joepc74 regex did (ie \b(?:playerC|c)onfig\s*=\s*({.+?})(?:\s*;|\n))

@dirkf
Copy link
Contributor

dirkf commented Feb 10, 2023

Bang on, thanks. Of course, non-strict JS can end a statement with newline as well as ;. So ; -> [;\n].

@pastidev
Copy link

This commit needs to pushed to the master branch.

How can i get the pathed version, i downloaded the master branch but it didn't work

aidankang pushed a commit to aidankang/youtube-dl that referenced this issue Sep 25, 2023
@auggie-lahey
Copy link

i think the regex is broken again, but here is how i fixed it on my end:
`
if '//player.vimeo.com/video/' in url:
regex = r'(?s)\b(?:playerC|c)onfig\s*=\s*({.+?})\s*[;\n]',
sr = self._search_regex(
regex,
webpage,
'info section').split("""</script>

<script>""")[0] print(sr) config = self._parse_json(sr, video_id) `

@dirkf
Copy link
Contributor

dirkf commented Mar 12, 2024

Final, I hope, fix merged as a96a45b.

@dirkf dirkf added the fixed label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broken-IE problem with existing site extraction fixed patch-available
Projects
None yet
Development

No branches or pull requests

8 participants