2012-12-12 14:15:21 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2013-10-15 02:00:53 +02:00
|
|
|
# Allow direct execution
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import unittest
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
|
|
|
2013-10-28 18:03:26 -04:00
|
|
|
from test.helper import (
|
2014-08-25 18:03:01 +02:00
|
|
|
assertGreaterEqual,
|
2013-10-28 18:03:26 -04:00
|
|
|
get_params,
|
2014-03-17 14:30:13 +01:00
|
|
|
gettestcases,
|
2014-03-23 15:52:21 +01:00
|
|
|
expect_info_dict,
|
|
|
|
try_rm,
|
|
|
|
report_warning,
|
2013-10-28 18:03:26 -04:00
|
|
|
)
|
2013-10-15 02:00:53 +02:00
|
|
|
|
|
|
|
|
2012-09-28 15:34:56 +02:00
|
|
|
import hashlib
|
2012-12-12 14:15:21 +01:00
|
|
|
import io
|
2012-10-15 13:01:36 +02:00
|
|
|
import json
|
2012-12-20 16:30:55 +01:00
|
|
|
import socket
|
2012-11-28 15:09:56 +01:00
|
|
|
|
2013-06-18 22:14:21 +02:00
|
|
|
import youtube_dl.YoutubeDL
|
2013-10-15 02:00:53 +02:00
|
|
|
from youtube_dl.utils import (
|
2014-02-06 04:19:55 +01:00
|
|
|
compat_http_client,
|
2013-10-15 02:00:53 +02:00
|
|
|
compat_urllib_error,
|
2013-10-28 19:07:16 -04:00
|
|
|
compat_HTTPError,
|
2013-10-15 02:00:53 +02:00
|
|
|
DownloadError,
|
|
|
|
ExtractorError,
|
2014-08-28 13:59:42 +02:00
|
|
|
format_bytes,
|
2013-10-15 02:00:53 +02:00
|
|
|
|