from pathlib import Path
my_home_dir = Path.home()
new_folder_name = 'my_new_folder'
new_folder = Path(new_folder_name)
new_folder_full_path = my_home_dir / new_folder
try:
Path.rmdir(new_folder_full_path)
except FileNotFoundError:
pass
print(new_folder_full_path.is_dir())
try:
Path.mkdir(new_folder_full_path)
except FileExistsError:
pass
print(new_folder_full_path.is_dir())
Искал в гугле, толи я искать не умею толи нет норм обучалок. Подскажите плз
get_attribute('textContent')
self.shops = self.driver.execute_script('return shopsObj')
for shop in self.shops:
print(shop['address'], shop['availability_hint'])
self.shops = self.driver.find_elements(By.XPATH, '//div[@class="b-shops-map__shop _other"]')
self.shops = self.driver.find_elements(By.XPATH, '//div[@class="b-shops-map__shop _other"]')
for shop in self.shops:
print(shop.find_element_by_class_name('b-shops-map__address-text').text)
print(shop.find_element_by_class_name('b-shops-map__availability-col-wrapper').find_element_by_class_name('b-tooltip-new__text.s-tooltip-text').get_attribute('textContent').strip())
print()