def vallue(val):
if val == 'dollar':
vallue_rub = 'https://www.google.com/search?q=%D0%BA%D1%83%D1%80%D1%81+%D0%B4%D0%BE%D0%BB%D0%BB%D0%B0%D1%80%D0%B0+%D0%BA+%D1%80%D1%83%D0%B1%D0%BB%D1%8E&rlz=1C1GCEA_enRU945RU945&oq=%D0%BA%D1%83%D1%80%D1%81&aqs=chrome.0.69i59l3j69i57j0i20i263i512j69i61l3.2822j1j7&sourceid=chrome&ie=UTF-8'
elif val == 'lira':
vallue_rub = 'https://www.google.com/search?q=%D0%BB%D0%B8%D1%80%D0%B0+%D0%BA+%D1%80%D1%83%D0%B1%D0%BB%D1%8E&rlz=1C1GCEA_enRU945RU945&oq=%D0%BB%D0%B8%D1%80%D0%B0&aqs=chrome.1.69i57j0i20i131i263i433i512j0i67i433l2j0i20i263i512j0i512j0i67j0i512j0i67l2.2772j0j7&sourceid=chrome&ie=UTF-8'
elif val == 'euro':
vallue_rub = 'https://www.google.com/search?q=%D0%B5%D0%B2%D1%80%D0%BE+%D0%BA+%D1%80%D1%83%D0%B1%D0%BB%D1%8E&rlz=1C1GCEA_enRU945RU945&oq=%D0%B5%D0%B2%D1%80%D0%BE&aqs=chrome.0.69i59j69i57j0i67i433j0i67l2j46i131i199i433i465i512j0i131i433i512j0i67i131i433j0i512j0i67.2165j1j7&sourceid=chrome&ie=UTF-8'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'}
full_page = requests.get(vallue_rub, headers=headers)
soup = BeautifulSoup(full_page.content, 'html.parser')
convert = soup.find_all('span',attrs={"data-precision": 2,'class': ['DFlfde', 'SwHCTb']})
return convert
print(vallue('dollar'))