From fbd77ae313fc57018f0a93206a7976894bb02d8c Mon Sep 17 00:00:00 2001 From: Hafitz Setya <71178188+breakdowns@users.noreply.github.com> Date: Sun, 14 Feb 2021 09:57:29 +0700 Subject: [PATCH] Session String (#2) * Update README.md * Update README.md * Update gdriveTools.py --- README.md | 9 ++++++++- bot/helper/mirror_utils/upload_utils/gdriveTools.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 007189d..3edc06c 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Original Source [Ayanamileechbot](https://gitlab.com/Dank-del/ayanamileechbot) - Go to the Credentials tab and click Create Credentials -> OAuth Client ID - Choose Desktop and Create. - Use the download button to download your credentials. -- Move that file to the root of mirror-bot, and rename it to credentials.json +- Move that file to the root of slam-mirrorbot, and rename it to credentials.json - Visit [Google API page](https://console.developers.google.com/apis/library) - Search for Drive and enable it if it is disabled - Finally, run the script to generate token file (token.pickle) for Google Drive: @@ -22,6 +22,13 @@ Original Source [Ayanamileechbot](https://gitlab.com/Dank-del/ayanamileechbot) pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib python3 generate_drive_token.py ``` +## Session String +Generate session string by running: +``` +git clone https://github.com/breakdowns/slam-mirrorbot +cd slam-mirrorbot +python3 generate_string_session.py +``` ## Deploying on Heroku diff --git a/bot/helper/mirror_utils/upload_utils/gdriveTools.py b/bot/helper/mirror_utils/upload_utils/gdriveTools.py index 09fce47..1da79dc 100644 --- a/bot/helper/mirror_utils/upload_utils/gdriveTools.py +++ b/bot/helper/mirror_utils/upload_utils/gdriveTools.py @@ -93,7 +93,7 @@ class GoogleDriveHelper: resumable=False) file_metadata = { 'name': file_name, - 'description': 'mirror', + 'description': 'Uploaded using Slam Mirror Bot', 'mimeType': mime_type, } if parent_id is not None: