Update pihole_tweeter.py
This commit is contained in:
parent
9933141e70
commit
8775277111
@ -66,7 +66,7 @@ def get_pihole_data():
|
|||||||
|
|
||||||
def construct_tweet(data):
|
def construct_tweet(data):
|
||||||
today = datetime.today().strftime("%m/%d/%Y")
|
today = datetime.today().strftime("%m/%d/%Y")
|
||||||
tweet += 'Pi-hole statistics for {date}:\n'.format(date=today)
|
tweet = 'Pi-hole statistics for {date}:\n'.format(date=today)
|
||||||
tweet += 'Ads Blocked: ' + str(comma_value(data['ads_blocked_today']))
|
tweet += 'Ads Blocked: ' + str(comma_value(data['ads_blocked_today']))
|
||||||
tweet += ' (' + str(round(data['ads_percentage_today'], 2)).replace('.', ',') + ' %)\n'
|
tweet += ' (' + str(round(data['ads_percentage_today'], 2)).replace('.', ',') + ' %)\n'
|
||||||
tweet += 'Total DNS Queries: ' + str(comma_value(data['dns_queries_today'])) + '\n'
|
tweet += 'Total DNS Queries: ' + str(comma_value(data['dns_queries_today'])) + '\n'
|
||||||
|
Reference in New Issue
Block a user