This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import requests.utils | |
import os.path | |
"""Filename""" | |
filename = "sanavarasto.txt" | |
abittiUsername = "" | |
abittiPassword = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.amica.fi/api/restaurant/menu/recipe?language=fi&recipeId=7088 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API for finding "Kitchens": | |
https://fi.jamix.cloud/apps/menuservice/rest/haku/public | |
API for reading the table: | |
http://fi.jamix.cloud/apps/menuservice/rest/haku/menu/<customerID>/<kitchenID>?lang=fi | |
GET Params: | |
lang, language (fi, or en). Default = en. | |
type, json or table. Default = json. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jos ei pyöri tehtäväsivulla, se avataan. | |
if (document.getElementsByTagName("iframe").length > 0) { | |
var frame = document.getElementsByTagName("iframe")[0]; | |
var id = frame.id; | |
if (id.includes("UbilabsContentPortlet_frame")) { | |
alert("Sinulle avataan uusi välilehti, johon tämä tehtävä tehdään. Liitä tämä koodi uudelleen, jotta vastaukset tulevat esiin."); | |
window.open(frame.src, '_blank'); | |
} else { | |
runCheat(); | |
} |