Нужно отправлять эти данные каждый день в 8 часов.
Вот что я написал, если 1 парсер то работает, а если 2 то нет.
from selenium import webdriver
from time import sleep
option = webdriver.ChromeOptions()
option.add_argument('headless')
def toFixed(numObj, digits=0):
return f"{numObj:.{digits}f}"
driver_price = webdriver.Chrome(chrome_options = option)
driver_price.get('https://www.google.com/search?q=%D0%BA%D0%B0%D0%BA+%D0%BD%D0%B0+python+%D0%BF%D0%BE%D1%81%D0%BB%D0%B5+%D0%B7%D0%B0%D0%BF%D1%8F%D1%82%D0%BE%D0%B9+%D0%B2%D1%8B%D0%B2%D0%B5%D1%81%D1%82%D0%B8+2+%D0%B7%D0%BD%D0%B0%D0%BA%D0%B0&oq=%D0%BA%D0%B0%D0%BA+%D0%BD%D0%B0+%D0%BF%D0%B8%D1%82%D0%BE%D0%BD%D0%B5+%D0%BF%D0%BE%D1%81%D0%BB%D0%B5+%D0%B7%D0%B0%D0%BF%D1%8F%D1%82%D0%BE%D0%B9+%D0%B2%D1%8B%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D1%8C&aqs=chrome.1.69i57j33i22i29i30l2.9048j0j7&sourceid=chrome&ie=UTF-8')
sleep(1)
price_usd_b = driver_price.find_element_by_xpath('//*[@id="rso"]/div[1]/div/div[1]/div/div[1]/div/div[1]/div/div[2]/table/tbody/tr[2]/td[2]')
# погода
driver = webdriver.Chrome(chrome_options = option)
driver.get('https://www.google.com/search?q=%D0%BF%D0%BE%D0%B3%D0%BE%D0%B4%D0%B0+%D0%BE%D0%B4%D0%B5%D1%81%D1%81%D0%B0&oq=%D0%BF%D0%BE%D0%B3%D0%BE%D0%B4%D0%B0+%D0%BE%D0%B4%D0%B5%D1%81%D1%81%D0%B0&aqs=chrome..69i57j0i457j0j0i20i263j0j69i60l3.2952j1j4&sourceid=chrome&ie=UTF-8')
sleep(1)
weather = driver.find_element_by_xpath('//*[@id="wob_tm"]')
weather_detail = driver.find_element_by_xpath('//*[@id="wob_dc"]')
print(" Погода в Одессе: " + weather_detail.text + " " + weather.text + " °С")
print("Доброе утро, друзья!\n\n")
print("Курс валют:\n")
print("Доллар\n")
print("Покупка: " + toFixed(price_usd_b) + " грн")