python help a site login bot

cinali

Newbie
Joined
Aug 24, 2024
Messages
6
Reaction score
2
Hello friends, I wrote a login code to https://shahid.mbc.net/, but although I solved the captcha, it says that you have not solved the captcha.

return {“responseCode”:401,“faults”:[{“subErrors”:null,“userMessage”:"Sorry, suspicious activity on your account was detected by Google reCAPTCHA. Please try again or contact customer service if the issue persists.“,”internalMessage“:”UNAUTHRIZED invalid captcha token“,”code":20080}]}

please help, I've been dealing with this for days

Python:
import requests
import time

s = requests.Session()


site_key = "6Lec1Q0qAAAAAOmMUUj86M8koCFS4FJr0dzxo9qf"
site_url = "https://shahid.mbc.net"
client_key = "CAPSOLVERAPİKEY"

def get_captcha_token():
    payload = {
        "clientKey": client_key,
        "task": {
            "type": 'ReCaptchaV3TaskProxyLess',
            "websiteKey": site_key,
            "websiteURL": site_url,
        }
    }
    res = s.post("https://api.capsolver.com/createTask", json=payload)
    resp = res.json()
    task_id = resp.get("taskId")
    if not task_id:
        print("Failed to create task:", res.text)
        return None
    print(f"Got taskId: {task_id} / Getting result...")

    while True:
        time.sleep(1)
        payload = {"clientKey": client_key, "taskId": task_id}
        res = s.post("https://api.capsolver.com/getTaskResult", json=payload)
        resp = res.json()
        status = resp.get("status")
        if status == "ready":
            return resp.get("solution", {}).get('gRecaptchaResponse')
        if status == "failed" or resp.get("errorId"):
            print("Solve failed! Response:", res.text)
            return None

token = get_captcha_token()

if token:
    print(f"CAPTCHA Token: {token}")
    headers = {
        'accept': 'application/json',
        'accept-language': 'ar',
        'content-type': 'application/json',
        'language': 'AR',
        'origin': 'https://shahid.mbc.net',
        'priority': 'u=1, i',
        'profile': '{"id":"3bcb3c00-622d-11ef-b483-f3a3b504fa13","master":true}',
        'profile-key': '{"isAdult":true}',
        'referer': 'https://shahid.mbc.net/',
        'sec-ch-ua': '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"Windows"',
        'sec-fetch-dest': 'empty',
        'sec-fetch-mode': 'cors',
        'sec-fetch-site': 'cross-site',
        'shahid_os': 'WEB',
        'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36',
    }

    params = {
        'country': 'TR',
    }

    json_data = {
        'email': '[email protected]',
        'rawPassword': 'Ahmed+2349hh',
        'deviceSerial': '',
        'deviceType': '',
        'physicalDeviceType': '',
        'label': '',
        'captchaToken': token,
        'terms': True,
        'isNewUser': False,
        'subscribeToNewsLetter': False,
    }

    response = s.post(
        'https://api2.shahid.net/proxy/v2.1/usersservice/validateLogin',
        params=params,
        headers=headers,
        json=json_data,
    )

    print(response.text)
else:
    print("Failed to obtain CAPTCHA token.")
 
This line
client_key = "CAPSOLVERAPİKEY"
It’s not filled , I mean it’s obvious that you are not going to use your own details , but i saw the above lines are filled ,
site_key ="6Lec1Q0qAAAAAOmMUUj86M8koCFS4FJr0dzxo9qf"
site_url = "https://shahid.mbc.net"
But the error that you are facing it’s
UNAUTHRIZED invalid captcha token“,”code":20080
So , it takes me to think , are you using your client_key in the code?
 
This line

It’s not filled , I mean it’s obvious that you are not going to use your own details , but i saw the above lines are filled ,

But the error that you are facing it’s

So , it takes me to think , are you using your client_key in the code?

yes I use it, I just removed it when sharing,you can also integrate your own captcha solver, I will use whichever works.

please help me:)
 
plsssssss helpppppppppp meeeee
 
plsssssss helpppppppppp meeeee
Just provide your error to ChatGPT and it will solve faster than anyone on forum.
Don't expect we will enter into some suspicious URL and check your code
 
Just provide your error to ChatGPT and it will solve faster than anyone on forum.
Don't expect we will enter into some suspicious URL and check your code
I already use ChatGPT, I wouldn't be here if it solved my problem, it's also a movie watching site
 
Back
Top