Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

updated api url #180

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bot/core/tapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand All @@ -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()

Expand Down
10 changes: 6 additions & 4 deletions bot/utils/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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', '')
Expand Down