Update 'watchthread.py'
This commit is contained in:
parent
0915b41e03
commit
87d23c11fc
|
@ -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]))
|
||||
|
|
Loading…
Reference in New Issue