Add index credentials built in code and some notes (#124)
* Add index credentials built in code and some notes * fix
This commit is contained in:
parent
a392a037b7
commit
56bc6b3a54
|
|
@ -23,6 +23,7 @@ ENV LANGUAGE en_US:en
|
|||
ENV LC_ALL en_US.UTF-8
|
||||
COPY . .
|
||||
COPY .netrc /root/.netrc
|
||||
Run chmod 600 /usr/src/app/.netrc
|
||||
RUN chmod +x aria.sh
|
||||
|
||||
CMD ["bash","start.sh"]
|
||||
|
|
|
|||
46
README.md
46
README.md
|
|
@ -211,14 +211,46 @@ Many thanks to [AutoRClone](https://github.com/xyou365/AutoRclone) for the scrip
|
|||
Let us create only the Service Accounts that we need.
|
||||
**Warning**: abuse of this feature is not the aim of this project and we do **NOT** recommend that you make a lot of projects, just one project and 100 SAs allow you plenty of use, its also possible that over abuse might get your projects banned by Google.
|
||||
|
||||
`Note: 1 Service Account can copy around 750gb a day, 1 project can make 100 Service Accounts so that's 75tb a day, for most users this should easily suffice. `
|
||||
```
|
||||
Note: 1 Service Account can copy around 750gb a day, 1 project can make 100 Service Accounts so that's 75tb a day, for most users this should easily suffice.
|
||||
python3 gen_sa_accounts.py --quick-setup 1 --new-only
|
||||
```
|
||||
|
||||
`python3 gen_sa_accounts.py --quick-setup 1 --new-only`
|
||||
|
||||
A folder named accounts will be created which will contain keys for the Service Accounts
|
||||
|
||||
OR you can create service accounts to current project, no need to create new one.
|
||||
|
||||
1. List your projests ids
|
||||
```
|
||||
python3 gen_sa_accounts.py --list-projects
|
||||
```
|
||||
2. Enable services automatically by this cmd
|
||||
```
|
||||
python3 gen_sa_accounts.py --enable-services $PROJECTID
|
||||
```
|
||||
3. Create sevice accounts to current project
|
||||
```
|
||||
python3 gen_sa_accounts.py --create-sas $PROJECTID
|
||||
```
|
||||
4. Download sevice accounts as accounts folder
|
||||
```
|
||||
python3 gen_sa_accounts.py --download-keys $PROJECTID
|
||||
```
|
||||
If u want to add service accounts to google group so follow these steps also
|
||||
|
||||
5. Mount accounts folder
|
||||
```
|
||||
cd accounts
|
||||
```
|
||||
6. Grab emails form all accounts to emails.txt file that would be created in accounts folder
|
||||
```
|
||||
grep -oPh '"client_email": "\K[^"]+' *.json > emails.txt
|
||||
```
|
||||
7. Unmount acounts folder
|
||||
```
|
||||
cd -
|
||||
```
|
||||
Then add emails from emails.txt to google group, after that add google group to your shared drive and promote it to (manager).
|
||||
|
||||
**NOTE**: If you have created SAs in past from this script, you can also just re download the keys by running:
|
||||
```
|
||||
python3 gen_sa_accounts.py --download-keys project_id
|
||||
|
|
@ -231,10 +263,14 @@ python3 add_to_team_drive.py -d SharedTeamDriveSrcID
|
|||
```
|
||||
|
||||
# Youtube-dl authentication using .netrc file
|
||||
For using your premium accounts in Youtube-dl, edit the netrc file according to following format:
|
||||
For using your premium accounts in Youtube-dl or for protected index links, edit the netrc file according to following format:
|
||||
```
|
||||
machine host login username password my_youtube_password
|
||||
```
|
||||
For index link with only password without username, even http auth will not work, so this is the solution.
|
||||
```
|
||||
machine example.workers.dev password index_password
|
||||
```
|
||||
Where host is the name of extractor (eg. Youtube, Twitch). Multiple accounts of different hosts can be added each separated by a new line.
|
||||
|
||||
# Credits
|
||||
|
|
|
|||
2
aria.sh
2
aria.sh
|
|
@ -12,4 +12,4 @@ aria2c --enable-rpc --rpc-listen-all=false --rpc-listen-port 6800 --check-certif
|
|||
--disk-cache=64M --file-allocation=prealloc --continue=true \
|
||||
--max-file-not-found=5 --max-tries=20 --auto-file-renaming=true \
|
||||
--bt-enable-lpd=true --seed-time=0.01 --seed-ratio=1.0 \
|
||||
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true
|
||||
--content-disposition-default-utf8=true --http-accept-gzip=true --reuse-uri=true --netrc-path=/usr/src/app/.netrc
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ _____REMOVE_THIS_LINE_____=True
|
|||
BOT_TOKEN = ""
|
||||
GDRIVE_FOLDER_ID = ""
|
||||
OWNER_ID =
|
||||
DOWNLOAD_DIR = "/home/slam/mirror-bot/downloads"
|
||||
DOWNLOAD_DIR = "/usr/src/app/downloads"
|
||||
DOWNLOAD_STATUS_UPDATE_INTERVAL = 5
|
||||
AUTO_DELETE_MESSAGE_DURATION = 20
|
||||
IS_TEAM_DRIVE = ""
|
||||
|
|
|
|||
Loading…
Reference in New Issue