Skip to content

Commit

Permalink
Update resto endpoints for locations
Browse files Browse the repository at this point in the history
  • Loading branch information
niknetniko committed Oct 3, 2023
1 parent ab0ab46 commit d3839ca
Show file tree
Hide file tree
Showing 2 changed files with 167 additions and 112 deletions.
8 changes: 0 additions & 8 deletions server/scraper/resto/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@
"en": "https://www.ugent.be/en/facilities/restaurants/weekly-menu",
"nl": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu",
"nl-debrug-avond": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenubrugavond",
"nl-coupure": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu",
"nl-dunant": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu",
"nl-merelbeke": "https://www.ugent.be/student/nl/meer-dan-studeren/resto/weekmenu",
}

NORMAL_WEEK = re.compile(r"week(\d+)$")
INDIVIDUAL_DAY_URL_OVERRIDE = {
"nl-coupure": r"week(\d+)coupure$",
"nl-dunant": r"week(\d+)(merelbekedunant|dunant)$",
"nl-merelbeke": r"week(\d+)(merelbekedunant|merelbeke)$",
"nl-debrug": r"week(\d+)brugsterre|week(27)duurzaam|week(28)duurzaam",
"nl-sterre": r"week(\d+)(brugsterre|sterre)|week(27)duurzaam",
"nl-ardoyen": r"week(\d+)ardoyen"
Expand All @@ -53,12 +48,9 @@
# which is very useful.
COPIED_ENDPOINTS = {
"nl-debrug": "nl",
"nl-heymans": "nl",
"nl-dunant": "nl",
"nl-coupure": "nl",
"nl-sterre": "nl",
"nl-ardoyen": "nl",
"nl-merelbeke": "nl",
}

# Day names to day of the week.
Expand Down
271 changes: 167 additions & 104 deletions server/static/resto/meta_2.0.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,169 @@
{
"locations": [
{
"name": "English menu",
"address": "Sint-Pietersnieuwstraat",
"latitude": 51.045113,
"longitude": 3.727347,
"type": "resto",
"endpoint": "en",
"open": {"resto":[["08:30", "15:00"]]}
},{
"name": "Resto Campus Sterre",
"address": "Krijgslaan 281",
"latitude": 51.026024,
"longitude": 3.712939,
"type": "resto",
"endpoint": "nl-sterre",
"open": {"resto":[["08:30", "14:00"]]}
}, {
"name": "Resto Campus Heymans",
"address": "Harelbekestraat 70",
"latitude": 51.026508,
"longitude": 3.730189,
"type": "resto",
"endpoint": "nl-heymans",
"open": {"resto":[["08:30", "15:00"]]}
}, {
"name": "Resto De Brug",
"address": "Sint-Pietersnieuwstraat 45",
"latitude": 51.045613,
"longitude": 3.727147,
"type": "resto",
"endpoint": "nl-debrug",
"open": {"resto":[["08:30", "15:00"]],
"cafetaria":[["08:00", "16:00"]]}
}, {
"name": "Resto De Brug (avond)",
"address": "Sint-Pietersnieuwstraat 45",
"latitude": 51.045613,
"longitude": 3.727147,
"type": "resto",
"endpoint": "nl-debrug-avond",
"open": {"resto":[["17:30", "21:00"]]}
}, {
"name": "Resto Campus Merelbeke",
"address": "Salisburylaan 133, Merelbeke",
"latitude": 50.998369,
"longitude": 3.766454,
"type": "resto",
"endpoint": "nl-merelbeke",
"open": {"resto":[["08:30", "15:00"]]}
}, {
"name": "Resto Campus Dunant",
"address": "Henri Dunantlaan 2",
"latitude": 51.049023,
"longitude": 3.704017,
"type": "resto",
"endpoint": "nl-dunant",
"open": {"resto":[["08:30", "15:00"]]}
}, {
"name": "Resto Campus Coupure",
"address": "Coupure Links 653",
"latitude": 51.053252,
"longitude": 3.707671,
"type": "resto",
"endpoint": "nl-coupure",
"open": {"resto":[["08:30", "15:00"]]}
}, {
"name": "Resto Ardoyen",
"address": "Technologiepark-Zwijnaarde 75, 9052 Zwijnaarde",
"latitude": 51.010207,
"longitude": 3.707660,
"type": "resto",
"endpoint": "nl-ardoyen",
"open": {"resto":[["08:30", "15:00"]]}
}, {
"name": "Cafetaria Campus Boekentoren",
"address": "Blandijnberg 2",
"latitude": 51.043960,
"longitude": 3.725230,
"type": "cafetaria",
"open": {}
}, {
"name": "Cafetaria Campus UZ Gent",
"address": "Corneel Heymanslaan",
"latitude": 51.024360,
"longitude": 3.723540,
"type": "cafetaria",
"open": {"cafetaria":[["09:00", "14:30"]]}
}, {
"name": "Cafetaria Ledeganck",
"address": "Ledeganckstraat 35",
"latitude": 51.036520,
"longitude": 3.723990,
"type": "cafetaria",
"open": {}
}, {
"name": "Cafetaria Campus Aula",
"address": "Universiteitsstraat 4",
"latitude": 51.051029,
"longitude": 3.723928,
"type": "cafetaria",
"open": {}
}
]
"locations": [
{
"name": "English menu",
"address": "Sint-Pietersnieuwstraat",
"latitude": 51.045113,
"longitude": 3.727347,
"type": "resto",
"endpoint": "en",
"open": {
"resto": [
[
"08:30",
"15:00"
]
]
}
},
{
"name": "Resto Campus Sterre",
"address": "Krijgslaan 281",
"latitude": 51.026024,
"longitude": 3.712939,
"type": "resto",
"endpoint": "nl-sterre",
"open": {
"resto": [
[
"08:30",
"14:00"
]
]
}
},
{
"name": "Resto De Brug",
"address": "Sint-Pietersnieuwstraat 45",
"latitude": 51.045613,
"longitude": 3.727147,
"type": "resto",
"endpoint": "nl-debrug",
"open": {
"resto": [
[
"08:30",
"15:00"
]
],
"cafetaria": [
[
"08:00",
"16:00"
]
]
}
},
{
"name": "Resto De Brug (avond)",
"address": "Sint-Pietersnieuwstraat 45",
"latitude": 51.045613,
"longitude": 3.727147,
"type": "resto",
"endpoint": "nl-debrug-avond",
"open": {
"resto": [
[
"17:30",
"21:00"
]
]
}
},
{
"name": "Resto Campus Coupure",
"address": "Coupure Links 653",
"latitude": 51.053252,
"longitude": 3.707671,
"type": "resto",
"endpoint": "nl-coupure",
"open": {
"resto": [
[
"08:30",
"15:00"
]
]
}
},
{
"name": "Resto Ardoyen",
"address": "Technologiepark-Zwijnaarde 75, 9052 Zwijnaarde",
"latitude": 51.010207,
"longitude": 3.707660,
"type": "resto",
"endpoint": "nl-ardoyen",
"open": {
"resto": [
[
"08:30",
"15:00"
]
]
}
},
{
"name": "Cafetaria Campus Boekentoren",
"address": "Blandijnberg 2",
"latitude": 51.043960,
"longitude": 3.725230,
"type": "cafetaria",
"open": {}
},
{
"name": "Cafetaria Campus UZ Gent",
"address": "Corneel Heymanslaan",
"latitude": 51.024360,
"longitude": 3.723540,
"type": "cafetaria",
"open": {
"cafetaria": [
[
"09:00",
"14:30"
]
]
}
},
{
"name": "Cafetaria Ledeganck",
"address": "Ledeganckstraat 35",
"latitude": 51.036520,
"longitude": 3.723990,
"type": "cafetaria",
"open": {}
},
{
"name": "Cafetaria Campus Aula",
"address": "Universiteitsstraat 4",
"latitude": 51.051029,
"longitude": 3.723928,
"type": "cafetaria",
"open": {}
},
{
"name": "Cafetaria Heymans",
"address": "Harelbekestraat 70",
"latitude": 51.026508,
"longitude": 3.730189,
"type": "cafetaria",
"open": {}
},
{
"name": "Cafetaria Merelbeke",
"address": "Salisburylaan 133, Merelbeke",
"latitude": 50.998369,
"longitude": 3.766454,
"type": "cafetaria",
"open": {}
},
{
"name": "Cafetaria Dunant",
"address": "Henri Dunantlaan 2",
"latitude": 51.049023,
"longitude": 3.704017,
"type": "cafetaria",
"open": {}
}
]
}

0 comments on commit d3839ca

Please sign in to comment.