question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RegexNotFoundError: Unable to extract video url - Happens only on Web Server

See original GitHub issue

Checklist

  • I’m asking a question
  • I’ve looked through the README and FAQ for similar questions
  • I’ve searched the bugtracker for similar questions including closed ones

Question

I am trying to get the json response using the following command

python3 /usr/local/bin/youtube-dl -j "https://www.instagram.com/p/CJYpUabHXX7/?igshid=qmznpbi11tuk" --verbose

This works just fine on my local system but when I try it on a web server it says RegexNotFoundError: Unable to extract video url. I tried with Ubuntu 18.04, Ubuntu 20.04, and CentOS 8.3. Also, some of the urls work just fine on web server as well.

Here is the log using --verbose parameter

[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-j', 'https://www.instagram.com/p/CJYpUabHXX7/?igshid=qmznpbi11tuk', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2021.01.08
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-240.1.1.el8_3.x86_64-x86_64-with-centos-8.3.2011
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: Unable to extract video url; 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 803, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 824, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/instagram.py", line 216, in _real_extract
    video_url = self._og_search_video_url(webpage, secure=False)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1128, in _og_search_video_url
    return self._html_search_regex(regexes, html, name, **kargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1019, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1010, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract video url; 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.```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:25

github_iconTop GitHub Comments

1reaction
xihunycommented, Feb 5, 2021

Tried with different user agents and using cookies gives the same error. I used a chrome extension to generate cookies file for instagram website and used --cookies cookies.txt

Fixed by using authenticated cookies. Previously I was using the cookies I got without login into Instagram account.

0reactions
xihunycommented, Jan 11, 2021

Tried with different user agents and using cookies gives the same error. I used a chrome extension to generate cookies file for instagram website and used --cookies cookies.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Youtube_dl : ERROR : YouTube said: Unable to extract video ...
I'm making a little graphic interface with Python 3 which should download a youtube video with its URL. I ...
Read more >
yt-dlp - yt_dlp - extractor - common.py - 0xacab
information includes the real video URL, the video title, author and ... raise RegexNotFoundError('Unable to extract %s' % _name).
Read more >
yt-dlp problem on Instagram (SOLVED) - antiX-forum
The error messages tell me that the program can't “extract the uploader id”, and can't “extract video url”. The program's output tells me...
Read more >
youtube-dl error -- YouTube said: Unable to extract video data
My youtube-dl is the latest version: youtube-dl --version 2020.07.28. I found that some url can be downloaded, some can't.
Read more >
[SOLVED] youtube-dl can't download YT video - Devuan Forum
RegexNotFoundError : Unable to extract Initial JS player signature function name; please report this issue on https://yt-dl.org/bug .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found