diff --git a/bot/core/tapper.py b/bot/core/tapper.py index 1610463..184a5c9 100644 --- a/bot/core/tapper.py +++ b/bot/core/tapper.py @@ -111,7 +111,7 @@ async def login(self, http_client: aiohttp.ClientSession, auth_url: str, proxy: async def apply_boost(self, http_client: aiohttp.ClientSession, boost_type: str) -> bool: response_text = '' try: - response = await http_client.post(url='https://api.tapswap.ai/api/player/apply_boost', + response = await http_client.post(url='https://api.tapswap.club/api/player/apply_boost', json={'type': boost_type}) response_text = await response.text() response.raise_for_status() @@ -127,7 +127,7 @@ async def apply_boost(self, http_client: aiohttp.ClientSession, boost_type: str) async def upgrade_boost(self, http_client: aiohttp.ClientSession, boost_type: str) -> bool: response_text = '' try: - response = await http_client.post(url='https://api.tapswap.ai/api/player/upgrade', + response = await http_client.post(url='https://api.tapswap.club/api/player/upgrade', json={'type': boost_type}) response_text = await response.text() response.raise_for_status() @@ -143,7 +143,7 @@ async def upgrade_boost(self, http_client: aiohttp.ClientSession, boost_type: st async def claim_reward(self, http_client: aiohttp.ClientSession, task_id: str) -> bool: response_text = '' try: - response = await http_client.post(url='https://api.tapswap.ai/api/player/claim_reward', + response = await http_client.post(url='https://api.tapswap.club/api/player/claim_reward', json={'task_id': task_id}) response_text = await response.text() response.raise_for_status() @@ -166,7 +166,7 @@ async def send_taps(self, http_client: aiohttp.ClientSession, taps: int) -> dict http_client.headers['Content-Id'] = str(content_id) - response = await http_client.post(url='https://api.tapswap.ai/api/player/submit_taps', json=json_data) + response = await http_client.post(url='https://api.tapswap.club/api/player/submit_taps', json=json_data) response_text = await response.text() response.raise_for_status() diff --git a/bot/utils/scripts.py b/bot/utils/scripts.py index 2842cae..c911547 100644 --- a/bot/utils/scripts.py +++ b/bot/utils/scripts.py @@ -133,8 +133,10 @@ def escape_html(text: str) -> str: options.add_argument("--headless") options.add_argument("--log-level=3") -options.add_argument('--no-sandbox') -options.add_argument('--disable-dev-shm-usage') +if os.name == 'posix': + options.add_argument('--no-sandbox') + options.add_argument('--disable-dev-shm-usage') + driver = None session_queue = Queue() @@ -241,10 +243,10 @@ def login_in_browser(auth_url: str, proxy: str) -> tuple[str, str, str]: for request in driver.requests: request_body = request.body.decode('utf-8') - if request.url == "https://api.tapswap.ai/api/account/login" and 'chr' in request_body: + if request.url == "https://api.tapswap.club/api/account/login" and 'chr' in request_body: response_text = request.response.body.decode('utf-8') - if request.url == "https://api.tapswap.ai/api/player/submit_taps": + if request.url == "https://api.tapswap.club/api/player/submit_taps": headers = dict(request.headers.items()) x_cv = headers.get('X-Cv') or headers.get('x-cv') x_touch = headers.get('X-Touch', '') or headers.get('x-touch', '')