Update 'watchthread.py'

This commit is contained in:
fridmanos 2018-07-11 22:33:34 +02:00
parent 0915b41e03
commit 87d23c11fc
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ if len(sys.argv) < 3:
exit(1)
# Notify user of new post
def notify_user(start, url, diff, com):
def notify_user(start,com):
system('notify-send "{} posted:" "{}" --icon=dialog-information'.format('#' + str(start), com))
# Dictionary of URLs to watch for with their posts count.
@ -47,5 +47,5 @@ while True:
if count > c :
diff = count - c;
urls[url] = count
notify_user(data['posts'][urls[url] - diff]['no'], url, diff, data['posts'][count-1]['com'])
notify_user(data['posts'][urls[url] - diff]['no'],data['posts'][count-1]['com'])
time.sleep(float(sys.argv[2]))