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 videos not working #18806

Open
antiboredom opened this issue Jan 10, 2019 · 14 comments
Open

C-SPAN videos not working #18806

antiboredom opened this issue Jan 10, 2019 · 14 comments

Comments

@antiboredom
Copy link

@antiboredom antiboredom commented Jan 10, 2019

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

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

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:

$ youtube-dl https://www.c-span.org/video/?456714-1/morning-hour -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://www.c-span.org/video/?456714-1/morning-hour', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.10
[debug] Git HEAD: 9115778
[debug] Python version 2.7.9 (CPython) - Linux-3.13.0-43-generic-x86_64-with-debian-jessie-sid
[debug] exe versions: ffmpeg 2.7.1, ffprobe 2.7.1
[debug] Proxy map: {}
[CSpan] 456714: Downloading webpage
[CSpan] 519407: Downloading JSON metadata
ERROR: CSpan said: Video not available at this time
Traceback (most recent call last):
  File "/home/sam/cspan/env/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 793, in extract_info
    ie_result = ie.extract(url)
  File "/home/sam/cspan/env/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/home/sam/cspan/env/lib/python2.7/site-packages/youtube_dl/extractor/cspan.py", line 137, in _real_extract
    raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
ExtractorError: CSpan said: Video not available at this time

Description of your issue, suggested solution and other information

Youtube-dl can no longer download some C-SPAN videos. I'm not sure if this is an issue with youtube-dl, or with C-SPAN itself, but videos do continue to work in the browser. I've also noticed that this seems to only be effecting newer videos (posted within the last few weeks). I almost wonder if it's related to the government shutdown? In any case, thanks for taking a look!

Some videos that work:

Some that don't work:

@bonacker
Copy link

@bonacker bonacker commented Jan 12, 2019

I have noticed that as well. There is an extremely easy way to get the m3u8 for all C-Span videos that you can use to play or record the video in VLC.

Go to the html source code (ctrl-U in Chrome and Firefox) for the C-Span webpage that contains the video and search "m3u8." The playable and recordable m3u8 is right there.

You can also download the m3u8 URL in a browser. Then, open it as a text file. You'll see several resolutions and bittrates for the video.

@theGuruWithin
Copy link

@theGuruWithin theGuruWithin commented Feb 14, 2019

Using Youtube-dl for C-Span was working for me a few days ago with following command:

c:>youtube-dl -f bestvideo[ext=mp
4]+bestaudio[ext=m4a]/mp4 https://www.c-span.org/video/?457781-1/venezuela-envoy
-elliott-abrams-testifies-political-crisis&live

Today it won't work... instead I get following when executing same command... Not sure what has changed in Youtube-dl or on C-Span site but clearly something has changed....

and I am using current version Youtube dl 2019.02.08

What follows is the command and response from website when I try today! Please help....

V:\Dots02a\War-Criminals\Elliot-Abrams\New folder>youtube-dl -f bestvideo[ext=mp
4]+bestaudio[ext=m4a]/mp4 https://www.c-span.org/video/?457781-1/venezuela-envoy
-elliott-abrams-testifies-political-crisis&live
[CSpan] 457781: Downloading webpage
Traceback (most recent call last):
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\runpy.p
y", line 193, in run_module_as_main
"main", mod_spec)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\runpy.p
y", line 85, in run_code
exec(code, run_globals)
File "C:\Users\Arthur Klein\AppData\Local\Programs\Python\Python37\Scripts\you
tube-dl.exe_main
.py", line 9, in
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl_init
.py", line 472, in main
real_main(argv)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl_init
.py", line 462, in _real_main
retcode = ydl.download(all_urls)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\YoutubeDL.py", line 2006, in download
url, force_generic_extractor=self.params.get('force_generic_extractor', Fals
e))
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\YoutubeDL.py", line 794, in extract_info
ie_result = ie.extract(url)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\extractor\common.py", line 508, in extract
ie_result = self._real_extract(url)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\extractor\cspan.py", line 82, in _real_extract
webpage = self._download_webpage(url, video_id)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\extractor\common.py", line 772, in _download_webpage
expected_status=expected_status)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\extractor\common.py", line 642, in _download_webpage_handle
content = self._webpage_read_content(urlh, url_or_request, video_id, note, e
rrnote, fatal, encoding=encoding)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\site-pa
ckages\youtube_dl\extractor\common.py", line 692, in _webpage_read_content
webpage_bytes = urlh.read()
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\http\cl
ient.py", line 454, in read
return self._readall_chunked()
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\http\cl
ient.py", line 564, in _readall_chunked
value.append(self._safe_read(chunk_left))
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\http\cl
ient.py", line 610, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\socket.
py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\ssl.py"
, line 1049, in recv_into
return self.read(nbytes, buffer)
File "c:\users\arthur klein\appdata\local\programs\python\python37\lib\ssl.py"
, line 908, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly close
d by the remote host
'live' is not recognized as an internal or external command,
operable program or batch file.

@pmjm
Copy link

@pmjm pmjm commented Mar 4, 2019

This issue is still present in the March 1, 2019 update.
Sample URL: https://www.c-span.org/video/?458420-1/mayor-tornek-pasadena-california
Youtube-DL reports "ERROR: Cspan said: Video not available at this time"

@terrylc
Copy link

@terrylc terrylc commented Apr 19, 2019

Issue still present with the April 17, 2019 update
Sample URL: https://www.c-span.org/video/?458861-1/land-fee
As before, Youtube-DL reports "ERROR: Cspan said: Video not available at this time"

@Razorholt
Copy link

@Razorholt Razorholt commented Jan 2, 2020

Error still there but thanks @bonacker for the tip :)

@AlbinoDrought
Copy link

@AlbinoDrought AlbinoDrought commented Mar 14, 2020

The URL used for finding MP4 links, http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s, seems to no longer work for some (new?) videos.

Working link 1 in the issue description resolves to https://www.c-span.org/assets/player/ajax-player.php?os=android&html5=program&id=518366 (still works as of 2020-03-13)

Failing link 1 in the issue description resolves to https://www.c-span.org/assets/player/ajax-player.php?os=android&html5=program&id=518828 (no good)

The affected links seem to always return:

{"video":{"@status":"Failed","error":{"#text":"Video not available at this time"}}}


This diff is outdated, please see bottom of comment

I'm not very familiar with Python or youtube-dl. Here is a WIP diff that retrieves some updated information from the page, including an m3u8 URL:

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 68ba05844..0acd2a316 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -12,6 +12,7 @@ from ..utils import (
     int_or_none,
     smuggle_url,
     unescapeHTML,
+    js_to_json,
 )
 from .senateisvp import SenateISVPIE
 from .ustream import UstreamIE
@@ -142,7 +143,17 @@ class CSpanIE(InfoExtractor):
             'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
             video_id)['video']
         if data['@status'] != 'Success':
-            raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
+            jw_setup_js = self._search_regex(
+                r'jwsetup\s*=\s*(\{[^;]+\});',
+                webpage, 'jwsetup config')
+            jw_setup = self._parse_json(
+                jw_setup_js, url, transform_source=js_to_json)
+            if jw_setup:
+                m3u8_url = jw_setup['playlist'][0]['sources'][0]['file']
+                # not sure where to go from here, _extract_m3u8_formats?
+                raise ExtractorError('%s retrieved m3u8 URL but not sure how to handle it: %s' % (self.IE_NAME, m3u8_url), expected=True)
+            else:
+                raise ExtractorError('%s said: %s, and we could not parse jw_setup' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
 
         doc = self._download_xml(
             'http://www.c-span.org/common/services/flashXml.php?%sid=%s' % (video_type, video_id),

and here is a testcase I am running with python test/test_download.py TestDownload.test_CSpan_5 to reproduce the behaviour:

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 67d6df4b0..68ba05844 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -73,6 +73,14 @@ class CSpanIE(InfoExtractor):
         # Audio Only
         'url': 'https://www.c-span.org/video/?437336-1/judiciary-antitrust-competition-policy-consumer-rights',
         'only_matching': True,
+    }, {
+        'url': 'https://www.c-span.org/video/?470351-1/president-trump-declares-national-emergency-response-coronavirus',
+        'info_dict': {
+            'id': '518828',
+            'ext': 'mp4',
+            'title': 'President Trump News Conference on Coronavirus Response',
+            'description': 'President Trump held a news conference at the White House on the coronavirus.',
+        },
     }]
     BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s'

Would love if anyone could continue with this or update for the newer links ❤️ ❤️


This is the diff I'm using with 2020.03.24 and I've had no issues so far:

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 67d6df4b0..505892a15 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -12,6 +12,7 @@ from ..utils import (
     int_or_none,
     smuggle_url,
     unescapeHTML,
+    js_to_json,
 )
 from .senateisvp import SenateISVPIE
 from .ustream import UstreamIE
@@ -73,6 +74,17 @@ class CSpanIE(InfoExtractor):
         # Audio Only
         'url': 'https://www.c-span.org/video/?437336-1/judiciary-antitrust-competition-policy-consumer-rights',
         'only_matching': True,
+    }, {
+        'url': 'https://www.c-span.org/video/?470351-1/president-trump-declares-national-emergency-response-coronavirus',
+        'info_dict': {
+            'id': '543252',
+            'ext': 'mp4',
+            'title': 'President Trump News Conference on Coronavirus Response',
+            'description': 'Speaking in the Rose Garden, President Trump declares the coronavirus pandemic a national emergency.',
+        },
+        'params': {
+            'skip_download': True,  # m3u8 downloads
+        },
     }]
     BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s'
 
@@ -130,12 +142,6 @@ class CSpanIE(InfoExtractor):
         def get_text_attr(d, attr):
             return d.get(attr, {}).get('#text')
 
-        data = self._download_json(
-            'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
-            video_id)['video']
-        if data['@status'] != 'Success':
-            raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
-
         doc = self._download_xml(
             'http://www.c-span.org/common/services/flashXml.php?%sid=%s' % (video_type, video_id),
             video_id)
@@ -145,6 +151,35 @@ class CSpanIE(InfoExtractor):
         title = find_xpath_attr(doc, './/string', 'name', 'title').text
         thumbnail = find_xpath_attr(doc, './/string', 'name', 'poster').text
 
+        data = self._download_json(
+            'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
+            video_id)['video']
+        if data['@status'] != 'Success':
+            jw_setup_js = self._search_regex(
+                r'jwsetup\s*=\s*(\{[^;]+\});',
+                webpage, 'jwsetup config')
+            jw_setup = self._parse_json(
+                jw_setup_js, video_id, transform_source=js_to_json)
+            if jw_setup:
+                m3u8_url = jw_setup['playlist'][0]['sources'][0]['file']
+                formats = self._extract_m3u8_formats(
+                    m3u8_url, video_id, 'mp4',
+                    entry_protocol='m3u8_native', m3u8_id='hls', fatal=False
+                )
+                if formats:
+                    for format in formats:
+                        format['http_headers'] = {'Referer': 'https://c-span.org/'}
+                    return {
+                        'id': video_id,
+                        'title': title,
+                        'description': description,
+                        'formats': formats,
+                    }
+                # not sure where to go from here, _extract_m3u8_formats?
+                raise ExtractorError('%s retrieved m3u8 URL but not sure how to handle it: %s' % (self.IE_NAME, m3u8_url), expected=True)
+            else:
+                raise ExtractorError('%s said: %s, and we could not parse jw_setup' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
+
         files = data['files']
         capfile = get_text_attr(data, 'capfile')

This diff successfully downloads links that were failing for me.

@Geremia
Copy link

@Geremia Geremia commented Mar 22, 2020

@AlbinoDrought I can confirm that your last patch works for me, with youtube-dl version 2020.03.08 on a C-SPAN user clip URL.

@Geremia Geremia mentioned this issue Mar 22, 2020
5 of 5 tasks complete
@gurjeet
Copy link

@gurjeet gurjeet commented Apr 8, 2020

@AlbinoDrought, I am using youtube-dl version 2019.06.27, and your patch doesn't seem to work for me.

$ youtube-dl https://www.c-span.org/video/?471024-1/coronavirus-curve-bending-california-number-cases-slows
[CSpan] 471024: Downloading webpage
[CSpan] 544454: Downloading JSON metadata
ERROR: CSpan retrieved m3u8 URL but not sure how to handle it: https://m3u8-1.c-spanvideo.org/program/program.544454.m3u8
@AlbinoDrought
Copy link

@AlbinoDrought AlbinoDrought commented Apr 8, 2020

Hey @gurjeet ,

I kept an old non-working diff in my previous comment which might've been misleading. I've hidden it now.

This is the working version of the diff - is it the one you applied?

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 68ba05844..0acd2a316 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -12,6 +12,7 @@ from ..utils import (
     int_or_none,
     smuggle_url,
     unescapeHTML,
+    js_to_json,
 )
 from .senateisvp import SenateISVPIE
 from .ustream import UstreamIE
@@ -142,7 +143,17 @@ class CSpanIE(InfoExtractor):
             'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
             video_id)['video']
         if data['@status'] != 'Success':
-            raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
+            jw_setup_js = self._search_regex(
+                r'jwsetup\s*=\s*(\{[^;]+\});',
+                webpage, 'jwsetup config')
+            jw_setup = self._parse_json(
+                jw_setup_js, url, transform_source=js_to_json)
+            if jw_setup:
+                m3u8_url = jw_setup['playlist'][0]['sources'][0]['file']
+                # not sure where to go from here, _extract_m3u8_formats?
+                raise ExtractorError('%s retrieved m3u8 URL but not sure how to handle it: %s' % (self.IE_NAME, m3u8_url), expected=True)
+            else:
+                raise ExtractorError('%s said: %s, and we could not parse jw_setup' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
 
         doc = self._download_xml(
             'http://www.c-span.org/common/services/flashXml.php?%sid=%s' % (video_type, video_id),

and here is a testcase I am running with python test/test_download.py TestDownload.test_CSpan_5 to reproduce the behaviour:

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 67d6df4b0..68ba05844 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -73,6 +73,14 @@ class CSpanIE(InfoExtractor):
         # Audio Only
         'url': 'https://www.c-span.org/video/?437336-1/judiciary-antitrust-competition-policy-consumer-rights',
         'only_matching': True,
+    }, {
+        'url': 'https://www.c-span.org/video/?470351-1/president-trump-declares-national-emergency-response-coronavirus',
+        'info_dict': {
+            'id': '518828',
+            'ext': 'mp4',
+            'title': 'President Trump News Conference on Coronavirus Response',
+            'description': 'President Trump held a news conference at the White House on the coronavirus.',
+        },
     }]
     BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s'

Would love if anyone could continue with this or update for the newer links ❤️ ❤️


This is the diff I'm using with 2020.03.24 and I've had no issues so far:

diff --git a/youtube_dl/extractor/cspan.py b/youtube_dl/extractor/cspan.py
index 67d6df4b0..505892a15 100644
--- a/youtube_dl/extractor/cspan.py
+++ b/youtube_dl/extractor/cspan.py
@@ -12,6 +12,7 @@ from ..utils import (
     int_or_none,
     smuggle_url,
     unescapeHTML,
+    js_to_json,
 )
 from .senateisvp import SenateISVPIE
 from .ustream import UstreamIE
@@ -73,6 +74,17 @@ class CSpanIE(InfoExtractor):
         # Audio Only
         'url': 'https://www.c-span.org/video/?437336-1/judiciary-antitrust-competition-policy-consumer-rights',
         'only_matching': True,
+    }, {
+        'url': 'https://www.c-span.org/video/?470351-1/president-trump-declares-national-emergency-response-coronavirus',
+        'info_dict': {
+            'id': '543252',
+            'ext': 'mp4',
+            'title': 'President Trump News Conference on Coronavirus Response',
+            'description': 'Speaking in the Rose Garden, President Trump declares the coronavirus pandemic a national emergency.',
+        },
+        'params': {
+            'skip_download': True,  # m3u8 downloads
+        },
     }]
     BRIGHTCOVE_URL_TEMPLATE = 'http://players.brightcove.net/%s/%s_%s/index.html?videoId=%s'
 
@@ -130,12 +142,6 @@ class CSpanIE(InfoExtractor):
         def get_text_attr(d, attr):
             return d.get(attr, {}).get('#text')
 
-        data = self._download_json(
-            'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
-            video_id)['video']
-        if data['@status'] != 'Success':
-            raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
-
         doc = self._download_xml(
             'http://www.c-span.org/common/services/flashXml.php?%sid=%s' % (video_type, video_id),
             video_id)
@@ -145,6 +151,35 @@ class CSpanIE(InfoExtractor):
         title = find_xpath_attr(doc, './/string', 'name', 'title').text
         thumbnail = find_xpath_attr(doc, './/string', 'name', 'poster').text
 
+        data = self._download_json(
+            'http://www.c-span.org/assets/player/ajax-player.php?os=android&html5=%s&id=%s' % (video_type, video_id),
+            video_id)['video']
+        if data['@status'] != 'Success':
+            jw_setup_js = self._search_regex(
+                r'jwsetup\s*=\s*(\{[^;]+\});',
+                webpage, 'jwsetup config')
+            jw_setup = self._parse_json(
+                jw_setup_js, video_id, transform_source=js_to_json)
+            if jw_setup:
+                m3u8_url = jw_setup['playlist'][0]['sources'][0]['file']
+                formats = self._extract_m3u8_formats(
+                    m3u8_url, video_id, 'mp4',
+                    entry_protocol='m3u8_native', m3u8_id='hls', fatal=False
+                )
+                if formats:
+                    for format in formats:
+                        format['http_headers'] = {'Referer': 'https://c-span.org/'}
+                    return {
+                        'id': video_id,
+                        'title': title,
+                        'description': description,
+                        'formats': formats,
+                    }
+                # not sure where to go from here, _extract_m3u8_formats?
+                raise ExtractorError('%s retrieved m3u8 URL but not sure how to handle it: %s' % (self.IE_NAME, m3u8_url), expected=True)
+            else:
+                raise ExtractorError('%s said: %s, and we could not parse jw_setup' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
+
         files = data['files']
         capfile = get_text_attr(data, 'capfile')

For what it's worth, that link successfully downloads in my patched version 2020.03.24 installation

@gurjeet
Copy link

@gurjeet gurjeet commented Apr 29, 2020

@AlbinoDrought, please disregard my complaint. As is apparent to me now, I was using a very old version of youtube-dl; in my defense, though, this is the latest version provided by Nixpkgs on macOS.

I now installed youtube-dl via Homebrew which provided version 2020.03.24. This version worked in the example I provided above, without any patches.

Thanks for following up! My spam filter caught the Github notification of your response, so I saw your response very late.

@Geremia
Copy link

@Geremia Geremia commented Jun 11, 2020

youtube-dl 2020.06.06
I'm getting "CSpan said: Video not available at this time" for all C-SPAN videos now:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.c-span.org/event/?472866']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.06.06
[debug] Python version 3.8.3 (CPython) - Linux-5.4.42-x86_64
[debug] exe versions: ffmpeg 4.2.1, ffprobe 4.2.1
[debug] Proxy map: {}
[generic] ?472866: Requesting header
[redirect] Following redirect to https://www.c-span.org/video/?472866-1/congressional-democrats-observe-moment-silence-george-floyd
[CSpan] 472866: Downloading webpage
[CSpan] 547699: Downloading JSON metadata
ERROR: CSpan said: Video not available at this time
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib64/python3.8/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib64/python3.8/site-packages/youtube_dl/extractor/cspan.py", line 137, in _real_extract
    raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True)
youtube_dl.utils.ExtractorError: CSpan said: Video not available at this time
@gootecks
Copy link

@gootecks gootecks commented Jun 21, 2020

Same here, anybody have any ideas?

Confirmed using youtube-dl --version 2020.06.16.1

:/mnt/blockstorage/clips# youtube-dl https://www.c-span.org/video/?473015-1/president-trump-holds-rally-tulsa --verbose [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['https://www.c-span.org/video/?473015-1/president-trump-holds-rally-tulsa', '--verbose'] [debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8 [debug] youtube-dl version 2020.06.16.1 [debug] Python version 3.8.2 (CPython) - Linux-5.4.0-31-generic-x86_64-with-glibc2.29 [debug] exe versions: ffmpeg 4.2.2, ffprobe 4.2.2 [debug] Proxy map: {} [CSpan] 473015: Downloading webpage [CSpan] 547978: Downloading JSON metadata ERROR: CSpan said: Video not available at this time Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info ie_result = ie.extract(url) File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/common.py", line 530, in extract ie_result = self._real_extract(url) File "/usr/local/lib/python3.8/dist-packages/youtube_dl/extractor/cspan.py", line 137, in _real_extract raise ExtractorError('%s said: %s' % (self.IE_NAME, get_text_attr(data, 'error')), expected=True) youtube_dl.utils.ExtractorError: CSpan said: Video not available at this time

@xkortex
Copy link

@xkortex xkortex commented Sep 23, 2020

Currently experiencing this with 2020.09.20.

I'm able to successfully grab about 1/4 of the videos I want. 1/4 give 403's, the rest give the usual ExtractorError: CSpan said: Video not available at this time.

What's weird is it seems both the working and non-working ones initialize in the same way, at least when viewed through Network tab in DevTools - GET to https://m3u8-1.c-spanvideo.org/program/program.552593.m3u8 followed by a sequence of multiple xhr GETs that look like Request URL: https://m3u8-1.c-spanvideo.org/ts1/001/1599773658.001.576.9.00900.1086648.ts

Raw curl of the ajax endpoint gives {"video":{"@status":"Failed","error":{"#text":"Video not available at this time"}}} which seems to be the common symptom.

Wild guess, some videos have a more accessible endpoint exposed through the ajax endpoint? Not sure how much can be further obtained through that endpoint, may be worthwhile to look into emulating the xhr chunk GETs.

@JamesTheAwesomeDude
Copy link

@JamesTheAwesomeDude JamesTheAwesomeDude commented Oct 23, 2020

I fixed this on my machine by setting the Referer to the .m3u URL from which YTDL hits all the .ts files.

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