Получите и решите капчу с помощью myjdapiPython

Программы на Python
Ответить Пред. темаСлед. тема
Anonymous
 Получите и решите капчу с помощью myjdapi

Сообщение Anonymous »

Я пытаюсь получить изображение капчи с my.jdownloader.org с помощью myjdapi, но не могу его получить.
Не удалось получить идентификатор изображения капчи: 1729973111207. Ответ сервера : Нет
Справочник по JD API
Пример кода, который я использую:
# Main function for processing captchas
def show_active_captchas_and_solve(device):
try:
# Getting the list of active captchas from the device
captchas = device.captcha.list()
if captchas:
print("Active captchas:")
for captcha in captchas:
captcha_id = captcha.get("id")
print(f"Captcha ID: {captcha_id}")

# Getting the captcha image
captcha_image_response = device.captcha.get(captcha_id) # Removed 'format' parameter

# Check if the response is obtained and display it
if captcha_image_response is None:
print(f"Failed to get captcha image ID: {captcha_id}. Server response: {captcha_image_response}")
continue # Move to the next captcha

# If the response is not None, print it for debugging
print(f"Server response for captcha ID {captcha_id}: {captcha_image_response}")

# Assuming the image is returned in Base64 format
captcha_image_base64 = captcha_image_response # Adjust depending on the response structure.

if captcha_image_base64:
print(f"Base64 Captcha Image: {captcha_image_base64}")

# Solve the captcha using NopeCHA
solution = solve_captcha(captcha_image_base64)
if solution:
print(f"Captcha solution: {solution}")

# Send the solution back to JDownloader
device.captcha.solve(captcha_id, solution, "normal") # Specify the format 'normal'
print("Solution sent successfully.")
else:
print(f"Failed to solve captcha ID: {captcha_id}.")
else:
print(f"Captcha image is empty for ID: {captcha_id}.")
else:
print("No active captchas.")
except Exception as e:
print(f"Error while processing captchas: {e}")


Подробнее здесь: https://stackoverflow.com/questions/791 ... ng-myjdapi
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Как обойти капчу с помощью Python
    Anonymous » » в форуме Python
    0 Ответы
    1233 Просмотры
    Последнее сообщение Anonymous
  • Как обойти капчу слайдера, чтобы решить головоломку с помощью селена? (Python)
    Anonymous » » в форуме Python
    0 Ответы
    18 Просмотры
    Последнее сообщение Anonymous
  • Решите общую собственную задачу с помощью mathnet
    Anonymous » » в форуме C#
    0 Ответы
    12 Просмотры
    Последнее сообщение Anonymous
  • Решите трансцендентное уравнение с помощью Sympy
    Anonymous » » в форуме Python
    0 Ответы
    20 Просмотры
    Последнее сообщение Anonymous
  • Вставка пустой (нулевой) записи в базу данных с помощью запроса Alamofire в Swift 4. Пожалуйста, решите эту проблему
    Anonymous » » в форуме Php
    0 Ответы
    17 Просмотры
    Последнее сообщение Anonymous

Вернуться в «Python»