X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Fhelper.py;h=ad1b74dd30c140b01d8c9a4c51513cb2e3b8997f;hb=9026dd3858050db071b15db90cd953f7ab3de6c3;hp=884cf32dc2b8c0246744df57e64b2b60a5fcde94;hpb=b24f347190b02e519dae9e60e1dff2c56ecdd92f;p=youtube-dl diff --git a/test/helper.py b/test/helper.py index 884cf32dc..ad1b74dd3 100644 --- a/test/helper.py +++ b/test/helper.py @@ -12,12 +12,7 @@ from youtube_dl.utils import ( compat_urllib_request, ) -# General configuration (from __init__, not very elegant...) -jar = compat_cookiejar.CookieJar() -cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar) -proxy_handler = compat_urllib_request.ProxyHandler() -opener = compat_urllib_request.build_opener(proxy_handler, cookie_processor, YoutubeDLHandler()) -compat_urllib_request.install_opener(opener) +youtube_dl._setup_opener(timeout=10) PARAMETERS_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "parameters.json") with io.open(PARAMETERS_FILE, encoding='utf-8') as pf: