Lib and riddle2 changes

- Added message after loop in riddle2
- Ignoring nonexistent logfile config instead of throwing an error
pull/7/head
Trivernis 6 years ago
parent 632164dba1
commit 0c64cada00

2
.gitignore vendored

@ -1,4 +1,6 @@
*.zip
*.log
logs
.idea
.cache
__pycache__.*

@ -5,6 +5,7 @@ from lib import fsutils
def get_logger(name=None):
if fsutils.os.path.isfile('./conf/logging.config'):
fsutils.dir_exist_guarantee('logs')
fileConfig('./conf/logging.config')
if name:

@ -49,7 +49,7 @@ def get_next_url(baseurl: str, url: str):
pass
ids = [_id for _id in ids if _id]
if len(ids) == 0: # if no id was found, we can't get any further into the past
return False
return None
_id = ids[-1]
next_url = '{}/?after={}'.format(baseurl, _id)
return next_url
@ -189,6 +189,7 @@ def main():
if options.loop:
while True:
download_subreddits(subreddits, count, output)
print('[~] Next Download in 5 minues...')
time.sleep(300)
else:
download_subreddits(subreddits, count, output)

Loading…
Cancel
Save