followers_button = browser.find_element_by_xpath("/html/body/div[1]/section/main/div/header/section/ul/li[2]/a/div/span")
followers_count = followers_button.get_attribute("title")
following_button = browser.find_element_by_xpath("/html/body/div[1]/section/main/div/header/section/ul/li[3]/a")
following_count = following_button.find_element_by_tag_name("span").text
print(followers_count, following_count, sep='\n')
from threading import Thread
@staticmethod
def thread(func):
def _sugar(*args) -> Thread:
ret = Thread(target = func, args = [*args,])
ret.start()
return ret
return _sugar
@thread
def middle(a, b, c):
return (a+b+c)/3
# вызов
middle(1, 2, 3)
# >>> 2
collections
)))