def get_authorization_code(self, url):
if input(i18n_use_browser).lower().startswith("y"):
httpServer = HTTPServer((HOST, PORT),
lambda request, address, server: HTTPServerHandler(request, address, server))
log.debug(i18n_oauth_server, HOST, PORT)
open_new(url)
log.debug(i18n_oauth_server_url, url)
httpServer.handle_request()
log.debug(i18n_oauth_server_cback, httpServer.callback)
return httpServer.callback
else:
print(i18n_open_url + url)
return input(i18n_insert_url)
评论列表
文章目录