--exclude '__pycache' \
--exclude '.git' \
--exclude 'testdata' \
+ --exclude 'docs/_build' \
-- \
- bin devscripts test youtube_dl \
+ bin devscripts test youtube_dl docs \
CHANGELOG LICENSE README.md README.txt \
Makefile MANIFEST.in youtube-dl.1 youtube-dl.bash-completion setup.py \
youtube-dl
usenetrc: Use netrc for authentication instead.
verbose: Print additional info to stdout.
quiet: Do not print messages to stdout.
+ no_warnings: Do not print out anything for warnings.
forceurl: Force printing final URL.
forcetitle: Force printing title.
forceid: Force printing ID.
if self.params.get('logger') is not None:
self.params['logger'].warning(message)
else:
+ if self.params.get('no_warnings'):
+ return
if self._err_file.isatty() and os.name != 'nt':
_msg_header = '\033[0;33mWARNING:\033[0m'
else:
verbosity.add_option('-q', '--quiet',
action='store_true', dest='quiet', help='activates quiet mode', default=False)
+ verbosity.add_option(
+ '--no-warnings',
+ dest='no_warnings', action='store_true', default=False,
+ help='Ignore warnings')
verbosity.add_option('-s', '--simulate',
action='store_true', dest='simulate', help='do not download the video and do not write anything to disk', default=False)
verbosity.add_option('--skip-download',
'password': opts.password,
'videopassword': opts.videopassword,
'quiet': (opts.quiet or any_printing),
+ 'no_warnings': opts.no_warnings,
'forceurl': opts.geturl,
'forcetitle': opts.gettitle,
'forceid': opts.getid,
from .savefrom import SaveFromIE
from .servingsys import ServingSysIE
from .sina import SinaIE
-from .slashdot import SlashdotIE
from .slideshare import SlideshareIE
from .smotri import (
SmotriIE,
from .veoh import VeohIE
from .vesti import VestiIE
from .vevo import VevoIE
-from .vice import ViceIE
from .viddler import ViddlerIE
from .videobam import VideoBamIE
from .videodetective import VideoDetectiveIE
})
self._sort_formats(formats)
- virtual_id = show_name + '-' + epTitle + ' part ' + compat_str(part_num + 1)
+ virtual_id = show_name + ' ' + epTitle + ' part ' + compat_str(part_num + 1)
entries.append({
'id': guid,
'title': virtual_id,
return {
'_type': 'playlist',
'entries': entries,
- 'title': title,
+ 'title': show_name + ' ' + title,
'description': description,
}
url = unescapeHTML(data['video']['files'][0]['path']['#text'])
- doc = self._download_xml('http://www.c-span.org/common/services/flashXml.php?programid=' + video_id + '&version=2014-01-23',
+ doc = self._download_xml('http://www.c-span.org/common/services/flashXml.php?programid=' + video_id,
video_id)
- formats = [
- {
- 'url': url,
- }
- ]
-
- def find_string(node, s):
- return find_xpath_attr(node, './/string', 'name', s).text
-
- def find_number(node, s):
- return int(find_xpath_attr(node, './/number', 'name', s).text)
-
- def find_array(node, s):
- return find_xpath_attr(node, './/array', 'name', s)
-
- def process_files(files, url, formats):
- for file in files:
- path = find_string(file, 'path')
- #duration = find_number(file, './number', 'name', 'length')
- hd = find_number(file, 'hd')
- formats.append({
- 'url': url,
- 'play_path': path,
- 'ext': 'flv',
- 'quality': hd,
- })
-
- def process_node(node, formats):
- url = find_xpath_attr(node, './string', 'name', 'url')
- if url is None:
- url = find_xpath_attr(node, './string', 'name', 'URL')
- if url is None:
- return
- url = url.text.replace('$(protocol)', 'rtmp').replace('$(port)', '1935')
- files = find_array(node, 'files')
- if files is None:
- return
- process_files(files, url, formats)
-
- process_node(doc.find('./media-link'), formats)
-
- streams = find_array(doc, 'streams')
- if streams is not None:
- for stream in streams:
- if find_string(stream, 'name') != 'vod':
- continue
- process_node(stream, formats)
+ def find_string(s):
+ return find_xpath_attr(doc, './/string', 'name', s).text
return {
'id': video_id,
- 'title': find_string(doc, 'title'),
+ 'title': find_string('title'),
+ 'url': url,
'description': description,
- 'thumbnail': find_string(doc, 'poster'),
- 'formats': formats,
+ 'thumbnail': find_string('poster'),
}
+++ /dev/null
-import re
-
-from .common import InfoExtractor
-
-
-class SlashdotIE(InfoExtractor):
- _VALID_URL = r'https?://tv\.slashdot\.org/video/\?embed=(?P<id>.*?)(&|$)'
-
- _TEST = {
- u'add_ie': ['Ooyala'],
- u'url': u'http://tv.slashdot.org/video/?embed=JscHMzZDplD0p-yNLOzTfzC3Q3xzJaUz',
- u'file': u'JscHMzZDplD0p-yNLOzTfzC3Q3xzJaUz.mp4',
- u'md5': u'd2222e7a4a4c1541b3e0cf732fb26735',
- u'info_dict': {
- u'title': u' Meet the Stampede Supercomputing Cluster\'s Administrator',
- },
- }
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- video_id = mobj.group('id')
- webpage = self._download_webpage(url, video_id)
- ooyala_url = self._search_regex(r'<script src="(.*?)"', webpage, 'ooyala url')
- return self.url_result(ooyala_url, 'Ooyala')
+++ /dev/null
-import re
-
-from .common import InfoExtractor
-from .ooyala import OoyalaIE
-from ..utils import ExtractorError
-
-
-class ViceIE(InfoExtractor):
- _VALID_URL = r'http://www\.vice\.com/.*?/(?P<name>.+)'
-
- _TEST = {
- u'url': u'http://www.vice.com/Fringes/cowboy-capitalists-part-1',
- u'file': u'43cW1mYzpia9IlestBjVpd23Yu3afAfp.mp4',
- u'info_dict': {
- u'title': u'VICE_COWBOYCAPITALISTS_PART01_v1_VICE_WM_1080p.mov',
- },
- u'params': {
- # Requires ffmpeg (m3u8 manifest)
- u'skip_download': True,
- },
- }
-
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- name = mobj.group('name')
- webpage = self._download_webpage(url, name)
- try:
- ooyala_url = self._og_search_video_url(webpage)
- except ExtractorError:
- try:
- embed_code = self._search_regex(
- r'OO.Player.create\(\'ooyalaplayer\', \'(.+?)\'', webpage,
- u'ooyala embed code')
- ooyala_url = OoyalaIE._url_for_embed_code(embed_code)
- except ExtractorError:
- raise ExtractorError(u'The page doesn\'t contain a video', expected=True)
- return self.url_result(ooyala_url, ie='Ooyala')
-