Skip to content
Permalink
Browse files

Merge pull request #1 from gmellini/patch-1

Check for custom config first
  • Loading branch information...
Mte90 committed Aug 22, 2019
2 parents 10279ba + 3aff2cf commit ef320bae7f6fe3cde09232ad2060642098101a9e
Showing with 4 additions and 3 deletions.
  1. +4 −3 downloader.py
@@ -13,9 +13,6 @@
args = parser.parse_args()

print('DL-Telegram-by-file-attachment started...')
if not os.path.exists('config.ini'):
print('Config file not found')
exit()

if args.config is not None:
if not os.path.exists(args.config):
@@ -24,6 +21,10 @@
print(' Config loaded!')
config = configparser.RawConfigParser()
config.read_file(open(args.config))
else:
if not os.path.exists('config.ini'):
print('Config file not found')
exit()

url = 'https://tg.i-c-a.su/json/' + config.get('channel', 'name') + '?limit=' + config.get('channel', 'limit')
r = urlopen(url)

0 comments on commit ef320ba

Please sign in to comment.
You can’t perform that action at this time.