Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
NBC #18202
NBC #18202
Comments
|
Edit: See below; this is a separate bug I get the same error for http://www.nbc.com/saturday-night-live/video/november-17-steve-carell/3828729, which does not appear to be behind the paywall. Looking at the def _real_extract(self, url):
permalink, video_id = re.match(self._VALID_URL, url).groups()
permalink = 'http' + compat_urllib_parse_unquote(permalink)
response = self._download_json(
'https://api.nbc.com/v3/videos', video_id, query={
'filter[permalink]': permalink,
'fields[videos]': 'description,entitlement,episodeNumber,guid,keywords,seasonNumber,title,vChipRating',
'fields[shows]': 'shortTitle',
'include': 'show.shortTitle',
})
video_data = response['data'][0]['attributes']The function is failing because the If I run {"data":[],"meta":{"count":0,"version":"v3.0.0"},"links":{"self":"https://api.nbc.com/v3/videos?filter%5Bpermalink%5D=http%3A//www.nbc.com/saturday-night-live/video/november-17-steve-carell/3828729&include=show%2Cshow.shortTitle&page%5Bnumber%5D=1"}}If I There are other NBC videos that still work (e.g. https://www.nbc.com/the-good-place/video/the-ballad-of-donkey-doug/3814933). The fix shouldn't break those. I added a line to the above function as shown in the following code, and it appears to fix my problem. def _real_extract(self, url):
permalink, video_id = re.match(self._VALID_URL, url).groups()
permalink = 'http' + compat_urllib_parse_unquote(permalink)
response = self._download_json(
'https://api.nbc.com/v3/videos', video_id, query={
'filter[permalink]': permalink,
'fields[videos]': 'description,entitlement,episodeNumber,guid,keywords,seasonNumber,title,vChipRating',
'fields[shows]': 'shortTitle',
'include': 'show.shortTitle',
})
if len(response['data']) is 0:
response = self._download_json(response['links']['self'],video_id)If I can get my git login fixed I'll make a pull request. |
|
The original post links to a video which is not actually available on the NBC site, even for logged-in users. It's not clear to me whether the invocation of credentials used in OP's bug report would even work for NBC. I tried |
|
https://www.nbc.com/the-good-place/video/michaels-gambit-extended-cut/3454089
http://www.nbc.com/saturday-night-live/video/november-17-steve-carell/3828729
|
Please follow the guide below
xinto all the boxes [ ] relevant to your issue (like this:[x])Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.11.07. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.(I wasn't, then I upgraded from 2018-10-05, and the issue persisted; the logs below are from after upgrading)
Before submitting an issue make sure you have:
What is the purpose of your issue?
The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):
Description of your issue, suggested solution and other information
Tried to download video from nbc.com. It worked for one video in front of the paywall, but not for any behind the paywall. I signed up so I could get 3x free episodes, and used the following command:
youtube-dl --proxy "23.101.121.11:3128" -u ###.###@###.com -p ############ https://www.nbc.com/the-good-place/video/michaels-gambit-extended-cut/3454089 --verbose
(my credentials redacted, of course). As I'm not in the US, I needed to run this through the proxy. This proxy worked for extracting the non-paywalled episodes.