seawolf2357
commited on
Commit
โข
7fb25b8
1
Parent(s):
a47a019
Update app.py
Browse files
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 =
|
47 |
-
|
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'))
|
|