Giter Club home page Giter Club logo

clonebot_heroku's Introduction

๐Ÿ”ฅ Google Shared Drives Creator ๐Ÿ”ฅ


Create-Google-Shared-Drive


๐Ÿ“œ Features

  • ๐Ÿ”ญ Create Shared Drive with your google account
  • ๐Ÿ›  100% customizable
  • ๐Ÿ–ผ User-friendly UI
  • โš™๏ธ Add multiple accounts
  • ๐Ÿ“Š Add statistics
  • ๐ŸŽฒ Randomize choice
  • โš  Warning pop-up
  • ๐Ÿ” Protected thanks to H-captcha

๐Ÿ“š How to add an account

โš ๏ธ Warnings

  • This is illegal to use hacked/cracked accounts! Add only the accounts you own.
  • You MUST have the right the create team drive into your account else it won't work.
  • I am not responsible of any google restrictions into your account or the subscription (the account may be suspended by google due to abuse)

๐Ÿ“™ Add one account

๐ŸŽฌ Click me to see the video tutorial


โฃ The steps bellow does not require any gsuite/workspace accounts. They can be done with your own account.

  • Go to the google cloud console and create a project
  • Then, enable the google drive api
  • Go to the OAuth Consent Screen and select "External" and click on "Create"
  • Fulfill all required informations (the one with a red *) and click on "Save and Continue" 3 times (the "Scopes" and "Test users" parts do not require any inputs)
  • Click on publish and validate (important)
  • On the Credentials tab, click on "Create Credentials" then "OAuth client ID", select "Web application"
  • Under "Authorized JavaScript origins" click on "ADD URL" and add https://developers.google.com
  • Under "Authorized redirect URIs" click on "ADD URL" and add https://developers.google.com/oauthplayground
  • Save and note down your Client ID and Secret

โฃ From now you need to be logged with your gsuite/workspace account (how can create team drives)

  • Go to the Developers Playground, click on the โš™๏ธ in the upper right corner and select "Use your own OAuth credentials"
  • Copy-paste your client ID and client secret from the previous step and press the close button.
  • Scroll down the list on the left to "Drive API v3", select it, click on "https://www.googleapis.com/auth/drive" and "authorize API"
  • Select your gsuite/workspace account give permissions using your google account, then "Exchange authorization code for tokens", check "Auto-refresh the token before it expires." and note your refresh token.
  • Open/download the SharedDriveCreator.js file and put your :
    • Client ID at line 4
    • Client Secret at line 5
    • Refresh token at line 587
  • Change the number at line 12 with the number of different drives you have (this number is useful for the random choice)
  • Change the name of the choices of the dropdown list by the name of your domains or whatever you want at line 374

๐Ÿ”’ HCaptcha

  • Go to https://dashboard.hcaptcha.com/signup and fulfill all required details
  • Copy your sitekey and paste it in line 17
  • Go to the settings of your hCaptcha account, copy and paste your secret key to line 16

โž• Add multiple accounts

If you want to add multiple accounts, it's possible!

  • After following the ๐Ÿ“™ Add one account part, log in to your new account, go the the Developers Playground, click on the โš™๏ธ in the upper right corner and select "Use your own OAuth credentials"
  • Copy-paste your client ID and client secret created before and press the close button.
  • Scroll down the list on the left to "Drive API v3", select it, click on "https://www.googleapis.com/auth/drive" and "authorize API"
  • Select your gsuite/workspace account give permissions using your google account, then "Exchange authorization code for tokens", check "Auto-refresh the token before it expires." and note your refresh token.
  • Open/download the SharedDriveCreator.js file and put your :
    • Refresh token at line 587
    • Change the number at line 12 with the number of different drives you have (this number is useful for the random choice)
    • Change the name of the choices of the dropdown list by the name of your domains or whatever you want at line 375 and following

Your Client ID and Client secret won't change. Only your refresh token will be different. You can use the same client id and client secret on multiple accounts.

โš™๏ธ Deploy the website


๐Ÿ“ข Follow us:


โค๏ธ Credits :

clonebot_heroku's People

Contributors

anymeofu avatar dishapatel010 avatar msgsuite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clonebot_heroku's Issues

how to use without SA?

hi , is there a way to use this without SA? . i want to sync a 116 gb of data between two remotes but i cannot add any accounts outside company domain so i cannot add SAs to my teamdrives . i was hoping there was a way to use the bot using just your google account or maybe by rclone.config file . Anyways thanks for your work on this bot

Heroku: Select Time Zone Error

If you are facing Error, where Heroku Showing Select Time Zone then just replace the code of Docker file with below code:

FROM ubuntu:20.04

WORKDIR /usr/src/app
RUN chmod 777 /usr/src/app

ENV TZ=Asia/Kolkata
RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime
RUN echo "$TZ" > /etc/timezone

RUN apt-get update
RUN apt-get install -y tzdata
RUN apt-get -qq update
RUN apt-get -qq install -y git python3 python3-pip
locales python3-lxml aria2
curl pv jq nginx npm

COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt &&
apt-get -qq purge git

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

COPY . .

RUN chmod +x start.sh
RUN chmod +x gclone

CMD ["bash","start.sh"]

Getting error on HEROKU

im getting this error while deploying to heroku

Setting up libkrb5support0:amd64 (1.17-6ubuntu4.1) ...
Setting up libsasl2-modules-db:amd64 (2.1.27+dfsg-2ubuntu0.1) ...
Setting up tzdata (2022c-0ubuntu0.20.04.0) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Configuring tzdata

Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
  1. Africa        6. Asia            11. System V timezones
  2. America       7. Atlantic Ocean  12. US
  3. Antarctica    8. Europe          13. None of the above
  4. Australia     9. Indian Ocean
  5. Arctic Ocean  10. Pacific Ocean
Geographic area: =!= Build failed due to an error:
=!= Timed out compiling app
If this persists, please contact us at https://help.heroku.com/. 

Crashing Error R15 (Memory quota vastly exceeded)

2022-01-10T10:58:37.183286+00:00 heroku[worker.1]: Process running mem=1214M(237.2%)
2022-01-10T10:58:37.192749+00:00 heroku[worker.1]: Error R15 (Memory quota vastly exceeded)
2022-01-10T10:58:37.202439+00:00 heroku[worker.1]: Stopping process with SIGKILL
2022-01-10T10:58:37.425535+00:00 heroku[worker.1]: Process exited with status 137
2022-01-10T10:58:37.488054+00:00 heroku[worker.1]: State changed from up to crashed

add sync

add a simple sync feature for better manage data plz

Add new user id not work

It does not work to add new ids with / vip ID, which is the step to add new users since if they are added from heroku by modifying the variables, the bot restarts in its configurations and you have to add user accounts again, and each user has what to add

File missing problem

Today I tried to clone a folder with 50 sub-folders. Bot says it successfully cloned the folder to my td. But when I check that folder in my td I get 39 subfolders. Then again tried with a folder of another 50 sub-folders this time bot actually cloned 45 folders and other 5 are missing. Any solution?

Telegram bot keeps resetting - even mid-task

Hello,

It looks like my Telegram bot keeps resetting every day, even mid-task and I have to re-send service accounts again and set up folders again. It's tedious and annoying, especially when the bot is running and it just says 'Welcome to CloneBot. Let's copy some data!' Could anyone help me please? I've attached some screenshots below.

Thank you :)

image
image

Getting Error While selecting teamdrive for cloning

2022-05-09 07:16:23,552 - apscheduler.scheduler - INFO - Scheduler started
/usr/local/lib/python3.8/dist-packages/telegram/ext/filters.py:198: TelegramDeprecationWarning: Filters.private is deprecated. Use Filters.chat_type.private instead.
return self.filter(update.effective_message)
/usr/local/lib/python3.8/dist-packages/telegram/ext/filters.py:198: TelegramDeprecationWarning: Filters.group is deprecated. Use Filters.chat_type.groups instead.
return self.filter(update.effective_message)
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/home/ubuntu/CloneBot/telegram_gcloner/utils/fire_save_files.py", line 95, in run
process = subprocess.Popen(command_line,
File "/usr/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/ubuntu/CloneBot/gclone'

Add size, status and count commands

Please add Size command which will tell the size of the folder/file/td.

Also add Status command which will tell the bot status, how long its been running, cpu usage, ram, disk space etc

and finally do add Count command which will tell the media type available in particular folder

How to Save Configuration

Is there any way to store that sa file and favourite drive list in this not because each time it restarts it asks for it again.

None of the deployment method works

Hi I tried all 3 methods to deploy and none of the are working. Heroku is flagging it as violation to their services. Railway is saying the same and in Quovery it fails to deploy. Please provide an updated approach.

Where to put SAs?

Hello;
First of all thanks for the repo its really useful.
I have created SAs but where to put them? Your heroku guide video url is dead, kindly update it

Port Issue

Can not convert '{PORT}:8080=8080:8080' to a port: Host IP is not allowed

How To Fix This Error in Okteto Deploy

ModuleNotFoundError: No module named 'utils'

Module Not Found Error, while there is config_loader under 'utils'. Why is this error showing up?

Starting process with command `bash start.sh`
State changed from starting to up
Traceback (most recent call last):
  File "/usr/src/app/telegram_gcloner.py", line 27, in <module>
    from utils.config_loader import config
ModuleNotFoundError: No module named 'utils'
Process exited with status 1
State changed from up to crashed

Deploying Error On Railway

Hi,

I cannot deploy on Railway because it blocks it saying it is a mirror bot. Can you please tell me any fix?

can't self host linux ubuntu 21.04

shadows@shadowdrivevm:~/clonebot/telegram_gcloner$ sudo python3 telegram_gcloner.py
2021-11-17 05:06:27,625 - utils.config_loader - INFO - Found telegram_token: 21xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021-11-17 05:06:27,626 - utils.config_loader - INFO - Found user_ids: -1,xxxxxxxxxxxxxx
2021-11-17 05:06:27,626 - utils.config_loader - INFO - Found group_ids: -1,xxxxxxxxxxxx
2021-11-17 05:06:27,626 - utils.config_loader - INFO - Found path_to_gclone: ./gclone
2021-11-17 05:06:27,626 - utils.config_loader - INFO - Found gclone_para_override:
2021-11-17 05:06:27,626 - utils.config_loader - WARNING - Gclone Executable was not found in the Drectory.
Press Enter to continue...

But its clearly in the file.

shadows@shadowdrivevm:~/clonebot/telegram_gcloner$ ls -a
.  ..  config.ini  gclone.exe  handlers  logs  telegram_gcloner.py  utils

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.