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

Embedded youtube-dl using an older different version of youtube-dl than what youtube-dl --version shows #14150

Closed
Electronickss opened this issue Sep 8, 2017 · 2 comments
Labels

Comments

@Electronickss
Copy link

@Electronickss Electronickss commented Sep 8, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.09.02. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.09.02

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Output

nick@PlexBox:/opt/TheaterTrailers$ python test.py
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2016.08.19
[debug] Python version 2.7.12 - Linux-4.4.0-92-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1
[debug] Proxy map: {}
[youtube:playlist] PLScC8g4bqD47c-qHlsfhGH3j6Bg7jzFy-: Downloading webpage
ERROR: Unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how 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/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 691, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 347, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1952, in _real_extract
    return self._extract_playlist(playlist_id)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/youtube.py", line 1922, in _extract_playlist
    page, 'title')
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 659, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/extractor/common.py", line 650, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Traceback (most recent call last):
  File "test.py", line 60, in <module>
    infoDownloader("https://www.youtube.com/playlist?list=PLScC8g4bqD47c-qHlsfhGH3j6Bg7jzFy-")
  File "test.py", line 30, in infoDownloader
    info = ydl.extract_info(playlist)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 706, in extract_info
    self.report_error(compat_str(e), e.format_traceback())
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 565, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/lib/python2.7/dist-packages/youtube_dl/YoutubeDL.py", line 535, in trouble
    raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Test Code

from __future__ import unicode_literals
import youtube_dl
import re
...
some other stuff
...
def infoDownloader(playlist):
  # Options for the info downloader
  ydl_opts = {
    'skip_download': True,
    #'ignoreerrors': True,
    #'playlistreverse': True,
    #'playliststart': 1,
    #'playlistend': 50,
    #'quiet': False,
    #'matchtitle': '.*\\btrailer\\b.*',
    #'extract_flat': True,
    'verbose': True,
  }
  with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    info = ydl.extract_info(playlist)

  print info

infoDownloader("https://www.youtube.com/playlist?list=PLScC8g4bqD47c-qHlsfhGH3j6Bg7jzFy-")

Description of your issue, suggested solution and other information

Hey Guys. I wrote a script last year that downloads trailers from Fandango's trailer list and adds them to Plex before they're in theaters and removes them when they hit. So that way when you sit down to watch a movie on plex, there will be a configurable amount of trailers before the movie starts of all new movies that are coming out. The link can be found here.

Anyway I ran into an issue on my installation that youtube-dl throws ERROR: Unable to extract title;. I am able to use the command line version to download but when I try to embed it in python code and download info from playlists, it gives me this error. I did install from pypi. On my host when I use the command line version, it shows 2017.09.2, however in the process of filling out a bug report, I noticed in the verbose output, its using 2016.08.19. I've looked through the issues and generally when this happens the answer seems to be "You'll need to update to the latest version" so I'm sure that it is it. I used pip list to show that its running the 2017.09.2 version as well as youtube-dl --version.

Playlist I was trying to download from: https://www.youtube.com/playlist?list=PLScC8g4bqD47c-qHlsfhGH3j6Bg7jzFy-

Any ideas?

@Electronickss
Copy link
Author

@Electronickss Electronickss commented Sep 8, 2017

Other Info

  • python: 2.7.12
  • os: Ubuntu 16.04.3 LTS
  • kernel: 4.4.0-92-generic
  • I do not have youtube-dl installed through apt (I thought maybe it got installed twice thus the version mismatch)
  • I did try uninstalling and reinstalling ¯\_(ツ)_/¯
@Electronickss
Copy link
Author

@Electronickss Electronickss commented Sep 8, 2017

In case anyone else comes across this, apparently pip in my specific case, was only installing and updating the python 3.5 version, so I needed to specify pip2. Closing issue

@dstftw dstftw added the invalid label Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.