コード例 #1
0
ファイル: __init__.py プロジェクト: alab1001101/youtube-dl
	if opts.extractaudio:
		fd.add_post_processor(FFmpegExtractAudioPP(preferredcodec=opts.audioformat, preferredquality=opts.audioquality, keepvideo=opts.keepvideo))

	# Update version
	if opts.update_self:
		updateSelf(fd, sys.argv[0])

	# Maybe do nothing
	if len(all_urls) < 1:
		if not opts.update_self:
			parser.error(u'you must provide at least one URL')
		else:
			sys.exit()
	
	try:
		retcode = fd.download(all_urls)
	except MaxDownloadsReached:
		fd.to_screen(u'--max-download limit reached, aborting.')
		retcode = 101

	# Dump cookie jar if requested
	if opts.cookiefile is not None:
		try:
			jar.save()
		except (IOError, OSError), err:
			sys.exit(u'ERROR: unable to save cookie jar')

	sys.exit(retcode)

def main():
	try:
コード例 #2
0
ファイル: __init__.py プロジェクト: LiorKirsch/videoSlicer
	if opts.extractaudio:
		fd.add_post_processor(FFmpegExtractAudioPP(preferredcodec=opts.audioformat, preferredquality=opts.audioquality, keepvideo=opts.keepvideo))

	# Update version
	if opts.update_self:
		updateSelf(fd, sys.argv[0])

	# Maybe do nothing
	if len(all_urls) < 1:
		if not opts.update_self:
			parser.error(u'you must provide at least one URL')
		else:
			sys.exit()
	
	try:
		videoData = fd.download(all_urls)
	except MaxDownloadsReached:
		fd.to_screen(u'--max-download limit reached, aborting.')
		videoData = 101

	# Dump cookie jar if requested
	if opts.cookiefile is not None:
		try:
			jar.save()
		except (IOError, OSError), err:
			sys.exit(u'ERROR: unable to save cookie jar')

#	sys.exit(retcode)
	print videoData
	return videoData
コード例 #3
0
                                 preferredquality=opts.audioquality,
                                 keepvideo=opts.keepvideo))

    # Update version
    if opts.update_self:
        updateSelf(fd, sys.argv[0])

    # Maybe do nothing
    if len(all_urls) < 1:
        if not opts.update_self:
            parser.error(u'you must provide at least one URL')
        else:
            sys.exit()

    try:
        retcode = fd.download(all_urls)
    except MaxDownloadsReached:
        fd.to_screen(u'--max-download limit reached, aborting.')
        retcode = 101

    # Dump cookie jar if requested
    if opts.cookiefile is not None:
        try:
            jar.save()
        except (IOError, OSError), err:
            sys.exit(u'ERROR: unable to save cookie jar')

    sys.exit(retcode)


def main():
コード例 #4
0
'''
Created on Jul 26, 2016

@author: jack
'''
import FileDownloader

if __name__ == '__main__':
    dubsteppath = "https://www.youtube.com/watch?v=fWRISvgAygU"
    dubsteppattern = "ARTIST - TITLE HH:MM:SS"
    catalystpath = "https://www.youtube.com/watch?v=PNjqP9JLN-c"
    catalystpattern = ""
    FileDownloader.download(catalystpath)