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

[C-Span] Downloading extra videos after the first one #14248

Closed
NathanWailes opened this issue Sep 18, 2017 · 1 comment
Closed

[C-Span] Downloading extra videos after the first one #14248

NathanWailes opened this issue Sep 18, 2017 · 1 comment

Comments

@NathanWailes
Copy link

@NathanWailes NathanWailes commented Sep 18, 2017

  • I've verified and I assure that I'm running youtube-dl 2017.09.15
  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Bug report (encountered problems with youtube-dl)

The code I used:

from __future__ import unicode_literals
import youtube_dl


class MyLogger(object):
    def debug(self, msg):
        pass

    def warning(self, msg):
        pass

    def error(self, msg):
        print(msg)


def my_hook(d):
    if d['status'] == 'finished':
        print('Done downloading, now converting ...')


ydl_opts = {
    'format': 'bestaudio/best',
    'postprocessors': [{
        'key': 'FFmpegExtractAudio',
        'preferredcodec': 'flac',
        'preferredquality': '192',
    }],
    'max-downloads': 1,
    'verbose': True,
    'logger': MyLogger(),
    'progress_hooks': [my_hook],
}
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
    ydl.download(['https://www.c-span.org/video/?427932-1/former-president-obama-defends-affordable-care-act'])

The full verbose output:

[debug] Encodings: locale cp1252, fs mbcs, out UTF-8, pref cp1252
[debug] youtube-dl version 2017.09.15
[debug] Git HEAD: 98f91b2
[debug] Python version 3.5.2 - Windows-10-10.0.15063-SP0
[debug] exe versions: ffmpeg N-87294-gec1573f, ffprobe N-87294-gec1573f
[debug] Proxy map: {}
Done downloading, now converting ...
Done downloading, now converting ...
Done downloading, now converting ...

Process finished with exit code 0

Example URLs:


Description of your issue, suggested solution and other information

I want to be able to download audio versions of C-Span videos, but in the first video I tried, it downloaded three videos. The first video was the length of the video I wanted to get the audio from (~1 hour 11 minutes), while the second and third videos were around 45-minutes each and seemed to be completely different events. My guess is that a second and third videos were auto-played after the first one, and that youtube-dl didn't recognize them as being different.

I tried setting the max-downloads option to 1, but the second and third videos were still downloaded.

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Sep 18, 2017

Duplicate of #13030.

@remitamine remitamine closed this Sep 18, 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.