2023-01-22 10:02:29 -06:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
# Necessary imports
|
|
|
|
from selenium.webdriver.common.by import By
|
2023-01-27 10:44:16 -06:00
|
|
|
from robot.api.logger import error
|
|
|
|
|
2023-01-22 10:02:29 -06:00
|
|
|
|
2023-01-26 19:36:12 -06:00
|
|
|
def grab_button_elements(driver):
|
|
|
|
# Try to grab button elements of the footer
|
2023-01-22 10:02:29 -06:00
|
|
|
try:
|
|
|
|
footer_element = driver.find_element(By.TAG_NAME, "footer")
|
|
|
|
sites = footer_element.find_elements(
|
|
|
|
By.XPATH, ".//a")
|
|
|
|
except:
|
|
|
|
error("Couldn't find the element.")
|
|
|
|
driver.close()
|
|
|
|
driver.quit()
|
2023-01-26 19:36:12 -06:00
|
|
|
return {}
|
|
|
|
|
2023-01-27 10:44:16 -06:00
|
|
|
return sites
|
2023-01-22 10:02:29 -06:00
|
|
|
|
|
|
|
|
2023-01-27 10:44:16 -06:00
|
|
|
def load_data():
|
|
|
|
# I don't have a better method of constructing the data dict
|
|
|
|
data = {"Contact": {"url": "https://info.werefox.cafe/contacts"}, " /src": {"url": "https://gitea.werefox.cafe/ada/werefox-cafe"}, "Mutant Standard emoji": {
|
|
|
|
"url": "https://mutant.tech"}, "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License": {"url": "https://creativecommons.org/licenses/by-nc-sa/4.0/"}}
|
|
|
|
return data
|