Update 'ScrapeJE.py'

This commit is contained in:
2022-10-03 10:02:00 +02:00
parent 07f087b96f
commit 5ba1d71cb3

View File

@@ -88,6 +88,7 @@ print("lista prezzi:",len(prezzo)) #sono stringhe ovvero ci sono anche prezzi co
#Crea file json formattato per jawanndenn con la lista dei nomi dei prodotti
#scrive le prime righe del json (uguali ogni volta)
with open('jwndn.json', 'w') as jw:
jw.write("{\n")
jw.write(' "lifetime": "month",\n')
@@ -99,13 +100,14 @@ with open('jwndn.json', 'w') as jw:
jw.write("\n")
jw.write(' "options": \n')
#inserisce i nomi dei prodotti dalla lista
def writeListJSONFile(filepathname, lista):
with open('./jwndn.json', 'a+') as f:
json.dump(nome, f)
writeListJSONFile('./jwndn.json', nome)
#conclude il json con l ultima parentesi graffa
with open('jwndn.json', 'a+') as jw:
jw.write("\n}\n")
@@ -116,7 +118,7 @@ with open('jwndn.json', 'a+') as jw:
#automatizzare l inserimento in jawandenn
#PS jawanndenn include la funzione per argomento
#"jawanndenn --loaddata FILE.json" --> Load a JSON export of the database from FILE.json, then quit. #MA NON MI FUNZIONA!
#"jawanndenn --loaddata FILE.json" --> Load a JSON export of the database from FILE.json, then quit.
#aggiungere la possibilità di mettere piu di un voto al doodle (ovvero prendere piu prodotti come es: 2 fatayer al formaggio)