Update 'ScrapeJE.py'
This commit is contained in:
12
ScrapeJE.py
12
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
|
||||
#
|
||||
Reference in New Issue
Block a user