driver.implicitly_wait(15)
def get_content(source):
soup = BeautifulSoup(source.text, "html.parser")
Stock = soup.find_all('a', {"href": '/invest/stocks/MMM/'})
Info = []
item = Stock[0]
name = item.find('span', {"class": "NameColumn__nameWrapper_177eF"}).get_text()
Info.append({'Name': name})
item = Stock[2]
price = item.find(("span", {"class": "Money-module__money_3h4MT"})).get_text().split('\xa0')[0]
Info.append({'Price': price})
print(Info)
def get_value(data, key, id):
return data[key][id]
if __name__ == '__main__':
data_1 = {'values': [['8241279c-4945-4066-977f-15db2943be44']]}
data_2 = {'majorDimension': 'COLUMNS', 'range': 'guid!B2', 'values': [['102126989']]}
key = 'values'
id = 0
clear_data_1 = get_value(data_1, key, id)
clear_data_2 = get_value(data_2, key, id)
print(clear_data_1, clear_data_2)
check = True
counter = 100
while check and counter > 0:
counter -= 1
…
if int(answer) != int(count):
connection.close
…
check = False
if check:
print("У тебя получилось !!!\n")
def reg1():
os.system("explorer C:/Users/evamo/Documents/")
def reg1():
os.system("start explorer C:/Users/evamo/Documents/")
select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='tableName'