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

[CSpan] UnboundLocalError: local variable 'video_type' referenced before assignment #8032

Closed
spvkgn opened this issue Dec 28, 2015 · 2 comments
Closed
Labels
bug

Comments

@spvkgn
Copy link

@spvkgn spvkgn commented Dec 28, 2015

~ $ youtube-dl -v http://www.c-span.org/video/?319979-1/european-security-ukraine                                                           
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://www.c-span.org/video/?319979-1/european-security-ukraine']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.12.23
[debug] Python version 3.2.3 - Linux-3.13.0-68-generic-i686-with-LinuxMint-13-maya
[debug] exe versions: ffmpeg 2.8.3-dpkg, ffprobe 2.8.3-dpkg, rtmpdump 2.4
[debug] Proxy map: {}
[CSpan] 319979: Downloading webpage
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 1677, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/YoutubeDL.py", line 665, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/extractor/common.py", line 291, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python3.2/dist-packages/youtube_dl/extractor/cspan.py", line 78, in _real_extract
    'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
UnboundLocalError: local variable 'video_type' referenced before assignment
@bonacker
Copy link

@bonacker bonacker commented Dec 28, 2015

While I was writing this offline about C-Span no longer working, the above person posted the same issue! For what it's worth, I'll post my log as well.

C-Span extractor stopped working
This used to be the format of their webpages containing the video
http://www.c-span.org/video/?328373-1/qa-amy-chozick

Now it's
http://www.c-spanvideo.org/program/Abell

This is the log for http://www.c-spanvideo.org/program/BBCParli

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-i', u'--write-info-json', u'http://www.c-spanvideo.org/program/BBCParli', u'-o', u'c:/recordings%(title)s.mp5']
[debug] Encodings: locale cp1252, fs mbcs, out None, pref cp1252
[debug] youtube-dl version 2015.12.23
[debug] Python version 2.7.10 - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-76860-g72eaf72, ffprobe N-75426-g8c9853a, rtmpdump 2.3
[debug] Proxy map: {}
[generic] BBCParli: Requesting header
[redirect] Following redirect to http://www.c-span.org/video/?402278-1/bbc-parliament-yearend-review
[CSpan] 402278: Downloading webpage
ERROR: local variable 'video_type' referenced before assignment
Traceback (most recent call last):
File "youtube_dl\YoutubeDL.pyo", line 665, in extract_info
File "youtube_dl\extractor\common.pyo", line 291, in extract
File "youtube_dl\extractor\cspan.pyo", line 78, in _real_extract
UnboundLocalError: local variable 'video_type' referenced before assignment

@yan12125 yan12125 added the bug label Dec 28, 2015
jaimeMF added a commit that referenced this issue Dec 28, 2015
@jaimeMF jaimeMF closed this in 6c6b8bd Dec 28, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Dec 28, 2015

Thanks for the report, it will work in the next version.

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
4 participants
You can’t perform that action at this time.