From ca27ba5b5a9040a6826c727feb1b8f5d8be684cf Mon Sep 17 00:00:00 2001 From: scossa Date: Mon, 3 Oct 2022 09:49:22 +0200 Subject: [PATCH] Update 'ScrapeJE.py' --- ScrapeJE.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ScrapeJE.py b/ScrapeJE.py index 348d25d..de22ed7 100644 --- a/ScrapeJE.py +++ b/ScrapeJE.py @@ -16,11 +16,11 @@ scraper = cloudscraper.create_scraper(browser={'browser': 'firefox','platform': #page = scraper.get(linkJE).content #usa input manuale page = scraper.get("https://www.justeat.it/restaurants-saporedialeppo/menu").content #usa input automatico #crea il file html -with open('aleppo.html', 'wb') as f: +with open('JEmenu.html', 'wb') as f: f.write(page) #apre e legge il file -with open('aleppo.html', 'rb') as f: +with open('JEmenu.html', 'rb') as f: page = f.read() #parser @@ -90,7 +90,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 with open('jwndn.json', 'w') as jw: jw.write("{\n") - jw.write(' "lifetime": "day",\n') + jw.write(' "lifetime": "month",\n') jw.write(' "equal_width": true,\n') jw.write(' "title":') jw.write('"') @@ -114,8 +114,12 @@ with open('jwndn.json', 'a+') as jw: # #storare in "tel" il numero di telefono dle ristorante #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. +#"jawanndenn --loaddata FILE.json" --> Load a JSON export of the database from FILE.json, then quit. #MA NON MI FUNZIONA! + +#aggiungere la possibilità di mettere piu di un voto al doodle (ovvero prendere piu prodotti come es: 2 fatayer al formaggio) + #fare in modo che quando si passa il mouse sul nome del prodotto (nel doodle) compaiano descrizione, npezzi e prezzo #forse per il prezzo trattamento diverso # \ No newline at end of file