+# UNUSED
+
#!/usr/bin/python3
import argparse
import os.path
sys.path.insert(0, os.path.dirname(os.path.dirname((os.path.abspath(__file__)))))
-from youtube_dl.compat import (
+from yt_dlp.compat import (
+ compat_input,
compat_http_server,
compat_str,
compat_urlparse,
except ImportError: # Python 2
import SocketServer as compat_socketserver
-try:
- compat_input = raw_input
-except NameError: # Python 3
- compat_input = input
-
class BuildHTTPServer(compat_socketserver.ThreadingMixIn, compat_http_server.HTTPServer):
allow_reuse_address = True
class YoutubeDLBuilder(object):
- authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile']
+ authorizedUsers = ['fraca7', 'phihag', 'rg3', 'FiloSottile', 'ytdl-org']
def __init__(self, **kwargs):
- if self.repoName != 'youtube-dl':
+ if self.repoName != 'yt-dlp':
raise BuildError('Invalid repository "%s"' % self.repoName)
if self.user not in self.authorizedUsers:
raise HTTPError('Unauthorized user "%s"' % self.user, 401)
self.send_header('Content-Length', len(msg))
self.end_headers()
self.wfile.write(msg)
- except HTTPError as e:
- self.send_response(e.code, str(e))
else:
self.send_response(500, 'Unknown build method "%s"' % action)
else: