https://askubuntu.com/questions/359856/share-wirel...
chrome_options = Options()
dir = # какая то директория
chrome_options.add_argument(f"user-data-dir={dir}"))
prefs = { "directory_upgrade": True}
chrome_options.add_experimental_option("prefs", prefs)
from threading import Thread
import pyautogui, keyboard, time
class Clicker:
def __init__(self):
self.running = False
thread_hotkey_listener = Thread(target=self.clicker_start)
thread_hotkey_listener.start()
thread_main_action = Thread(target=self.mouse_click)
thread_main_action.start()
def mouse_click(self):
while True:
if not self.running:
continue
x, y = pyautogui.position()
pyautogui.click(x, y)
print('Click happened')
time.sleep(5)
def start(self):
self.running = True
print('Clicking started')
def stop(self):
self.running = False
print('Clicking stopped')
def clicker_start(self):
keyboard.add_hotkey('ctrl+f2', self.start)
keyboard.add_hotkey('ctrl+f3', self.stop)
keyboard.wait()
Clicker()
vape = 'lol'
user_id = {str(callback.message.from_user.id)}
{str(callback.message.from_user.id)}
import telebot
bot = telebot.TeleBot("TOKEN", parse_mode=None) # You can set parse_mode by default. HTML or MARKDOWN
class_="_1wjU3"
, а аргумент то правильный передаётся? Точно class_, а не class должно быть? def join_numbers_from_range(start, finish):
result = ""
i = 1
while i <= finish:
result += str(i)
i = i + 1
return result
print(join_numbers_from_range(start=5, finish=7))
class LoginRequest(BaseModel):
client_id: str
username: str | None = None
email: EmailStr | None = None
phone: str | None = None
password: str
@model_validator(mode='after')
def check_login_data_none(self) -> 'LoginRequest':
username = self.username
email = self.email
phone = self.phone
if username == email == phone == None:
raise ValueError('At least one login field should be not None')
return self
if message.text == "1" or "2" or "3" or "4":
if message.text in ["1", "2", "3", "4"]:
chrome_options.add_argument("user-data-dir={dir}".format(dir="директория"))