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

Unable to extract post url, --ap-mso=Comcast_SSO does not work #11257

Closed
outcoldman opened this issue Nov 21, 2016 · 41 comments · May be fixed by #11258
Closed

Unable to extract post url, --ap-mso=Comcast_SSO does not work #11257

outcoldman opened this issue Nov 21, 2016 · 41 comments · May be fixed by #11258
Assignees

Comments

@outcoldman
Copy link

@outcoldman outcoldman 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

Tried to use Comcast_SSO with fox and amc

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--ap-mso=Comcast_SSO', u'--ap-username=PRIVATE', u'--ap-password=PRIVATE', u'--verbose', u'http://www.fox.com/watch/813014083891/7684601088']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.11.18
[debug] Python version 2.7.12 - Darwin-16.1.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 3.2, ffprobe 3.2
[debug] Proxy map: {}
[FOX] 813014083891: Downloading webpage
[FOX] 813014083891: Downloading Provider Redirect Page
ERROR: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  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/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 694, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 357, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/fox.py", line 48, in _real_extract
    query['auth'] = self._extract_mvpd_auth(url, video_id, 'fbc-fox', resource)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1399, in _extract_mvpd_auth
    provider_redirect_page_res, 'Downloading Provider Login Page')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1322, in post_form
    post_url = self._html_search_regex(r'<form[^>]+action=(["\'])(?P<url>.+?)\1', form_page, 'post url', group='url')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 669, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 660, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--ap-mso=Comcast_SSO', u'--ap-username=PRIVATE', u'--ap-password=PRIVATE', u'--verbose', u'http://www.amc.com/shows/the-walking-dead/full-episodes/season-07/episode-05/go-getters']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.11.18
[debug] Python version 2.7.12 - Darwin-16.1.0-x86_64-i386-64bit
[debug] exe versions: avconv 11.4, avprobe 11.4, ffmpeg 3.2, ffprobe 3.2
[debug] Proxy map: {}
[AMCNetworks] go-getters: Downloading webpage
[AMCNetworks] go-getters: Downloading JSON metadata
[AMCNetworks] HJLoSZIQJoKa: Downloading Provider Redirect Page
ERROR: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  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/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 694, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 357, in extract
    return self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/amcnetworks.py", line 64, in _real_extract
    query['auth'] = self._extract_mvpd_auth(url, video_id, requestor_id, resource)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1399, in _extract_mvpd_auth
    provider_redirect_page_res, 'Downloading Provider Login Page')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1322, in post_form
    post_url = self._html_search_regex(r'<form[^>]+action=(["\'])(?P<url>.+?)\1', form_page, 'post url', group='url')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 669, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 660, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@outcoldman
Copy link
Author

@outcoldman outcoldman commented Nov 21, 2016

@outcoldman
Copy link
Author

@outcoldman outcoldman commented Nov 21, 2016

Seems like reason is very simple

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<title></title>
	<link rel="stylesheet" type="text/css" href="/static/css/junket/styles-dark.min.css?v=dc8323e">
		<script src="/static/js/CircleLoader.js" type="text/javascript"></script>
					<style type="text/css">
	/* REMOVED */
		</style>
	
</head>
<body>
	<div id="background"></div>
	<div class="scrim"></div>
	<main>
		<section class="container">
			<div class="content">
				<div id="loader" class="loader xfinity-logo">
					<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
						x="0px" y="0px" viewBox="0 0 80 80">
						<circle fill="none" stroke-dasharray="251px" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
							cx="40" cy="40" r="39" transform="rotate(0 40 40)">
						</circle>
					</svg>
				</div>
				<h1>You're automatically signed in with XFINITY and ready to watch.</h1>
				<p>Access to this experience is an added benefit of your XFINITY TV subscription.</p>
			</div>
			<footer>Questions? Visit our <a href="http://customer.xfinity.com/help-and-support/cable-tv/online-tv-through-partner-sites" target="_blank">FAQs</a></footer>
		</section>
	</main>
<script type="text/javascript">
	function initInterstitialRedirect(config) {
	var loopTime = config.delay-1000,
		circleLoader = new CircleLoader({
			container: document.getElementsByClassName('loader')[0],
			loopTime: loopTime
		});
	circleLoader.startLooping();

	setTimeout(function() {
		circleLoader.stopLooping();
		document.getElementById("loader").className += " checkmark";
	}, loopTime)

	setTimeout(function() { (config.window || window).location = config.continue; }, config.delay);
}
	initInterstitialRedirect({
		delay: 3000,
		continue: "https://login.comcast.net/oauth/authorize?......REMOVED....."
	});
</script>
</body>
</html>
@outcoldman
Copy link
Author

@outcoldman outcoldman commented Nov 21, 2016

Created PR, verified that with both links above after my change code works.

@mekantor
Copy link

@mekantor mekantor commented Nov 11, 2017

The regex in adobepass.py now needs to be:
r'continue:\s*"(https://oauth.xfinity.com/oauth/authorize\?.+)"',
instead of
r'continue:\s*"(https://login.comcast.net/oauth/authorize\?.+)"',

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

It seems this issue is still a problem. Are there any updates on this.

@132zed
Copy link

@132zed 132zed commented Feb 16, 2018

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

My comment was not clear I apologize. mekantor said in the previous comment that the code needs to be changed. does this fix the problem and if so where is it? I'm not finding those lines anywhere in adobepass.py

@mekantor
Copy link

@mekantor mekantor commented Feb 16, 2018

It looks like all the regex and logic has been completely replaced, so my comment doesn't apply anymore, at least not to what I see in the current master branch

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

Ah I see. Well hopefully this issue with comcast etc can be resolved.

@mekantor
Copy link

@mekantor mekantor commented Feb 16, 2018

Just tried it, seems to work

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

On Discovery or History channel etc? Any site that requires a comcast login doesnt seem to work for me. Example:

youtube-dl --list-formats --ap-mso=Comcast_SSO --ap-username=email@comcast.net -ap-password=password https://www.tlc.com/tv-shows/counting-on/full-episodes/josephs-wedding

I'm getting a error: batch file could not be read

@mekantor
Copy link

@mekantor mekantor commented Feb 16, 2018

worked for me, you missed a - in --ap-password

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

Actually I noticed an error saying http://www.history.com/shows/american-pickers/season-18/episode-8 the video url is invalid

@mekantor
Copy link

@mekantor mekantor commented Feb 16, 2018

I do get an error on that one, but that turned out to be because I don't have History Channel in my comcast subscription. I tested with a Fox URL and it worked, as well as the tlc.com URL above

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 16, 2018

Alright looks like subscriptions are still having in issues. Even when I tell it to use cookies I get ExtractorError: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies. An example link is: https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/james-b-s-story

@mekantor
Copy link

@mekantor mekantor commented Feb 18, 2018

Looks like TLC is not in my service, so unlocked episodes work fine, but anything requiring login gets the 403 response. @halolordkiller3 if you go directly to https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/james-b-s-story and "sign in to watch" does it work in the browser?

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Feb 18, 2018

@mekantor yes once i sign in it works. but passing the sign in credentials as shown earlier does not work. Example:

youtube-dl --list-formats --ap-mso=Comcast_SSO --ap-username=email@comcast.net --ap-password=password https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/james-b-s-story [Discovery] james-b-s-story: Downloading webpage [Discovery] james-b-s-story: Downloading JSON metadata [Discovery] james-b-s-story: Downloading JSON metadata ERROR: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies.

@BlohoJo
Copy link

@BlohoJo BlohoJo commented Feb 23, 2018

Charter/Spectrum here, also trying to download My 600-lb life, provider sign-in and play works fine in browser, with youtube-dl (latest version at time of this post) using --ap-mso=Charter_Direct or --cookies, get same error as halolordkiller3 ; "ERROR: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies."

Tried after logging in successfully in browser, still same error.

I remembered that for discovery you should use the "go" urls, I didn't realize "go" had been discontinued. So that sucks.

I did try running youtube-dl WITH the browser page opened AFTER successfully signing in, using both --ap-mso and --cookies, had no effect on issue.

--ap-mso:

K:\temp_ytdl>youtube-dl.exe -v --all-subs --embed-subs --no-check-certificate --
ap-mso Charter_Direct --ap-username cra67830@charter.net --ap-password wM2qViAQ2
cRWO8aY "https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/lisas-story"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--all-subs', '--embed-subs', '--no-check-cert
ificate', '--ap-mso', 'Charter_Direct', '--ap-username', 'PRIVATE', '--ap-passwo
rd', 'PRIVATE', 'https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/lisas
-story']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.02.22
[debug] Python version 3.4.4 (CPython) - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-86763-g341f012-Reino, ffprobe N-72220-gd0ac2f5
[debug] Proxy map: {}
[Discovery] lisas-story: Downloading webpage
[Discovery] lisas-story: Downloading JSON metadata
[Discovery] lisas-story: Downloading JSON metadata
ERROR: This video is only available via cable service provider subscription that
 is not currently supported. You may want to use --cookies.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 519, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 2199, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_defau
lt
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 72, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 680, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 634, in _download_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 539, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 528, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 40
3: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.
org/bug . Make sure you are using the latest version; type  youtube-dl -U  to up
date. Be sure to call youtube-dl with the --verbose flag and include its complet
e output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 519, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 2199, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_defau
lt
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 72, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 680, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 634, in _download_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 539, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 528, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 40
3: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.
org/bug . Make sure you are using the latest version; type  youtube-dl -U  to up
date. Be sure to call youtube-dl with the --verbose flag and include its complet
e output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 785, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 83, in _real_extract
youtube_dl.utils.ExtractorError: This video is only available via cable service
provider subscription that is not currently supported. You may want to use --coo
kies.

--ap-cookies

K:\temp_ytdl>youtube-dl.exe -v --all-subs --embed-subs --no-check-certificate --
cookies cookies.txt "https://www.tlc.com/tv-shows/my-600-lb-life/full-episodes/l
isas-story"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--all-subs', '--embed-subs', '--no-check-cert
ificate', '--cookies', 'cookies.txt', 'https://www.tlc.com/tv-shows/my-600-lb-li
fe/full-episodes/lisas-story']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.02.22
[debug] Python version 3.4.4 (CPython) - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-86763-g341f012-Reino, ffprobe N-72220-gd0ac2f5
[debug] Proxy map: {}
[Discovery] lisas-story: Downloading webpage
[Discovery] lisas-story: Downloading JSON metadata
[Discovery] lisas-story: Downloading JSON metadata
ERROR: This video is only available via cable service provider subscription that
 is not currently supported. You may want to use --cookies.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 519, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 2199, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_defau
lt
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 72, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 680, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 634, in _download_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 539, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 528, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 40
3: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.
org/bug . Make sure you are using the latest version; type  youtube-dl -U  to up
date. Be sure to call youtube-dl with the --verbose flag and include its complet
e output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 519, in _request_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 2199, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_defau
lt
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 72, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 680, in _download_json
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 634, in _download_webpage
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 539, in _download_webpage_handle
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 528, in _request_webpage
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 40
3: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.
org/bug . Make sure you are using the latest version; type  youtube-dl -U  to up
date. Be sure to call youtube-dl with the --verbose flag and include its complet
e output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\YoutubeDL.py", line 785, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkxz8b_33\bu
ild\youtube_dl\extractor\discovery.py", line 83, in _real_extract
youtube_dl.utils.ExtractorError: This video is only available via cable service
provider subscription that is not currently supported. You may want to use --coo
kies.

pagedumps.zip

@Jasbre
Copy link

@Jasbre Jasbre commented Apr 11, 2018

Doesn't seem to extract video data on FXNetworks / Simpsonsworld with DirecTV Now as well...

@remitamine remitamine mentioned this issue Oct 30, 2018
5 of 9 tasks complete
@poldon
Copy link

@poldon poldon commented Nov 15, 2018

Can we get an update on this issue? DirecTV is broken with this same issue also. Thanks!

@halolordkiller3
Copy link

@halolordkiller3 halolordkiller3 commented Dec 16, 2018

Any updates? Still broken as of April of this year or is all hope lost.

@mattmaddux
Copy link

@mattmaddux mattmaddux commented Dec 18, 2018

Still running into the original ("Unable to extract post url") issue. For me it's with anything that's locked to your provider on http://disneynow.go.com. I just tried NBC and Simpsons World and they both work fine. Here's the output of my --version, just so you can see I'm on the most recent one:

2018.12.17

And here's my verbose output when I try to download.

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'-o', u'%(series)s - S%(season_number)02dE%(episode_number)02d - %(title)s (WEB-DL %(height)ip).%(ext)s', u'--ap-mso', u'DTV', u'--ap-username', u'PRIVATE', u'--ap-password', u'PRIVATE', u'https://disneynow.go.com/shows/big-hero-6-the-series/season-01/episode-21-obake-yashiki/vdka5415272?pid=PL553044961']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.12.17
[debug] Python version 2.7.13 (CPython) - Linux-4.14.79-v7+-armv7l-with-debian-9.6
[debug] exe versions: ffmpeg git-2018-12-17-a1f0dd2, ffprobe git-2018-12-17-a1f0dd2, rtmpdump 2.4
[debug] Proxy map: {}
[Go] vdka5415272: Downloading webpage
[Go] VDKA5415272: Downloading JSON metadata
[Go] VDKA5415272: Downloading Provider Redirect Page
ERROR: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  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/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 793, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 508, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/go.py", line 137, in _real_extract
    url, video_id, requestor_id, resource)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1505, in _extract_mvpd_auth
    provider_redirect_page_res, self._DOWNLOADING_LOGIN_PAGE)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1360, in post_form
    post_url = self._html_search_regex(r'<form[^>]+action=(["\'])(?P<url>.+?)\1', form_page, 'post url', group='url')
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 992, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 983, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
RegexNotFoundError: Unable to extract post url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
@mattmaddux
Copy link

@mattmaddux mattmaddux commented Dec 18, 2018

I found my error was occurring only on Linux (Raspbian Stretch, specifically) and not on MacOS. I opened another issue for that: #18577

@TheJayMann
Copy link

@TheJayMann TheJayMann commented Jan 27, 2019

I am having this same issue with Comcast_SSO. After reviewing the stack trace, the adobepass.py code, and using fiddler to view the actual data being pulled via HTTPS, I've come to the conclusion that the code is not properly detecting the automatically logged in page. The code appears to be searching the page for the text automatically signing you in; however, this text does not appear on the page. For reference, here is what the autologin page contains for me:

<!DOCTYPE html>

<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<title></title>

<!-- javascript references removed for brevity -->
	
	<script type="tracking-data-digitalData">
		{
			"page" : {
				"pageInfo" : {
					"screenName" : "TVE interstitial",
					"language" : "${context.locale.language}",
					"referrerId" : "$partnerId"
				 },
				 "category" : {
                    "primaryCategory" : "login",
                    "designType" : "responsive",
                    "businessType" : "resi",
                    "siteType" : "selfservice"
                },
                "affiliate" : {
                    "name": "comcast",
                    "channel" : "web"
                },
                "codebase" : {
                    "name" : "cima login"
                }
			},
			"user" : [{
				"profile" : [{
					"profileInfo" : {
						"authenticationType" : "unauthenticated",
						"recognizationType" : "unrecognized"
					}
				}],
				"segment" : {
					"isLocalized" : false
				}
			}],
			"schemaVersion" : 0.11
		}

	</script>
<!-- CSS styling removed for brevity -->
</head>
<body>
	<div id="background"></div>
	<div class="scrim"></div>
	<main class="main-content">
		<section class="container">
			<div class="content">
				<div id="loader" class="loader xfinity-logo">
						<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
		 x="0px" y="0px" viewBox="0 0 80 80">
		<circle fill="none" stroke-dasharray="251px" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
				cx="40" cy="40" r="39" transform="rotate(0 10 10)">
		</circle>
	</svg>
				</div>
				<h1>You're automatically signed in with Xfinity and ready to watch.</h1>
				<p>Access to this experience is an added benefit of your Xfinity TV service.</p>
			</div>
			<footer>Questions? Visit our <a id="FAQ" href="http://customer.xfinity.com/help-and-support/cable-tv/online-tv-through-partner-sites" target="_blank" data-tracking="&#123;"eventAction&quot; : &quot;interstitial faq click&quot;&#125;">FAQs</a></footer>
		</section>
	</main>

	<script type="text/javascript">
		function initInterstitialRedirect(config) {
	var loopTime = config.delay-1000,
		circleLoader = new CircleLoader({
			container: document.getElementsByClassName('loader')[0],
			loopOnce: true,
			loopTime: loopTime
		});
	circleLoader.startLooping();

	setTimeout(function() {
		circleLoader.stopLooping();
		document.getElementById("loader").className += " checkmark";
	}, loopTime);

	setTimeout(function() { (config.window || window).location = config.continue; }, config.delay);
}
		
		initInterstitialRedirect({
			delay: 3000,
			continue: "<removed in case ticket is sensitive>"
		});

	</script>

		<script type="text/javascript">
		document.dispatchEvent(new CustomEvent("c-tracking-init-end"));
	</script>
	
</body>
</html>

Also, based on the code in adobepass.py, it appears that it is looking for the oauth url as being assigned to window.location. Based on the the page content I see in fiddler, the oauth url is being assigned to the continuefield being passed to theinitInterstitialRedirect` function, where I have removed the url as I do not know if the ticket in the url would be considered sensitive or not.

I have not had a chance to try, but it appears pull request #17636 would fix the issue.

@tv21
Copy link

@tv21 tv21 commented Apr 23, 2019

For those running from source code or compiling your own, the quick fix for Comcast Xfinity is to use this version of adobepass.py:

https://raw.githubusercontent.com/bhamboss/youtube-dl/patch-1/youtube_dl/extractor/adobepass.py

That is from https://github.com/bhamboss/youtube-dl/blob/patch-1/youtube_dl/extractor/adobepass.py and I can confirm this works with Xfinity's new login if you are coming in from an Xfinity IP address.

Just to be clear, Xfinity authenticates differently if you are coming in from one of their IP addresses vs. if you are coming in from the IP of some other provider. I tested the above patch coming from an Xfinity IP. I did NOT test it from another provider's IP.

If I run diff -u on the original and patched files I get this:

$ diff -u adobepass.py.original adobepass.py.patched
--- adobepass.py.original	2018-10-17 01:22:56.000000000 -0400
+++ adobepass.py.patched	2019-04-23 08:53:36.000000000 -0400
@@ -1433,6 +1433,14 @@
                             provider_redirect_page, 'oauth redirect')
                         self._download_webpage(
                             oauth_redirect_url, video_id, 'Confirming auto login')
+                    elif 'automatically signed in with' in provider_redirect_page:
+                        # Seems like comcast is rolling up new way of automatically signing customers
+                        oauth_redirect_url = self._html_search_regex(
+                            r'continue:\s*"(https://oauth.xfinity.com/oauth/authorize\?.+)"',
+                            provider_redirect_page, 'oauth redirect (signed)')
+                        # Just need to process the request. No useful data comes back
+                        self._download_webpage(
+                            oauth_redirect_url, video_id, 'Confirming auto login')
                     else:
                         if '<form name="signin"' in provider_redirect_page:
                             provider_login_page_res = provider_redirect_page_res

Note the use of "oauth.xfinity.com" rather than "login.comcast.net" which is what apparently worked back in 2016, but not in 2019.

@merval
Copy link

@merval merval commented Jun 1, 2019

I'm also having the issue:
Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 529, in extract ie_result = self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/go.py", line 137, in _real_extract url, video_id, requestor_id, resource) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1448, in _extract_mvpd_auth self._DOWNLOADING_LOGIN_PAGE) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/adobepass.py", line 1360, in post_form post_url = self._html_search_regex(r'<form[^>]+action=(["\'])(?P<url>.+?)\1', form_page, 'post url', group='url') File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1013, in _html_search_regex res = self._search_regex(pattern, string, name, default, fatal, flags, group) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 1004, in _search_regex raise RegexNotFoundError('Unable to extract %s' % _name)

the above fix works for youtube-dl from source, but is there a way to patch the pre-compiled version?

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 7, 2019

I, too, would like to know if there's a way to resolve pre-compiled versions to handle Comcast changes...

@TheJayMann
Copy link

@TheJayMann TheJayMann commented Jul 7, 2019

What I had done is take the pull request which fixes the issue, applied it to the most current source code at the time, then used docker to build it into a binary. I appear to have lost the docker information I used to build the code, but, given I have the time, unless someone else has the time and does it before I do, I could keep an up to date fork of the code, with the pull request applied, and have an Azure pipeline build process generate proper patched binaries as the main code is updated, at least until the proper code fix alluded in the comments of the pull request has been implemented.

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 8, 2019

So, are you pulling the source code every time it's updated -and- then applying this patch? Trying to decide how to do this. Very surprised it wasn't merged in for the last update(s) of the binary.

@TheJayMann
Copy link

@TheJayMann TheJayMann commented Jul 8, 2019

That is what I would plan to do. What I did was a one time implementation of that, with the intention of repeating it whenever I needed to upgrade the binary. I would imagine that it wouldn't be too difficult to automate this with the correct tools and hooks in place.

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 16, 2019

So I cloned the latest git and the changes you used in the adobepass.py above. It fails for auth issues.

Does yours still work? And if so, mind doing a -v so I can see what I may have different system wise?

Using python 3, as required for cookies, and apmso flags. Very weird.

@raleeper
Copy link
Contributor

@raleeper raleeper commented Jul 17, 2019

@derekcentrico I apply this patch to my local copy of adobepass.py whenever I update from GitHub. It may help you. I've kinda given up on pull requests for Comcast support since it is impossible for non-Comcast folks to test.

@@ -1432,12 +1432,21 @@ class AdobePassIE(InfoExtractor):
                     # Comcast page flow varies by video site and whether you
                     # are on Comcast's network.
                     provider_redirect_page, urlh = provider_redirect_page_res
-                    if 'automatically signing you in' in provider_redirect_page:
+                    # Check for Comcast auto login
+                    if 'automatically signed in' in provider_redirect_page:
+                        oauth_redirect_url = self._html_search_regex(
+                            r'continue:\s*[\'"]([^\'"]+)',
+                            provider_redirect_page, 'oauth redirect [1]')
+                        # Just need to process the request. No useful data comes back
+                        self._download_webpage(
+                            oauth_redirect_url, video_id, 'Confirming auto login [1]')
+                    elif 'automatically signing you in' in provider_redirect_page:
                         oauth_redirect_url = self._html_search_regex(
                             r'window\.location\s*=\s*[\'"]([^\'"]+)',
-                            provider_redirect_page, 'oauth redirect')
+                            provider_redirect_page, 'oauth redirect [2]')
+                        # Just need to process the request. No useful data comes back
                         self._download_webpage(
-                            oauth_redirect_url, video_id, 'Confirming auto login')
+                            oauth_redirect_url, video_id, 'Confirming auto login [2]')
                     else:
                         if '<form name="signin"' in provider_redirect_page:
                             provider_login_page_res = provider_redirect_page_res
@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 17, 2019

Cool. I'm not very git-smart here. Curious about the patch as I'm getting an error with it.... Is something missing?

derek@ubuntu:~/Desktop/YoutubeDL/youtube-dl$ git apply --stat patch.for.comcast
error: patch fragment without header at line 1: @@ -1432,12 +1432,21 @@ class AdobePassIE(InfoExtractor):

derek@ubuntu:~/Desktop/YoutubeDL/youtube-dl$ git am --signoff < patch.for.comcast
Patch is empty.

Note that the patch.for.comcast contains your above pasted into it.

@raleeper
Copy link
Contributor

@raleeper raleeper commented Jul 17, 2019

I am probably less git-smart. I omitted necessary headers from the text I pasted. Let's try again. Sorry.

diff --git a/youtube_dl/extractor/adobepass.py b/youtube_dl/extractor/adobepass.py
index 38dca1b0a..427d62d7f 100644
--- a/youtube_dl/extractor/adobepass.py
+++ b/youtube_dl/extractor/adobepass.py
@@ -1432,12 +1432,21 @@ class AdobePassIE(InfoExtractor):
                     # Comcast page flow varies by video site and whether you
                     # are on Comcast's network.
                     provider_redirect_page, urlh = provider_redirect_page_res
-                    if 'automatically signing you in' in provider_redirect_page:
+                    # Check for Comcast auto login
+                    if 'automatically signed in' in provider_redirect_page:
+                        oauth_redirect_url = self._html_search_regex(
+                            r'continue:\s*[\'"]([^\'"]+)',
+                            provider_redirect_page, 'oauth redirect [1]')
+                        # Just need to process the request. No useful data comes back
+                        self._download_webpage(
+                            oauth_redirect_url, video_id, 'Confirming auto login [1]')
+                    elif 'automatically signing you in' in provider_redirect_page:
                         oauth_redirect_url = self._html_search_regex(
                             r'window\.location\s*=\s*[\'"]([^\'"]+)',
-                            provider_redirect_page, 'oauth redirect')
+                            provider_redirect_page, 'oauth redirect [2]')
+                        # Just need to process the request. No useful data comes back
                         self._download_webpage(
-                            oauth_redirect_url, video_id, 'Confirming auto login')
+                            oauth_redirect_url, video_id, 'Confirming auto login [2]')
                     else:
                         if '<form name="signin"' in provider_redirect_page:
                             provider_login_page_res = provider_redirect_page_res
@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 18, 2019

Thanks. Sorry to be a real pain here, but what version of the app are you using that works for you? And, what command are you using if it still works? I have the latest source code and it's broken. I tried with and without the --cookies flag.

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '-f', 'bestvideo[ext!=webm]+bestaudio[ext!=webm]/best[ext!=webm]', 'https://www.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah?']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-15-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Proxy map: {}
[Discovery] stalked-on-the-savannah: Downloading webpage
[Discovery] stalked-on-the-savannah: Downloading JSON metadata
[Discovery] stalked-on-the-savannah: Downloading JSON metadata
ERROR: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/discovery.py", line 102, in _real_extract
display_id, headers=headers)
File "./youtube-dl/youtube_dl/extractor/common.py", line 892, in _download_json
expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 870, in _download_json_handle
expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 660, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 645, in _request_webpage
raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/common.py", line 627, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2227, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./youtube-dl/youtube_dl/extractor/discovery.py", line 102, in _real_extract
display_id, headers=headers)
File "./youtube-dl/youtube_dl/extractor/common.py", line 892, in _download_json
expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 870, in _download_json_handle
expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 660, in _download_webpage_handle
urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal, data=data, headers=headers, query=query, expected_status=expected_status)
File "./youtube-dl/youtube_dl/extractor/common.py", line 645, in _request_webpage
raise ExtractorError(errmsg, sys.exc_info()[2], cause=err)
youtube_dl.utils.ExtractorError: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/discovery.py", line 112, in _real_extract
' is not currently supported. You may want to use --cookies.', expected=True)
youtube_dl.utils.ExtractorError: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies.

@merval
Copy link

@merval merval commented Jul 18, 2019

For me, I just pulled down the latest source, updated the adobepass.py and built it. It works without cookies.

[debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'--ap-mso=Comcast_SSO', u'--ap-username=PRIVATE', u'--ap-password=PRIVATE', u'https://www.history.com/specials/moon-landing-the-lost-tapes/full-special'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.07.16 [debug] Python version 2.7.10 (CPython) - Darwin-18.6.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4 [debug] Proxy map: {} [aenetworks] moon-landing-the-lost-tapes: Downloading webpage [aenetworks] 1562402371608: Downloading JSON metadata [aenetworks] 1562402371608: Downloading Provider Redirect Page [aenetworks] 1562402371608: Confirming auto login [aenetworks] 1562402371608: Retrieving Session [aenetworks] 1562402371608: Retrieving Authorization Token [aenetworks] 1562402371608: Retrieving Media Token WARNING: unable to extract JSON-LD; 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. [aenetworks] 1562402371608: Downloading hls_high_ak SMIL data [aenetworks] 1562402371608: Downloading m3u8 information [aenetworks] 1562402371608: Downloading high_video_s3 SMIL data [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Checking video URL [aenetworks] 1562402371608: Downloading hls_ingest_fastly SMIL data [aenetworks] 1562402371608: Downloading m3u8 information [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on u'https://strm-fas.video.aetnd.com/token/aGRuZWE9c3Q9MTU2MzQxNzUyM35leHA9MTU2MzQzOTE1NH5hY2w9L2kvQUVUTi1IaXN0b3J5X1ZNUy9CUkFORF9USENfU1BDTF8yMjA4NDRfTkxNXzM2NzgyNF8yMzk4XzYwXzIwMTkwNjI4XzAyX1MzXyp+aG1hYz01MDJmMTNiMTQ3YzUxOTU5NmFkMzk5MTBlODk2NmNlYThlOTA0Y2I5N2Y0YTlmMTNmZDJiMDFhN2M0Njk4OTAy/AETN-History_VMS/BRAND_THC_SPCL_220844_NLM_367824_2398_60_20190628_02_S3_2500.mp4.m3u8?adBreaks=665.290s%2C974.390s%2C1382.625s%2C1805.700s%2C2162.745s' [download] Destination: Moon Landing - The Lost Tapes-1562402371608.mp4 [debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3544.2 Safari/537.36 ' -i 'https://strm-fas.video.aetnd.com/token/aGRuZWE9c3Q9MTU2MzQxNzUyM35leHA9MTU2MzQzOTE1NH5hY2w9L2kvQUVUTi1IaXN0b3J5X1ZNUy9CUkFORF9USENfU1BDTF8yMjA4NDRfTkxNXzM2NzgyNF8yMzk4XzYwXzIwMTkwNjI4XzAyX1MzXyp+aG1hYz01MDJmMTNiMTQ3YzUxOTU5NmFkMzk5MTBlODk2NmNlYThlOTA0Y2I5N2Y0YTlmMTNmZDJiMDFhN2M0Njk4OTAy/AETN-History_VMS/BRAND_THC_SPCL_220844_NLM_367824_2398_60_20190628_02_S3_2500.mp4.m3u8?adBreaks=665.290s%2C974.390s%2C1382.625s%2C1805.700s%2C2162.745s' -c copy -f mp4 'file:Moon Landing - The Lost Tapes-1562402371608.mp4.part' ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers built with Apple LLVM version 10.0.1 (clang-1001.0.46.4) configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.3_1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 [tcp @ 0x7ff737f1a940] Starting connection attempt to 151.101.194.168 port 443 [tcp @ 0x7ff737f1a940] Successfully connected to 151.101.194.168 port 443 [hls,applehttp @ 0x7ff738805800] HLS request for url 'https://strm-fas.video.aetnd.com/token/aGRuZWE9c3Q9MTU2MzQxNzUyM35leHA9MTU2MzQzOTE1NH5hY2w9L2kvQUVUTi1IaXN0b3J5X1ZNUy9CUkFORF9USENfU1BDTF8yMjA4NDRfTkxNXzM2NzgyNF8yMzk4XzYwXzIwMTkwNjI4XzAyX1MzXyp+aG1hYz01MDJmMTNiMTQ3YzUxOTU5NmFkMzk5MTBlODk2NmNlYThlOTA0Y2I5N2Y0YTlmMTNmZDJiMDFhN2M0Njk4OTAy/AETN-History_VMS/BRAND_THC_SPCL_220844_NLM_367824_2398_60_20190628_02_S3_2500.mp4-1.ts', offset 0, playlist 0 [hls,applehttp @ 0x7ff738805800] Opening 'https://strm-fas.video.aetnd.com/token/aGRuZWE9c3Q9MTU2MzQxNzUyM35leHA9MTU2MzQzOTE1NH5hY2w9L2kvQUVUTi1IaXN0b3J5X1ZNUy9CUkFORF9USENfU1BDTF8yMjA4NDRfTkxNXzM2NzgyNF8yMzk4XzYwXzIwMTkwNjI4XzAyX1MzXyp+aG1hYz01MDJmMTNiMTQ3YzUxOTU5NmFkMzk5MTBlODk2NmNlYThlOTA0Y2I5N2Y0YTlmMTNmZDJiMDFhN2M0Njk4OTAy/AETN-History_VMS/BRAND_THC_SPCL_220844_NLM_367824_2398_60_20190628_02_S3_2500.mp4.key' for reading

Did you grab the latest source, update the adobepass.py and then run the python setup.py build then install?

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 18, 2019

Yeah, I ran:

  1. git pull
  2. git apply -3 patch.for.comcast
  3. python setup.py build
  4. make

I just did it again and used the following command which failed. I wonder if you're downloading actual protected content or public-accessible content. Mind trying my download command?

./youtube-dl -v --ap-mso Comcast_SSO --ap-username USER --ap-password PASSWORD https://www.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah?

@merval
Copy link

@merval merval commented Jul 18, 2019

That link actually gives a 404 error. I found it's actually "https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah". However, even then, I get an unsupported error:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--ap-mso', u'Comcast_SSO', u'--ap-username', u'PRIVATE', u'--ap-password', u'PRIVATE', u'https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 2.7.10 (CPython) - Darwin-18.6.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4
[debug] Proxy map: {}
[generic] stalked-on-the-savannah: Requesting header
WARNING: Falling back on generic information extractor.
[generic] stalked-on-the-savannah: Downloading webpage
[generic] stalked-on-the-savannah: Extracting information
ERROR: Unsupported URL: https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/extractor/generic.py", line 2357, in _real_extract
doc = compat_etree_fromstring(webpage.encode('utf-8'))
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/compat.py", line 2551, in compat_etree_fromstring
doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory)))
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/compat.py", line 2540, in _XML
parser.feed(text)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
ParseError: not well-formed (invalid token): line 1, column 72
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "/Library/Python/2.7/site-packages/youtube_dl-2019.7.16-py2.7.egg/youtube_dl/extractor/generic.py", line 3333, in _real_extract
raise UnsupportedError(url)
UnsupportedError: Unsupported URL: https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/stalked-on-the-savannah

If I remember correctly, there was something with the "Go" websites and the way they either authenticated or the way the video was presented that made it difficult for youtube-dl to operate against it.

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 18, 2019

Yeah, someone mentioned needing Python 3 and you have a lot of errors I had with Python 2.7. I copied the link which had the tailing ? and didn't think to drop it. Dropping it gives me the following which is still an error but much less than with yours:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', 'https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/honduran-hell']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-15-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Proxy map: {}
[generic] honduran-hell: Requesting header
WARNING: Falling back on generic information extractor.
[generic] honduran-hell: Downloading webpage
[generic] honduran-hell: Extracting information
ERROR: Unsupported URL: https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/honduran-hell
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/generic.py", line 3333, in _real_extract
raise UnsupportedError(url)
youtube_dl.utils.UnsupportedError: Unsupported URL: https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/honduran-hell

So it is falling back to generic.py vs. using one of the several discoveryXXXX.py extractors.

I'm not that techie by any stretch so looking at those lines aren't jumping out at me as a way to force it to use the discoverygo.py or one of those other options.

@derekcentrico
Copy link

@derekcentrico derekcentrico commented Jul 18, 2019

So I may be making some progress.

I edited the extractor for discoverygo.py to reflect the new subdomain.

class DiscoveryGoBaseIE(InfoExtractor):
    _VALID_URL_TEMPLATE = r'''(?x)https?://(?:go.)?(?:
            discovery|
            investigationdiscovery|
            discoverylife|
            animalplanet|
            ahctv|
            destinationamerica|
            sciencechannel|
            tlc|
            velocitychannel
        )\.com/%s(?P<id>[^/?#&]+)'''

Without trying to define a file format I now get:

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '-cookies', '/home/Derek/Desktop/cookies.txt', 'https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/honduran-hell']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-15-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Proxy map: {}
ERROR: fixed output name but more than one file to download

Defining it gets me more crap (-f bestvideo[ext!=webm]+bestaudio[ext!=webm]/best[ext!=webm]) or --all-formats:
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--ap-mso', 'Comcast_SSO', '--ap-username', 'PRIVATE', '--ap-password', 'PRIVATE', '--cookies', '/home/derek/Desktop/cookies.txt', '-f', 'bestvideo[ext!=webm]+bestaudio[ext!=webm]/best[ext!=webm]', 'https://go.discovery.com/tv-shows/naked-and-afraid/full-episodes/honduran-hell']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.16
[debug] Python version 3.6.8 (CPython) - Linux-4.18.0-15-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: none
[debug] Proxy map: {}
[debug] Using fake IP 3.45.74.244 (US) as X-Forwarded-For.
[DiscoveryGo] honduran-hell: Downloading webpage
ERROR: Unable to extract video container; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 530, in extract
ie_result = self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/discoverygo.py", line 124, in _real_extract
webpage, 'video container'))
File "./youtube-dl/youtube_dl/extractor/common.py", line 1005, in _search_regex
raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract video container; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

EDIT: note errors are the same with or without --cookies flag.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 18, 2019

Continue your discussions privately.

@ytdl-org ytdl-org locked and limited conversation to collaborators Jul 18, 2019
@dstftw dstftw closed this Jul 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

You can’t perform that action at this time.