forked from Silias-Public/Sonnendach
changed text "eignung" to "suitability" in Frontend
This commit is contained in:
parent
e6aa173fd0
commit
2d4cc2823f
12
Main.py
12
Main.py
|
@ -12,7 +12,7 @@ from tkinter import filedialog
|
|||
import time
|
||||
from selenium.webdriver.common.action_chains import ActionChains
|
||||
|
||||
DropDownLabels = ["Street: ", "Number: ", "Postal code: ", "City: ", "Sonnendach URL: ", "Eignung", "Image Filename Map: ", "Image Filename Production: ", "Image Filename qrcode: ", "PV Production 50", "PV Production 75", "PV Production 100", "Value Electricity production"]
|
||||
DropDownLabels = ["Street: ", "Number: ", "Postal code: ", "City: ", "Sonnendach URL: ", "Suitability", "Image Filename Map: ", "Image Filename Production: ", "Image Filename qrcode: ", "PV Production 50", "PV Production 75", "PV Production 100", "Value Electricity production"]
|
||||
file_split_char = ","
|
||||
OptionList = []
|
||||
exit = False
|
||||
|
@ -64,14 +64,14 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
|||
if(found):
|
||||
time.sleep(2)
|
||||
url = driver.current_url
|
||||
eignung = driver.find_element(By.ID, "eignung").text
|
||||
suitability = driver.find_element(By.ID, "eignung").text
|
||||
pv_Production50 = driver.find_element(By.ID, "pv50").text.replace("'", "")
|
||||
pv_Production75 = driver.find_element(By.ID, "pv75").text.replace("'", "")
|
||||
pv_Production100 = driver.find_element(By.ID, "pv100").text.replace("'", "")
|
||||
value_electricity_production = driver.find_elements(By.XPATH, "//h2[@id='TitelSolarstrom']//strong")[2].text.replace("'", "").replace(" Franken", "")
|
||||
|
||||
|
||||
image_filename = eignung + " - " + search_string
|
||||
image_filename = suitability + " - " + search_string
|
||||
image_folder_map = "screenshots/"
|
||||
image_filename_map = image_filename + " map" + ".png"
|
||||
image_folder_production = "screenshots/"
|
||||
|
@ -120,7 +120,6 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
|||
h = size["height"]
|
||||
area = (x, 0, w, h)
|
||||
driver.execute_script("window.scrollTo(0, " + str(y) + ")")
|
||||
print("X: " + str(x) + " Y: " + str(y) + " W: " + str(w) + " H: " + str(h))
|
||||
|
||||
time.sleep(1)
|
||||
driver.save_screenshot(image_folder_production + image_filename_production)
|
||||
|
@ -133,7 +132,7 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
|||
print(image_filename_map + " was saved.")
|
||||
else:
|
||||
url = "not-found"
|
||||
eignung = "not-found"
|
||||
suitability = "not-found"
|
||||
image_filename_map = "not-found"
|
||||
image_filename_production = "not-found"
|
||||
image_filename_qrcode = "not-found"
|
||||
|
@ -148,7 +147,7 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
|||
|
||||
#Write back into file
|
||||
adress[columnIndexes[4]] = url
|
||||
adress[columnIndexes[5]] = eignung
|
||||
adress[columnIndexes[5]] = suitability
|
||||
adress[columnIndexes[6]] = image_filename_map
|
||||
adress[columnIndexes[7]] = image_filename_production
|
||||
adress[columnIndexes[8]] = image_filename_qrcode
|
||||
|
@ -169,7 +168,6 @@ def search_adresses(adress_list, filename_adresslist, driver):
|
|||
|
||||
|
||||
if(stopThread == True):
|
||||
print("closing Thread")
|
||||
break
|
||||
|
||||
print("closing Thread")
|
||||
|
|
Loading…
Reference in New Issue