seawolf2357 commited on
Commit
7fb25b8
โ€ข
1 Parent(s): a47a019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -40,13 +40,11 @@ creds = None
40
  def authorize():
41
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
42
  auth_url, _ = flow.authorization_url(prompt='consent')
43
- print('Please go to this URL: {}'.format(auth_url))
44
-
45
- # ํ™˜๊ฒฝ ๋ณ€์ˆ˜์—์„œ ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ๊ฐ€์ ธ์˜ด
46
- code = os.getenv('GOOGLE_AUTH_CODE')
47
- if not code:
48
- raise ValueError("ํ™˜๊ฒฝ ๋ณ€์ˆ˜ 'GOOGLE_AUTH_CODE'์— ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ์„ค์ •ํ•˜์„ธ์š”.")
49
-
50
  flow.fetch_token(code=code)
51
  creds = flow.credentials
52
  with open(token_path, 'w') as token:
@@ -234,4 +232,3 @@ async def post_replies_to_youtube(video_id, comments, replies):
234
  if __name__ == "__main__":
235
  discord_client = MyClient(intents=intents)
236
  discord_client.run(os.getenv('DISCORD_TOKEN'))
237
-
 
40
  def authorize():
41
  flow = InstalledAppFlow.from_client_secrets_file(credentials_path, SCOPES)
42
  auth_url, _ = flow.authorization_url(prompt='consent')
43
+ print('Please go to this URL and finish the authentication: {}'.format(auth_url))
44
+
45
+ # ์ธ์ฆ ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜๋„๋ก ์š”์ฒญ
46
+ code = input('Enter the authorization code: ')
47
+
 
 
48
  flow.fetch_token(code=code)
49
  creds = flow.credentials
50
  with open(token_path, 'w') as token:
 
232
  if __name__ == "__main__":
233
  discord_client = MyClient(intents=intents)
234
  discord_client.run(os.getenv('DISCORD_TOKEN'))