google maps cause i want to

This commit is contained in:
2020-09-01 18:48:26 +02:00
parent fac47988b7
commit eb2e642d60
7 changed files with 23 additions and 30 deletions
Vendored
BIN
View File
Binary file not shown.
+2 -1
View File
@@ -1,2 +1,3 @@
Itunes/itunesterms
googlemaps_keys.py
View File
@@ -20,5 +20,11 @@ password_field.send_keys(password_value)
submit_field.click()
driver.get(URL_SORTED_BY_CHEAPEST)
table_elements = driver.find_elements_by_tag_name('table')
print(len(table_elements))
-3
View File
@@ -1,3 +0,0 @@
from selenium import webdriver
webdriver('Chrome')
+14
View File
@@ -0,0 +1,14 @@
import googlemaps
from googlemaps_keys import api_keys
def login_no_matter_how(keys):
for key in keys:
try:
return googlemaps.Client(key=key)
except:
pass
client = login_no_matter_how(api_keys)
print(client.directions("Sydney", "Melbourne"))
-25
View File
@@ -1,25 +0,0 @@
"""Find locations in issy-les-moulineaux and keep me informed of new offers."""
import os
from selenium import webdriver
URL = "https://logement.isep.fr/"
URL_SORTED_BY_CHEAPEST = "https://logement.isep.fr/listelogement.php?tri=n|loyer"
driver = webdriver.Chrome()
driver.get(URL)
id_value, password_value = os.environ['ISEP_ID'], os.environ['ISEP_PASSWORD']
id_field, password_field, submit_field = driver.find_elements_by_tag_name('input')
id_field.click()
id_field.send_keys(id_value)
password_field.click()
password_field.send_keys(password_value)
submit_field.click()
driver.get(URL_SORTED_BY_CHEAPEST)