Browse Source

[nbc] Smuggle referer (Closes #7791)

totalwebcasting
Sergey M․ 9 years ago
parent
commit
b46b65ed37
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      youtube_dl/extractor/nbc.py

+ 2
- 1
youtube_dl/extractor/nbc.py View File

@ -11,6 +11,7 @@ from ..utils import (
ExtractorError, ExtractorError,
find_xpath_attr, find_xpath_attr,
lowercase_escape, lowercase_escape,
smuggle_url,
unescapeHTML, unescapeHTML,
) )
@ -67,7 +68,7 @@ class NBCIE(InfoExtractor):
webpage, 'theplatform url').replace('_no_endcard', '').replace('\\/', '/'))) webpage, 'theplatform url').replace('_no_endcard', '').replace('\\/', '/')))
if theplatform_url.startswith('//'): if theplatform_url.startswith('//'):
theplatform_url = 'http:' + theplatform_url theplatform_url = 'http:' + theplatform_url
return self.url_result(theplatform_url)
return self.url_result(smuggle_url(theplatform_url, {'source_url': url}))
class NBCSportsVPlayerIE(InfoExtractor): class NBCSportsVPlayerIE(InfoExtractor):


Loading…
Cancel
Save