updating load results
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,17 @@
|
|||||||
import json
|
import json
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
with open('/Users/dtomlinson/OneDrive - William Hill Organisation Limited'
|
listOfFiles = glob.glob(f'{os.getcwd()}/*.json')
|
||||||
'/Mac/git_repos/python-VM/slack-bot/traffic-scraper/'
|
latestFile = max(listOfFiles, key=os.path.getctime)
|
||||||
'prd/12-10-2019_02:53:32.json', 'r') as jsonFile:
|
|
||||||
|
with open(latestFile, 'r') as jsonFile:
|
||||||
data = json.load(jsonFile)
|
data = json.load(jsonFile)
|
||||||
for item in data:
|
for item in data:
|
||||||
print(item)
|
print(item)
|
||||||
|
|
||||||
|
listOfFiles.remove(latestFile)
|
||||||
|
|
||||||
|
if len(listOfFiles) > 2:
|
||||||
|
for files in listOfFiles:
|
||||||
|
os.remove(files)
|
||||||
|
|||||||
Reference in New Issue
Block a user