Import mega api key from config.env file
Signed-off-by: lzzy12 <jhashivam2020@gmail.com>
This commit is contained in:
parent
3aea903deb
commit
df655a356c
|
|
@ -60,6 +60,7 @@ Fill up rest of the fields. Meaning of each fields are discussed below:
|
|||
- **API_KEY** : This is to authenticate to your telegram account for downloading Telegram files. You can get this from https://my.telegram.org DO NOT put this in quotes.
|
||||
- **API_HASH** : This is to authenticate to your telegram account for downloading Telegram files. You can get this from https://my.telegram.org
|
||||
- **USER_SESSION_STRING** : Session string generated by running:
|
||||
- **MEGA_API_KEY**: Mega.nz api key to mirror mega.nz links. Get it from [Mega SDK Page](https://mega.nz/sdk)
|
||||
```
|
||||
python3 generate_string_session.py
|
||||
```
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ try:
|
|||
except KeyError as e:
|
||||
LOGGER.error("One or more env variables missing! Exiting now")
|
||||
exit(1)
|
||||
|
||||
try:
|
||||
MEGA_API_KEY = getConfig('MEGA_API_KEY')
|
||||
except KeyError:
|
||||
logging.warning('MEGA Api key not provided!')
|
||||
MEGA_API_KEY = None
|
||||
try:
|
||||
INDEX_URL = getConfig('INDEX_URL')
|
||||
if len(INDEX_URL) == 0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue