Example Implementations
Like any captcha, it is normal to have some unolvable captchas sometimes, just load and solve a new one
from requests import post
from base64 import b64decode
def load_captcha():
url = "https://footlocker.queue-it.net/challengeapi/queueitcaptcha/challenge/en-us"
headers = {
"Host": "footlocker.queue-it.net",
"sec-ch-ua": '"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"',
"sec-ch-ua-mobile": "?0",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
"sec-ch-ua-platform": '"macOS',
"accept": "*/*",
"origin": "https://footlocker.queue-it.net",
"sec-fetch-site": "same-origin",
"sec-fetch-mode": "cors",
"sec-fetch-dest": "empty",
"referer": "https://footlocker.queue-it.net/",
"accept-language": "en-GB,en;q=0.9",
"x-queueit-challange-customerid": "footlocker",
"x-queueit-challange-eventid": "cxcdtest02",
"x-queueit-challange-hash": "sg7R/eOE9jBw1RMb1iI7d1M8uKgf6sErktuA3Q69hgw=",
"x-queueit-challange-reason": "1"
}
return post(url, headers=headers).json()['imageBase64']
if __name__ == "__main__":
API_KEY = "TAKION_API_XXX" # Fill it with your api key
b64image = load_captcha()
result = post(
"https://ocr.takionapi.tech/read",
json={
"image": b64image
},
headers={
"x-api-key": API_KEY
}
).json()
if (error := result.get("error")):
print(error)
exit(0)
print(f"Solved! {result['result']}")
# Save image for debugging
with open("queueit.png", "wb") as fh:
fh.write(b64decode(b64image))
from requests import post
from base64 import b64decode
if __name__ == "__main__":
API_KEY = "TAKION_API_XXX" # Fill it with your api key
# Since on ticketmaster sg a captcha is assigned to your
# session only after some actions are taken (like adding to cart)
# we are going to set the value as fixed, in a real case scenario
# you wanna convert the image to base64 and then send to the API
b64image = "iVBORw0KGgoAAAANSUhEUgAAAHgAAABkCAIAAADCEmNlAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAMo0lEQVR4nO2cfVhT1x3HD3m9JCEkAUJIEJA3kTcRkdKK6LRF265TO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IgoiLlk8Ugpyn0Hxc5f7S2VSHAou3rNlXzWDFPSS0hFbKpHfkzECaESM4sZYcJmRAFAjQ2wQAAA8uyaPaUBDOvJng+MVrNB+RgkBL6PJ5aXT2Y8gwMQDgaN0kPJvGdF+ZIUZ5T3FGyEP097VSsX1fTZgtAJoxmuo3BEEUUfdVX3ntMWc4a7Jj417yVg3ZT3043mayNXVZW3oGOs2DRsuQ2e6kChEHvrnq9oyz3ht1rtU0KX/WgBYaE4vuX0AZAQMhsuORsfFte0/RGcqp2HXsArn2SIaOPruzutF4pul6zZXu+nYz/RzAMTK289C5zatKWHjiw/En3znC4osTQQv98F1zaI7aZLX6zwfr1pYXzE1jU13qszu3fnjjaRSn27NlV9XRs231HeznC1s/Orm6LBs5D5jIH/9VG06xPxD0H6P8Zs1CrUpObL4SCQXEpkKlTKqUS7UquVYl16kVRB3yy/Pt5Vs+IL6l10TV7Fg/g96aHokPx8u3fMBi4y+S0pyko9segpd5gzh+8Vr5sx94aTy9SgeW/0ATiEQkTNJGZxpitCr5ni/ryc8zDTGVz1XkzURM3EncnvGHX/kMXooLh7K85MrnKiAPewVy5GxrxYufTsqGXQI2/0AThA/324bdrSZb0N09MOzefaw+Wi4tSNMhH5lq7LKseuHjL9numqBDl2Vo97H6eLU8JyUOshTgGvX8/qOTT+w4NEZ7ByUdJqFHI9GpFZtWFK9emD0rMbjQ6sPx2qs9u45e2HXsAp1d7pOCXhO1trxgScHMktmJZDDx4XhDp6XyVNNfj5w322HLOuzgQmgSnVpRlKnXquQqBeZwjXX3O+rbzVPxq+ijlEm1Krln3Nfd75jSK82p0N9nbumnTacTvNAcwQvNEbzQHMELzRG80BzBC80RvNAcwQvNEbzQHMELzRG80BzBC80RvNAcwQvNEbzQHMELzRG80BzBC80RvNAcwQvNEbzQHMELzRG80BzBC80RvNAc8V9gk2zAF8W3XAAAAABJRU5ErkJggg=="
result = post(
"https://ocr.takionapi.tech/read",
json={
"image": b64image
},
headers={
"x-api-key": API_KEY
}
).json()
if (error := result.get("error")):
print(error)
exit(0)
print(f"Solved! {result['result']}")
# Save image for debugging
with open("tmsg.png", "wb") as fh:
fh.write(b64decode(b64image))
Last updated