mirror of
https://gitea.augustin64.fr/piair/MsRewards-Reborn.git
synced 2025-06-12 06:04:46 +02:00
stable
This commit is contained in:
@ -4,6 +4,41 @@ from modules.tools import *
|
||||
import modules.globals as g
|
||||
|
||||
|
||||
def set_language(ldriver):
|
||||
ldriver.get("chrome://settings/languages")
|
||||
action = ActionChains(ldriver)
|
||||
action.reset_actions()
|
||||
# select langage
|
||||
x_coord = 1200
|
||||
y_coord = 150
|
||||
action.move_by_offset(x_coord, y_coord).click().perform()
|
||||
sleep(0.5)
|
||||
# scroll down
|
||||
action.reset_actions()
|
||||
x_coord = 1210
|
||||
y_coord = 430
|
||||
action.move_by_offset(x_coord, y_coord).click().perform()
|
||||
for i in range(5):
|
||||
action.click().perform()
|
||||
# choose french
|
||||
action.reset_actions()
|
||||
x_coord = 745
|
||||
y_coord = 572
|
||||
action.move_by_offset(x_coord, y_coord).click().perform()
|
||||
# enter
|
||||
action.reset_actions()
|
||||
x_coord = 1163
|
||||
y_coord = 717
|
||||
action.move_by_offset(x_coord, y_coord).click().perform()
|
||||
# put to the top
|
||||
sleep(0.5)
|
||||
action.reset_actions()
|
||||
x_coord = 1257
|
||||
y_coord = 328
|
||||
action.move_by_offset(x_coord, y_coord).click().perform()
|
||||
action.click().perform()
|
||||
|
||||
|
||||
def setup_proxy(ip: str, port: str) -> None:
|
||||
PROXY = f"{ip}:{port}"
|
||||
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
|
||||
|
@ -21,6 +21,7 @@ from selenium.common.exceptions import (ElementClickInterceptedException,
|
||||
NoSuchElementException,
|
||||
StaleElementReferenceException,
|
||||
TimeoutException, WebDriverException)
|
||||
from selenium.webdriver import ActionChains
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
|
Reference in New Issue
Block a user