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

Return video title with youtube:search IE when using extract_flat: in_playlist #11260

Closed
adongy opened this issue Nov 21, 2016 · 0 comments
Closed
Labels

Comments

@adongy
Copy link

@adongy adongy commented Nov 21, 2016

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.11.18. 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 2016.11.18

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably 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:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

$ youtube-dl -v --flat-playlist --default-search="ytsearch" "blackpink" --skip-download --print-json
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '--flat-playlist', '--default-search=ytsearch', 'blackpink', '--skip-download', '--print-json']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.11.18
[debug] Git HEAD: fa6ac2a
[debug] Python version 3.5.2 - Linux-3.4.0+-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: ffmpeg 3.2, ffprobe 3.2
[debug] Proxy map: {}
{"_type": "url", "id": "TklpzjGlqFE", "url": "TklpzjGlqFE", "ie_key": "Youtube"}

Currently, if we pass the "flat-playlist" options to ytdl, or as youtube_dl.YoutubeDL({"extract_flat": "in_playlist"...}), the first result is returned as per https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L2267-L2299 .

However, this does not extract the video title from the scraped page, only the video id.

The request uses an URL similar to youtube:search_url IE, https://github.com/rg3/youtube-dl/blob/master/youtube_dl/extractor/youtube.py#L2309-L2329, which does extract the title.

Would it be possible to port the title extraction from youtube:search_url to youtube:search?

Thanks!

@Wandang Wandang mentioned this issue Feb 22, 2018
5 of 9 tasks complete
@dstftw dstftw closed this in 906ca68 Feb 22, 2018
dstftw added a commit that referenced this issue Feb 22, 2018
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.

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