123456789101112131415161718 |
- import csv
- import os
- def logo_text(browser, url):
- browser.get(url)
- text = browser.find_element_by_class_name('logo-text').text.strip()
- print(text)
- def write_csv(data, order): # запись в csv
- path_f = os.path.dirname(os.path.abspath(__file__))
- with open(
- os.path.join(path_f, "students.csv"), "a", newline='', encoding='utf-8') as file_:
- writer_f = csv.DictWriter(file_, fieldnames=order)
- writer_f.writerow(data)
|