Compare commits
No commits in common. "1f2dc34a7025d78cf6df24a8c3a39baf102ac064" and "3d644ea5620349fb796e9f6e8916ad92e08e1d89" have entirely different histories.
1f2dc34a70
...
3d644ea562
8
xoxo.py
8
xoxo.py
|
@ -36,7 +36,7 @@ class InkyDraw:
|
|||
def update(self, stats):
|
||||
self.users = stats['new_users']
|
||||
self.statuses = stats['new_statuses']
|
||||
self.hashtags = stats['new_hashtags']
|
||||
self.hashtag = stats['new_hashtags']
|
||||
|
||||
def write(self):
|
||||
self.image = Image.open("graphics/xoxo.png")
|
||||
|
@ -59,10 +59,10 @@ if __name__ == '__main__':
|
|||
last_id = 0
|
||||
while True:
|
||||
result = requests.get("https://xoxo-zone-stats.glitch.me/").json()
|
||||
if result != last_stats:
|
||||
draw.update(result)
|
||||
if result['stats'] != last_stats:
|
||||
draw.update(result['stats'])
|
||||
draw.write()
|
||||
last_stats = result
|
||||
last_stats = result['stats']
|
||||
time.sleep(30)
|
||||
|
||||
# vim:ts=2 sw=2 et:
|
||||
|
|
Loading…
Reference in New Issue