diff --git a/scan_faces.py b/scan_faces.py index edd9378..4a98f37 100755 --- a/scan_faces.py +++ b/scan_faces.py @@ -9,6 +9,7 @@ import time import os from si_prefix import si_format import Adafruit_CharLCD as LCD +import urllib2 # Set FPS (though RPi is probably to slow to meet it ;-) FPS = 1.0 @@ -98,6 +99,8 @@ while True: log.write("{},{},{}".format(time.time(), len(faces), int(totalUse))) log.flush() + content = urllib2.urlopen("https://artstats.rubenvandeven.com/artwork1/views.php?time=%d&count=%d&total=%d" % (int(time.time()), len(faces), int(totalUse)) ).read() + os.fsync(log.fileno()) if len(faces) < 1 and end - lastFaceTime > dimTimeDelta: