From 78cf20e9b32aa4892af6510e4e151f60a4993691 Mon Sep 17 00:00:00 2001 From: Katyanch Date: Wed, 12 Aug 2026 00:40:52 +0900 Subject: [PATCH 1/4] UOD-162: Move module info to ImageToText --- docs/captchas/Basilisk-task.mdx | 2 +- docs/captchas/ImageToText/_category_.json | 10 + .../{ => ImageToText}/image-to-text.mdx | 1021 +++++++++-------- .../ImageToText}/module-name.mdx | 71 +- .../ImageToText}/threshold.mdx | 14 +- .../ImageToText}/user-module.mdx | 40 +- docs/captchas/alibaba-task.mdx | 2 +- docs/captchas/altcha-task.mdx | 2 +- docs/captchas/amazon-task.mdx | 2 +- docs/captchas/binance.mdx | 2 +- docs/captchas/castle-task.mdx | 2 +- docs/captchas/friendly-task.mdx | 2 +- docs/captchas/funcaptcha-task.mdx | 2 +- docs/captchas/geetest-task.mdx | 2 +- docs/captchas/hunt-task.mdx | 2 +- .../image-to-text}/module-name/amazon.png | Bin .../image-to-text}/module-name/apple.png | Bin .../image-to-text}/module-name/bls_text.png | Bin .../image-to-text}/module-name/botdetect.png | Bin .../module-name/captcha_math.png | Bin .../image-to-text}/module-name/facebook.png | Bin .../images/image-to-text}/module-name/gmx.png | Bin .../image-to-text}/module-name/google.png | Bin .../image-to-text}/module-name/hotmail.png | Bin .../image-to-text}/module-name/mailru.png | Bin .../image-to-text}/module-name/okeng.png | Bin .../image-to-text}/module-name/okrus.png | Bin .../module-name/partiallyblur.png | Bin .../image-to-text}/module-name/rambler.png | Bin .../module-name/ramblerrusnew.png | Bin .../images/image-to-text}/module-name/sat.png | Bin .../image-to-text}/module-name/solvemedia.png | Bin .../image-to-text}/module-name/steam.png | Bin .../image-to-text}/module-name/universal.png | Bin .../images/image-to-text}/module-name/vk.png | Bin .../image-to-text}/module-name/whatsapp.png | Bin .../image-to-text}/module-name/wikimedia.png | Bin .../image-to-text}/module-name/yandex.png | Bin .../image-to-text}/module-name/yandexwave.png | Bin .../image-to-text}/user-module/Annotated.png | Bin .../user-module/ValidatedInDepth.png | Bin .../image-to-text}/user-module/error.png | Bin .../image-to-text}/user-module/paid.png | Bin .../image-to-text}/user-module/trained.png | Bin .../user-module/user-module-archive.png | Bin .../user-module/user-module-markup.png | Bin .../user-module/user-module-name.png | Bin .../user-module/user-module-params.png | Bin .../user-module-top-up-balance.png | Bin .../user-module/user-module-upload.png | Bin .../user-module/user-module.png | Bin .../image-to-text}/user-module/validated.png | Bin docs/captchas/incapsula.mdx | 2 +- docs/captchas/mtcaptcha-task.mdx | 2 +- docs/captchas/prosopo-task.mdx | 2 +- docs/captchas/tendi.mdx | 2 +- docs/captchas/tspd-task.mdx | 2 +- docs/captchas/turnstile-challenge-task.mdx | 2 +- docs/captchas/turnstile-task.mdx | 2 +- docs/captchas/turnstile-waitroom-task.mdx | 2 +- docs/captchas/yidun-task.mdx | 2 +- .../current/api/module-name.mdx | 131 --- .../current/captchas/Basilisk-task.mdx | 2 +- .../captchas/ImageToText/_category_.json | 9 + .../{ => ImageToText}/image-to-text.mdx | 967 ++++++++-------- .../captchas/ImageToText/module-name.mdx | 143 +++ .../ImageToText}/threshold.mdx | 13 +- .../ImageToText}/user-module.mdx | 36 +- .../current/captchas/alibaba-task.mdx | 2 +- .../current/captchas/altcha-task.mdx | 2 +- .../current/captchas/amazon-task.mdx | 2 +- .../current/captchas/binance.mdx | 2 +- .../current/captchas/castle-task.mdx | 2 +- .../current/captchas/friendly-task.mdx | 2 +- .../current/captchas/funcaptcha-task.mdx | 2 +- .../current/captchas/geetest-task.mdx | 2 +- .../current/captchas/hunt-task.mdx | 2 +- .../image-to-text}/module-name/amazon.png | Bin .../image-to-text}/module-name/apple.png | Bin .../image-to-text}/module-name/bls_text.png | Bin .../image-to-text}/module-name/botdetect.png | Bin .../module-name/captcha_math.png | Bin .../image-to-text}/module-name/facebook.png | Bin .../images/image-to-text}/module-name/gmx.png | Bin .../image-to-text}/module-name/google.png | Bin .../image-to-text}/module-name/hotmail.png | Bin .../image-to-text}/module-name/mailru.png | Bin .../image-to-text}/module-name/okeng.png | Bin .../image-to-text}/module-name/okrus.png | Bin .../module-name/partiallyblur.png | Bin .../image-to-text}/module-name/rambler.png | Bin .../module-name/ramblerrusnew.png | Bin .../images/image-to-text}/module-name/sat.png | Bin .../image-to-text}/module-name/solvemedia.png | Bin .../image-to-text}/module-name/steam.png | Bin .../image-to-text}/module-name/universal.png | Bin .../images/image-to-text}/module-name/vk.png | Bin .../image-to-text}/module-name/whatsapp.png | Bin .../image-to-text}/module-name/wikimedia.png | Bin .../image-to-text}/module-name/yandex.png | Bin .../image-to-text}/module-name/yandexwave.png | Bin .../image-to-text}/user-module/Annotated.png | Bin .../user-module/ValidatedInDepth.png | Bin .../image-to-text}/user-module/error.png | Bin .../image-to-text}/user-module/paid.png | Bin .../image-to-text}/user-module/trained.png | Bin .../user-module/user-module-archive.png | Bin .../user-module/user-module-markup.png | Bin .../user-module/user-module-name.png | Bin .../user-module/user-module-params.png | Bin .../user-module-top-up-balance.png | Bin .../user-module/user-module-upload.png | Bin .../user-module/user-module.png | Bin .../image-to-text}/user-module/validated.png | Bin .../current/captchas/incapsula.mdx | 2 +- .../current/captchas/mtcaptcha-task.mdx | 2 +- .../current/captchas/prosopo-task.mdx | 2 +- .../current/captchas/temu-task.mdx | 2 +- .../current/captchas/tendi.mdx | 2 +- .../current/captchas/tspd-task.mdx | 2 +- .../captchas/turnstile-challenge-task.mdx | 2 +- .../current/captchas/turnstile-task.mdx | 2 +- .../captchas/turnstile-waitroom-task.mdx | 2 +- .../current/captchas/yidun-task.mdx | 2 +- .../current/api/module-name.mdx | 130 --- .../current/captchas/Basilisk-task.mdx | 2 +- .../captchas/ImageToText/_category_.json | 9 + .../{ => ImageToText}/image-to-text.mdx | 951 ++++++++------- .../captchas/ImageToText/module-name.mdx | 140 +++ .../ImageToText}/threshold.mdx | 9 +- .../ImageToText}/user-module.mdx | 36 +- .../current/captchas/alibaba-task.mdx | 2 +- .../current/captchas/altcha-task.mdx | 2 +- .../current/captchas/amazon-task.mdx | 2 +- .../current/captchas/binance.mdx | 2 +- .../current/captchas/castle-task.mdx | 2 +- .../current/captchas/friendly-task.mdx | 2 +- .../current/captchas/funcaptcha-task.mdx | 2 +- .../current/captchas/geetest-task.mdx | 2 +- .../current/captchas/hunt-task.mdx | 2 +- .../image-to-text}/module-name/amazon.png | Bin .../image-to-text}/module-name/apple.png | Bin .../image-to-text}/module-name/bls_text.png | Bin .../image-to-text}/module-name/botdetect.png | Bin .../module-name/captcha_math.png | Bin .../image-to-text}/module-name/facebook.png | Bin .../images/image-to-text}/module-name/gmx.png | Bin .../image-to-text}/module-name/google.png | Bin .../image-to-text}/module-name/hotmail.png | Bin .../image-to-text}/module-name/mailru.png | Bin .../image-to-text}/module-name/okeng.png | Bin .../image-to-text}/module-name/okrus.png | Bin .../module-name/partiallyblur.png | Bin .../image-to-text}/module-name/rambler.png | Bin .../module-name/ramblerrusnew.png | Bin .../images/image-to-text}/module-name/sat.png | Bin .../image-to-text}/module-name/solvemedia.png | Bin .../image-to-text}/module-name/steam.png | Bin .../image-to-text}/module-name/universal.png | Bin .../images/image-to-text}/module-name/vk.png | Bin .../image-to-text}/module-name/whatsapp.png | Bin .../image-to-text}/module-name/wikimedia.png | Bin .../image-to-text}/module-name/yandex.png | Bin .../image-to-text}/module-name/yandexwave.png | Bin .../image-to-text}/user-module/Annotated.png | Bin .../user-module/ValidatedInDepth.png | Bin .../image-to-text}/user-module/error.png | Bin .../image-to-text}/user-module/paid.png | Bin .../image-to-text}/user-module/trained.png | Bin .../user-module/user-module-archive.png | Bin .../user-module/user-module-markup.png | Bin .../user-module/user-module-name.png | Bin .../user-module/user-module-params.png | Bin .../user-module-top-up-balance.png | Bin .../user-module/user-module-upload.png | Bin .../user-module/user-module.png | Bin .../image-to-text}/user-module/validated.png | Bin .../current/captchas/incapsula.mdx | 2 +- .../current/captchas/mtcaptcha-task.mdx | 2 +- .../current/captchas/prosopo-task.mdx | 2 +- .../current/captchas/temu-task.mdx | 2 +- .../current/captchas/tendi.mdx | 2 +- .../current/captchas/tspd-task.mdx | 2 +- .../captchas/turnstile-challenge-task.mdx | 2 +- .../current/captchas/turnstile-task.mdx | 2 +- .../captchas/turnstile-waitroom-task.mdx | 2 +- .../current/captchas/yidun-task.mdx | 2 +- .../current/captchas/Basilisk-task.mdx | 2 +- .../captchas/ImageToText/_category_.json | 9 + .../{ => ImageToText}/image-to-text.mdx | 950 +++++++-------- .../ImageToText}/module-name.mdx | 56 +- .../ImageToText}/threshold.mdx | 7 +- .../ImageToText}/user-module.mdx | 36 +- .../current/captchas/alibaba-task.mdx | 2 +- .../current/captchas/altcha-task.mdx | 2 +- .../current/captchas/amazon-task.mdx | 2 +- .../current/captchas/binance.mdx | 2 +- .../current/captchas/castle-task.mdx | 2 +- .../current/captchas/friendly-task.mdx | 2 +- .../current/captchas/funcaptcha-task.mdx | 2 +- .../current/captchas/geetest-task.mdx | 2 +- .../current/captchas/hunt-task.mdx | 2 +- .../image-to-text}/module-name/amazon.png | Bin .../image-to-text}/module-name/apple.png | Bin .../image-to-text}/module-name/bls_text.png | Bin .../image-to-text}/module-name/botdetect.png | Bin .../module-name/captcha_math.png | Bin .../image-to-text}/module-name/facebook.png | Bin .../images/image-to-text}/module-name/gmx.png | Bin .../image-to-text}/module-name/google.png | Bin .../image-to-text}/module-name/hotmail.png | Bin .../image-to-text}/module-name/mailru.png | Bin .../image-to-text}/module-name/okeng.png | Bin .../image-to-text}/module-name/okrus.png | Bin .../module-name/partiallyblur.png | Bin .../image-to-text}/module-name/rambler.png | Bin .../module-name/ramblerrusnew.png | Bin .../images/image-to-text}/module-name/sat.png | Bin .../image-to-text}/module-name/solvemedia.png | Bin .../image-to-text}/module-name/steam.png | Bin .../image-to-text}/module-name/universal.png | Bin .../images/image-to-text}/module-name/vk.png | Bin .../image-to-text}/module-name/whatsapp.png | Bin .../image-to-text}/module-name/wikimedia.png | Bin .../image-to-text}/module-name/yandex.png | Bin .../image-to-text}/module-name/yandexwave.png | Bin .../image-to-text}/user-module/Annotated.png | Bin .../user-module/ValidatedInDepth.png | Bin .../image-to-text}/user-module/error.png | Bin .../image-to-text}/user-module/paid.png | Bin .../image-to-text}/user-module/trained.png | Bin .../user-module/user-module-archive.png | Bin .../user-module/user-module-markup.png | Bin .../user-module/user-module-name.png | Bin .../user-module/user-module-params.png | Bin .../user-module-top-up-balance.png | Bin .../user-module/user-module-upload.png | Bin .../user-module/user-module.png | Bin .../image-to-text}/user-module/validated.png | Bin .../current/captchas/incapsula.mdx | 2 +- .../current/captchas/mtcaptcha-task.mdx | 2 +- .../current/captchas/prosopo-task.mdx | 2 +- .../current/captchas/temu-task.mdx | 2 +- .../current/captchas/tendi.mdx | 2 +- .../current/captchas/tspd-task.mdx | 2 +- .../captchas/turnstile-challenge-task.mdx | 2 +- .../current/captchas/turnstile-task.mdx | 2 +- .../captchas/turnstile-waitroom-task.mdx | 2 +- .../current/captchas/yidun-task.mdx | 2 +- 249 files changed, 2522 insertions(+), 2424 deletions(-) create mode 100644 docs/captchas/ImageToText/_category_.json rename docs/captchas/{ => ImageToText}/image-to-text.mdx (69%) rename docs/{api => captchas/ImageToText}/module-name.mdx (57%) rename docs/{api => captchas/ImageToText}/threshold.mdx (81%) rename docs/{api => captchas/ImageToText}/user-module.mdx (88%) rename docs/{api/images => captchas/images/image-to-text}/module-name/amazon.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/apple.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/bls_text.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/botdetect.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/captcha_math.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/facebook.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/gmx.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/google.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/hotmail.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/mailru.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/okeng.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/okrus.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/partiallyblur.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/rambler.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/ramblerrusnew.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/sat.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/solvemedia.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/steam.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/universal.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/vk.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/whatsapp.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/wikimedia.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/yandex.png (100%) rename docs/{api/images => captchas/images/image-to-text}/module-name/yandexwave.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/Annotated.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/ValidatedInDepth.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/error.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/paid.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/trained.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-archive.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-markup.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-name.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-params.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-top-up-balance.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module-upload.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/user-module.png (100%) rename docs/{api/images => captchas/images/image-to-text}/user-module/validated.png (100%) delete mode 100644 i18n/en/docusaurus-plugin-content-docs/current/api/module-name.mdx create mode 100644 i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json rename i18n/en/docusaurus-plugin-content-docs/current/captchas/{ => ImageToText}/image-to-text.mdx (71%) create mode 100644 i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx rename i18n/en/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/threshold.mdx (83%) rename i18n/en/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/user-module.mdx (87%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/amazon.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/apple.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/bls_text.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/botdetect.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/captcha_math.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/facebook.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/gmx.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/google.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/hotmail.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/mailru.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okeng.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okrus.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/partiallyblur.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/rambler.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/ramblerrusnew.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/sat.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/solvemedia.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/steam.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/universal.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/vk.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/whatsapp.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/wikimedia.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandex.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandexwave.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/Annotated.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/ValidatedInDepth.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/error.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/paid.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/trained.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-archive.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-markup.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-name.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-params.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-top-up-balance.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-upload.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module.png (100%) rename i18n/en/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/validated.png (100%) delete mode 100644 i18n/pt-br/docusaurus-plugin-content-docs/current/api/module-name.mdx create mode 100644 i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json rename i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/{ => ImageToText}/image-to-text.mdx (93%) create mode 100644 i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/threshold.mdx (85%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/user-module.mdx (85%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/amazon.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/apple.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/bls_text.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/botdetect.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/captcha_math.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/facebook.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/gmx.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/google.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/hotmail.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/mailru.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okeng.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okrus.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/partiallyblur.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/rambler.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/ramblerrusnew.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/sat.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/solvemedia.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/steam.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/universal.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/vk.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/whatsapp.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/wikimedia.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandex.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandexwave.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/Annotated.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/ValidatedInDepth.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/error.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/paid.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/trained.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-archive.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-markup.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-name.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-params.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-top-up-balance.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-upload.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module.png (100%) rename i18n/pt-br/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/validated.png (100%) create mode 100644 i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json rename i18n/zh/docusaurus-plugin-content-docs/current/captchas/{ => ImageToText}/image-to-text.mdx (92%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/module-name.mdx (56%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/threshold.mdx (92%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api => captchas/ImageToText}/user-module.mdx (84%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/amazon.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/apple.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/bls_text.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/botdetect.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/captcha_math.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/facebook.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/gmx.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/google.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/hotmail.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/mailru.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okeng.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/okrus.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/partiallyblur.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/rambler.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/ramblerrusnew.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/sat.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/solvemedia.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/steam.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/universal.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/vk.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/whatsapp.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/wikimedia.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandex.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/module-name/yandexwave.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/Annotated.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/ValidatedInDepth.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/error.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/paid.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/trained.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-archive.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-markup.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-name.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-params.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-top-up-balance.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module-upload.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/user-module.png (100%) rename i18n/zh/docusaurus-plugin-content-docs/current/{api/images => captchas/images/image-to-text}/user-module/validated.png (100%) diff --git a/docs/captchas/Basilisk-task.mdx b/docs/captchas/Basilisk-task.mdx index 1f5e8391..a0cff59e 100644 --- a/docs/captchas/Basilisk-task.mdx +++ b/docs/captchas/Basilisk-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 13 +sidebar_position: 12 sidebar_label: Basilisk title: "Автоматическое распознавание и обход Basilisk капчи — Basilisk Task | API" description: "Узнайте, как обойти капчу Basilisk с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/ImageToText/_category_.json b/docs/captchas/ImageToText/_category_.json new file mode 100644 index 00000000..3921fc77 --- /dev/null +++ b/docs/captchas/ImageToText/_category_.json @@ -0,0 +1,10 @@ +{ + "label": "ImageToText", + "position": 6, + "link": { + "type": "generated-index", + "slug": "/captchas/ImageToText", + "title": "ImageToText", + "description": "Распознавание текстовых CAPTCHA, настройка порога уверенности и работа с пользовательскими модулями." + } +} diff --git a/docs/captchas/image-to-text.mdx b/docs/captchas/ImageToText/image-to-text.mdx similarity index 69% rename from docs/captchas/image-to-text.mdx rename to docs/captchas/ImageToText/image-to-text.mdx index 1e1370f5..b44b41ab 100644 --- a/docs/captchas/image-to-text.mdx +++ b/docs/captchas/ImageToText/image-to-text.mdx @@ -1,507 +1,516 @@ ---- -sidebar_position: 12 -sidebar_label: ImageToText -title: "Автоматическое распознавание и обход простой текстовой капчи — Image-to-Text | API" -description: "Метод Image-to-Text через API CapMonster.Cloud для автоматического распознавания и обхода простой текстовой капчи. Подробное руководство и примеры для автоматического решения простой капчи — изображения с текстом в документации Capmonster Cloud Docs!" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import ParamItem from '@theme/ParamItem'; -import MethodItem from '@theme/MethodItem'; -import MethodDescription from '@theme/MethodDescription' -import PriceBlock from '../../src/theme/PriceBlock'; -import PriceBlockWrap from '@theme/PriceBlockWrap'; -import { ArticleHead } from '../../src/theme/ArticleHead'; - - - -# ImageToText - - - - - -![](./images/image-to-text/text-captcha-2.png) - -Это обычная капча, представляющая собой изображение с текстом, который нужно ввести в соответствующую строку. - -:::warning **Внимание!** -Использование прокси-серверов для данной задачи не требуется. -::: - - -## Параметры запроса - -
- -> ВАЖНО: получайте base64 изображения непосредственно перед созданием задачи, чтобы избежать ошибок при решении (см. ниже пример получения изображения капчи в формате base64). - -
- -
- - **ImageToTextTask** - - --- - - - Содержимое файла капчи закодированное в base64*. Убедитесь, что значение отправляется одной строкой, без переносов. - - --- - - - Имя модуля, например “yandex“. Альтернативный способ передачи имени модуля и список всех доступных модулей можно найти [здесь](../api/module-name.mdx).
- Пример: `yandex`, `special` и другие. - - --- - - - Порог распознавания капчи с возможным значением от **0** до **100**. Например, если в систему было отправлено значение **90**, и задача решилась с уверенностью **80**, то деньги за решение не спишутся. В этом случае пользователь получит ответ ERROR_CAPTCHA_UNSOLVABLE. Альтернативный способ установки порога списания денег описан в [статье](../api/threshold.mdx). - - --- - - - Учитывать регистр при решении или нет. Возможные значения: `true`, `false` - - --- - - - `1` - если капча состоит только из цифр.
- Возможные значения: `0`, `1` - - --- - - -`false` — по умолчанию не задано;
-`true` — капча требует выполнения математического действия (например, капча `2 + 6` вернёт значение `8`).
- -**Важно:** для модуля `captcha_math` **не используйте** параметр `math: true`. -
- -
- -*Base64 - это способ кодирования данных, позволяющий представить бинарные данные в виде текста. Пример получения изображения капчи в формате base64 с помощью консоли в **Инструментах разработчика**: - -```JavaScript -const captchaUrl = 'https://example.com/captcha.jpg'; - -function loadAndEncodeCaptchaToBase64(url) { - fetch(url) - .then(response => response.blob()) - .then(blob => { - const reader = new FileReader(); - reader.readAsDataURL(blob); - - reader.onloadend = function() { - const base64Data = reader.result; - console.log('Base64 Encoded Captcha:', base64Data); - - }; - }) - .catch(error => { - console.error('Error occurred while loading or encoding the captcha:', error); - }); -} - -loadAndEncodeCaptchaToBase64(captchaUrl); - -``` - - -## Метод создания задачи - - - -```http -https://api.capmonster.cloud/createTask -``` - - -
- -:::info Альтернативный адрес метода - -Для пользователей из России также доступен: - -```text -https://ru.api.capmonster.cloud/createTask -``` - -Подробнее в разделе [createTask](/docs/api/methods/create-task/). - -::: - -
- - **Пример запроса** -```json -{ - "clientKey": "API_KEY", - "task": { - "type": "ImageToTextTask", - "body": "BASE64_BODY_HERE!" - } -} -``` - **Пример ответа** - ```json - { - "errorId":0, - "taskId":407533072 - } - ``` - -
- - -## Метод получения результата задачи -Используйте метод [getTaskResult](../api/methods/get-task-result.mdx) чтобы получить решение капчи. В зависимости от загрузки системы вы получите ответ через время в диапазоне от 300 мс до 6 с. - - - -```http -https://api.capmonster.cloud/getTaskResult -``` - - -
- -:::info Альтернативный адрес метода - -Для пользователей из России также доступен: - -```text -https://ru.api.capmonster.cloud/getTaskResult -``` - -Подробнее в разделе [getTaskResult](/docs/api/methods/get-task-result/). - -::: - -
- - **Пример запроса** - ```json - { - "clientKey":"API_KEY", - "taskId": 407533072 - } - ``` - **Пример ответа** -```json -{ - "errorId": 0, - "status": "ready", - "solution": { - "text": "answer" - } -} -``` - -
- -
- -|**Свойство**|**Тип**|**Описание**| -| :-: | :-: | :-: | -|text|String|Текст решения капчи| - -## Как найти все нужные параметры для создания задачи на решение - -### Вручную - -1. Откройте ваш сайт, где отображается капча, в браузере. -2. Правой кнопкой кликните по элементу капчи и выберите **Inspect**. - -#### base64 - -Найдите нужный элемент в DOM-дереве и наведите на него курсор – закодированное в *base64* изображение отобразится непосредственно в атрибутах элемента: - -![base64elements](images/image-to-text/base64-elements.png) - -Если изображение ссылается на внешний URL, а не содержит данные в формате base64, его можно найти в разделе сетевых запросов (**Network**). Кликните правой кнопкой мыши по нужному запросу и выберите **Copy image as data URI**. Вы сразу получите кодировку изображения в формате *base64*, скопированную в буфер обмена. - -![base64network](images/image-to-text/base64-network.png) - -### Автоматически - -Для автоматизации поиска параметров их можно извлекать через **браузер** (обычный или headless, например, с **Playwright**) или напрямую из **HTTP-запросов**. Поскольку значения динамических параметров действуют недолго, их рекомендуется использовать сразу после получения. - -:::warning **Важно!** -Приведённые фрагменты кода являются базовыми примерами для ознакомления в извлечении необходимых параметров. Точная реализация будет зависеть от вашего сайта с капчей, его структуры и используемых HTML-элементов и селекторов. -::: - - - -
- Показать код (для браузера) - ```js - (async () => { - const img = document.querySelector('img'); // Пример селектора - - const imageUrl = img.src; - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Ошибка загрузки изображения"); - } - - const buffer = await response.arrayBuffer(); - - // Преобразуем бинарные данные в base64 - const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); - - console.log(base64Image); - })(); - ``` -
- -
- Показать код (Node.js) - ```js - (async () => { - const imageUrl = "https://example/img/.jpg"; // Ссылка на изображение - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Ошибка загрузки изображения"); - } - - const buffer = await response.arrayBuffer(); - - // Преобразуем данные в base64 - const base64Image = Buffer.from(buffer).toString("base64"); - - console.log(base64Image); - })(); - ``` -
-
- - -
- Показать код - ```python - import requests - import base64 - - # Ссылка на изображение - image_url = "https://example/img.jpg" - - response = requests.get(image_url) - - if response.status_code == 200: - # Преобразуем бинарные данные изображения в base64 - base64_image = base64.b64encode(response.content).decode('utf-8') - - print(base64_image) - else: - print("Ошибка загрузки изображения") - ``` -
-
- - -
- Показать код - ```csharp - using System; - using System.Net.Http; - using System.Threading.Tasks; - - class Program - { - static async Task Main(string[] args) - { - // Ссылка на изображение - string imageUrl = "https://example/img.jpg"; - - using (HttpClient client = new HttpClient()) - { - try - { - byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); - - // Преобразуем бинарные данные изображения в base64 - string base64Image = Convert.ToBase64String(imageBytes); - - Console.WriteLine(base64Image); - } - catch (Exception ex) - { - Console.WriteLine("Ошибка загрузки изображения: " + ex.Message); - } - } - } - } - ``` -
-
-
- -## Используйте библиотеку SDK - - - -
- Показать код (для браузера) - ```js - // https://github.com/ZennoLab/capmonstercloud-client-js - - import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - - document.addEventListener('DOMContentLoaded', async () => { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Укажите ваш API-ключ CapMonster Cloud - ); - - // При необходимости можно проверить баланс - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Замените на реальное значение - // Необязательные параметры - CapMonsterModule: CapMonsterModules.YandexWave, // Можно выбрать модуль, например, YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); - }); - ``` -
- -
- Показать код (Node.js) -```javascript -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -const API_KEY = "YOUR_API_KEY"; // Укажите ваш API-ключ CapMonster Cloud - -async function solveImageToText() { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: API_KEY }) - ); - - // При необходимости можно проверить баланс - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Замените на реальное значение - // Необязательные параметры - CapMonsterModule: CapMonsterModules.YandexWave, // Можно выбрать модуль, например, YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); -} - -solveImageToText().catch(console.error); -``` -
- -
- - -
- Показать код - ```python - # https://github.com/ZennoLab/capmonstercloud-client-python - - import asyncio - import base64 - from capmonstercloudclient import CapMonsterClient, ClientOptions - from capmonstercloudclient.requests import ImageToTextRequest - - # Укажите ваш API-ключ CapMonster Cloud - client_options = ClientOptions(api_key="YOUR_API_KEY") - cap_monster_client = CapMonsterClient(options=client_options) - - # Изображение в формате base64 - image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Замените на реальное значение - image_bytes = base64.b64decode(image_base64) - - image_to_text_request = ImageToTextRequest( - image_bytes=image_bytes, - module_name=None, # Можно выбрать модуль, например YandexWave - # Необязательные параметры - threshold=50, - case=True, - numeric=0, - math=False - ) - - async def solve_captcha(): - # При необходимости можно проверить баланс - balance = await cap_monster_client.get_balance() - print("Balance:", balance) - - solution = await cap_monster_client.solve_captcha(image_to_text_request) - return solution - - responses = asyncio.run(solve_captcha()) - print("Solution:", responses) - ``` -
-
- - -
- Показать код - ```csharp - // https://github.com/ZennoLab/capmonstercloud-client-dotnet - - using System; - using System.Threading.Tasks; - using Zennolab.CapMonsterCloud.Requests; - using Zennolab.CapMonsterCloud; - - class Program - { - static async Task Main(string[] args) - { - var clientOptions = new ClientOptions - { - ClientKey = "YOUR_API_KEY" // Ваш API-ключ CapMonster Cloud - }; - - var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); - - // При необходимости можно проверить баланс - var balance = await cmCloudClient.GetBalanceAsync(); - Console.WriteLine("Balance: " + balance); - - var imageToTextRequest = new ImageToTextRequest - { - Body = "/9j/4AAQSkZJRgABAQAAAQABA...hMjIyMjIyMjIyMjIyMj", // Замените на реальное значение - // Необязательные параметры - CapMonsterModule = "None", // Можно выбрать модуль, например, YandexWave - RecognizingThreshold = 70, - CaseSensitive = true, - Numeric = false, - Math = false - }; - - var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); - - Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); - } - } - ``` -
-
+--- +sidebar_position: 0 +sidebar_label: ImageToText +title: "Автоматическое распознавание и обход простой текстовой капчи — Image-to-Text | API" +description: "ImageToTextTask для автоматического распознавания текстовых CAPTCHA через API CapMonster Cloud. Описание параметров, примеры запросов и способы получения изображения в формате Base64." +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import ParamItem from '@theme/ParamItem'; +import MethodItem from '@theme/MethodItem'; +import MethodDescription from '@theme/MethodDescription' +import PriceBlock from '../../../src/theme/PriceBlock'; +import PriceBlockWrap from '@theme/PriceBlockWrap'; +import { ArticleHead } from '../../../src/theme/ArticleHead'; + + + +# ImageToText + + + + + +![](../images/image-to-text/text-captcha-2.png) + +ImageToText — тип задачи для распознавания текстовых CAPTCHA, представленных в виде изображения. + +:::warning **Внимание!** +Использование прокси-серверов для данной задачи не требуется. +::: + + +## Параметры запроса + +
+ +> ВАЖНО: получайте base64 изображения непосредственно перед созданием задачи, чтобы избежать ошибок при решении (см. ниже пример получения изображения капчи в формате base64). + +
+ +
+ + **ImageToTextTask** + + --- + + + Изображение CAPTCHA, закодированное в формате Base64. Передавайте значение одной строкой, без переносов. + + --- + + + Имя модуля, используемого для распознавания CAPTCHA.
+ Примеры: `yandex`, `special`.
+ Список доступных модулей и альтернативный способ передачи имени модуля см. в разделе [Передача имени модуля](./module-name.mdx). + + --- + + + Минимальный порог уверенности системы в результате распознавания. Допустимые значения: от `0` до `100`.
+ Если уверенность системы ниже указанного значения, задача завершается с ошибкой `ERROR_CAPTCHA_UNSOLVABLE`, а плата за решение не списывается.
+ Подробнее см. в разделе [Порог уверенности распознавания](./threshold.mdx). + + --- + + + Определяет, требуется ли учитывать регистр символов при распознавании. Возможные значения: `true`, `false`. + + --- + + + Указывает, состоит ли CAPTCHA только из цифр.
+ `0` — CAPTCHA может содержать другие символы;
+ `1` — CAPTCHA содержит только цифры. + + --- + + +Указывает, требуется ли выполнить математическое действие, указанное на изображении.
+`false` — математическое действие не требуется;
+`true` — необходимо вычислить выражение. Например, для `2 + 6` будет возвращено `8`.
+ +**Важно:** для модуля `captcha_math` не используйте параметр `math: true`. +
+ +
+ +Base64 — способ представления бинарных данных в текстовом формате. + +Ниже приведён пример получения изображения CAPTCHA в формате Base64 через консоль в **Инструментах разработчика**: + +```JavaScript +const captchaUrl = 'https://example.com/captcha.jpg'; + +function loadAndEncodeCaptchaToBase64(url) { + fetch(url) + .then(response => response.blob()) + .then(blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + + reader.onloadend = function() { + const base64Data = reader.result; + console.log('Base64 Encoded Captcha:', base64Data); + + }; + }) + .catch(error => { + console.error('Error occurred while loading or encoding the captcha:', error); + }); +} + +loadAndEncodeCaptchaToBase64(captchaUrl); + +``` + + +## Метод создания задачи + + + +```http +https://api.capmonster.cloud/createTask +``` + + +
+ +:::info Альтернативный адрес метода + +Для пользователей из России также доступен: + +```text +https://ru.api.capmonster.cloud/createTask +``` + +Подробнее в разделе [createTask](/docs/api/methods/create-task/). + +::: + +
+ + **Пример запроса** +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "ImageToTextTask", + "body": "BASE64_BODY_HERE!" + } +} +``` + **Пример ответа** + ```json + { + "errorId":0, + "taskId":407533072 + } + ``` + +
+ + +## Метод получения результата задачи +Используйте метод [getTaskResult](/docs/api/methods/get-task-result/), чтобы получить результат распознавания. В зависимости от загрузки сервиса результат обычно возвращается в течение 300 мс – 6 с. + + + +```http +https://api.capmonster.cloud/getTaskResult +``` + + +
+ +:::info Альтернативный адрес метода + +Для пользователей из России также доступен: + +```text +https://ru.api.capmonster.cloud/getTaskResult +``` + +Подробнее в разделе [getTaskResult](/docs/api/methods/get-task-result/). + +::: + +
+ + **Пример запроса** + ```json + { + "clientKey":"API_KEY", + "taskId": 407533072 + } + ``` + **Пример ответа** +```json +{ + "errorId": 0, + "status": "ready", + "solution": { + "text": "answer" + } +} +``` + +
+ +
+ +|**Свойство**|**Тип**|**Описание**| +| :-: | :-: | :-: | +|text|String|Текст решения капчи| + +## Как получить параметры для создания задачи + +### Вручную + +1. Откройте страницу с CAPTCHA в браузере. +2. Откройте инструменты разработчика. + +#### base64 + +Найдите изображение CAPTCHA в DOM-дереве. Если изображение уже представлено в формате Base64, его значение будет указано в атрибуте элемента: + +![base64elements](../images/image-to-text/base64-elements.png) + +Если изображение загружается по отдельному URL, откройте вкладку **Network**, найдите соответствующий запрос, нажмите на него правой кнопкой мыши и выберите **Copy image as data URI**. Изображение в формате Base64 будет скопировано в буфер обмена. + +![base64network](../images/image-to-text/base64-network.png) + +### Автоматически + +Изображение CAPTCHA можно получить программно через **браузер** (в том числе headless-браузер, например, с **Playwright**) или непосредственно из **HTTP-запроса**. + +Получайте изображение непосредственно перед созданием задачи, так как содержимое CAPTCHA может изменяться. + +:::warning **Важно!** +Примеры ниже демонстрируют общий принцип получения изображения CAPTCHA. Конкретная реализация зависит от структуры сайта, используемых HTML-элементов и селекторов. +::: + + + +
+ Показать код (для браузера) + ```js + (async () => { + const img = document.querySelector('img'); // Пример селектора + + const imageUrl = img.src; + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Ошибка загрузки изображения"); + } + + const buffer = await response.arrayBuffer(); + + // Преобразуем бинарные данные в base64 + const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); + + console.log(base64Image); + })(); + ``` +
+ +
+ Показать код (Node.js) + ```js + (async () => { + const imageUrl = "https://example/img/.jpg"; // Ссылка на изображение + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Ошибка загрузки изображения"); + } + + const buffer = await response.arrayBuffer(); + + // Преобразуем данные в base64 + const base64Image = Buffer.from(buffer).toString("base64"); + + console.log(base64Image); + })(); + ``` +
+
+ + +
+ Показать код + ```python + import requests + import base64 + + # Ссылка на изображение + image_url = "https://example/img.jpg" + + response = requests.get(image_url) + + if response.status_code == 200: + # Преобразуем бинарные данные изображения в base64 + base64_image = base64.b64encode(response.content).decode('utf-8') + + print(base64_image) + else: + print("Ошибка загрузки изображения") + ``` +
+
+ + +
+ Показать код + ```csharp + using System; + using System.Net.Http; + using System.Threading.Tasks; + + class Program + { + static async Task Main(string[] args) + { + // Ссылка на изображение + string imageUrl = "https://example/img.jpg"; + + using (HttpClient client = new HttpClient()) + { + try + { + byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); + + // Преобразуем бинарные данные изображения в base64 + string base64Image = Convert.ToBase64String(imageBytes); + + Console.WriteLine(base64Image); + } + catch (Exception ex) + { + Console.WriteLine("Ошибка загрузки изображения: " + ex.Message); + } + } + } + } + ``` +
+
+
+ +## Используйте библиотеку SDK + + + +
+ Показать код (для браузера) + ```js + // https://github.com/ZennoLab/capmonstercloud-client-js + + import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + + document.addEventListener('DOMContentLoaded', async () => { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Укажите ваш API-ключ CapMonster Cloud + ); + + // При необходимости можно проверить баланс + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Замените на реальное значение + // Необязательные параметры + CapMonsterModule: CapMonsterModules.YandexWave, // Можно выбрать модуль, например, YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); + }); + ``` +
+ +
+ Показать код (Node.js) +```javascript +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +const API_KEY = "YOUR_API_KEY"; // Укажите ваш API-ключ CapMonster Cloud + +async function solveImageToText() { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: API_KEY }) + ); + + // При необходимости можно проверить баланс + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Замените на реальное значение + // Необязательные параметры + CapMonsterModule: CapMonsterModules.YandexWave, // Можно выбрать модуль, например, YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); +} + +solveImageToText().catch(console.error); +``` +
+ +
+ + +
+ Показать код + ```python + # https://github.com/ZennoLab/capmonstercloud-client-python + + import asyncio + import base64 + from capmonstercloudclient import CapMonsterClient, ClientOptions + from capmonstercloudclient.requests import ImageToTextRequest + + # Укажите ваш API-ключ CapMonster Cloud + client_options = ClientOptions(api_key="YOUR_API_KEY") + cap_monster_client = CapMonsterClient(options=client_options) + + # Изображение в формате base64 + image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Замените на реальное значение + image_bytes = base64.b64decode(image_base64) + + image_to_text_request = ImageToTextRequest( + image_bytes=image_bytes, + module_name=None, # Можно выбрать модуль, например YandexWave + # Необязательные параметры + threshold=50, + case=True, + numeric=0, + math=False + ) + + async def solve_captcha(): + # При необходимости можно проверить баланс + balance = await cap_monster_client.get_balance() + print("Balance:", balance) + + solution = await cap_monster_client.solve_captcha(image_to_text_request) + return solution + + responses = asyncio.run(solve_captcha()) + print("Solution:", responses) + ``` +
+
+ + +
+ Показать код + ```csharp + // https://github.com/ZennoLab/capmonstercloud-client-dotnet + + using System; + using System.Threading.Tasks; + using Zennolab.CapMonsterCloud.Requests; + using Zennolab.CapMonsterCloud; + + class Program + { + static async Task Main(string[] args) + { + var clientOptions = new ClientOptions + { + ClientKey = "YOUR_API_KEY" // Ваш API-ключ CapMonster Cloud + }; + + var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); + + // При необходимости можно проверить баланс + var balance = await cmCloudClient.GetBalanceAsync(); + Console.WriteLine("Balance: " + balance); + + var imageToTextRequest = new ImageToTextRequest + { + Body = "/9j/4AAQSkZJRgABAQAAAQABA...hMjIyMjIyMjIyMjIyMj", // Замените на реальное значение + // Необязательные параметры + CapMonsterModule = "None", // Можно выбрать модуль, например, YandexWave + RecognizingThreshold = 70, + CaseSensitive = true, + Numeric = false, + Math = false + }; + + var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); + + Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); + } + } + ``` +
+
\ No newline at end of file diff --git a/docs/api/module-name.mdx b/docs/captchas/ImageToText/module-name.mdx similarity index 57% rename from docs/api/module-name.mdx rename to docs/captchas/ImageToText/module-name.mdx index 5f7ac94d..81d4f5b1 100644 --- a/docs/api/module-name.mdx +++ b/docs/captchas/ImageToText/module-name.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 5 +sidebar_position: 1 sidebar_label: Передача имени модуля title: "Передача имени модуля для распознавания капчи" description: "Передача имени модуля для распознавания конкретной капчи может быть полезна в случаях работы с определенным сервисом (например, Google, SolveMedia, Whatsapp и т. д.). Это повысит скорость и качество распознавания и снизит вероятность возникновения ошибок." --- -import { ArticleHead } from '../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../src/theme/ArticleHead'; - + # Передача имени модуля @@ -17,115 +17,126 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; ## Как передать имя модуля в CapMonster Cloud, используя только ApiKey поле -Для того, чтобы передать в CapMonsterCloud информацию о модуле, который будет распознавать вашу капчу, используя только поле для указания ApiKey, вы можете дописать к ключу имя модуля в следующем формате: `{apikey}__имя-модуля` +Если в интеграции доступно только поле для API-ключа, укажите имя нужного модуля после ключа в следующем формате: + +```text +{apikey}__имя-модуля +``` + +Например: + +```text +00f87cb0f01330d33709ce3339ad0c8c__solvemedia +``` + +API-ключ и имя модуля должны быть разделены **двумя символами нижнего подчеркивания (`__`)**. -Например, “00f87cb0f01330d33709ce3339ad0c8c__solvemedia” (**!важно**, API ключ и имя модуля разделить **двумя нижними подчеркиваниями**) Список доступных имен модулей представлен ниже: - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
amazon![](images/module-name/amazon.png)![](../images/image-to-text/module-name/amazon.png)
apple![](images/module-name/apple.png)![](../images/image-to-text/module-name/apple.png)
botdetect![](images/module-name/botdetect.png)![](../images/image-to-text/module-name/botdetect.png)
facebook![](images/module-name/facebook.png)![](../images/image-to-text/module-name/facebook.png)
gmx![](images/module-name/gmx.png)![](../images/image-to-text/module-name/gmx.png)
google![](images/module-name/google.png)![](../images/image-to-text/module-name/google.png)
hotmail![](images/module-name/hotmail.png)![](../images/image-to-text/module-name/hotmail.png)
mailru![](images/module-name/mailru.png)![](../images/image-to-text/module-name/mailru.png)
okeng![](images/module-name/okeng.png)![](../images/image-to-text/module-name/okeng.png)
okrus![](images/module-name/okrus.png)![](../images/image-to-text/module-name/okrus.png)
partiallyblur![](images/module-name/partiallyblur.png)![](../images/image-to-text/module-name/partiallyblur.png)
ramblerrus![](images/module-name/rambler.png)![](../images/image-to-text/module-name/rambler.png)
ramblerrusnew![](images/module-name/ramblerrusnew.png)![](../images/image-to-text/module-name/ramblerrusnew.png)
solvemedia![](images/module-name/solvemedia.png)![](../images/image-to-text/module-name/solvemedia.png)
steam![](images/module-name/steam.png)![](../images/image-to-text/module-name/steam.png)
vk![](images/module-name/vk.png)![](../images/image-to-text/module-name/vk.png)
whatsapp![](images/module-name/whatsapp.png)![](../images/image-to-text/module-name/whatsapp.png)
wikimedia_paddle_ensemble![](images/module-name/wikimedia.png)![](../images/image-to-text/module-name/wikimedia.png)
yandex![](images/module-name/yandex.png)![](../images/image-to-text/module-name/yandex.png)
yandexnew (капча из двух слов)![](images/module-name/yandexwave.png)![](../images/image-to-text/module-name/yandexwave.png)
yandexwave
captcha_math![](images/module-name/captcha_math.png)![](../images/image-to-text/module-name/captcha_math.png)
sat![](images/module-name/sat.png)![](../images/image-to-text/module-name/sat.png)
bls_text![](images/module-name/bls_text.png)![](../images/image-to-text/module-name/bls_text.png)
universal (все остальные текстовые капчи)![](images/module-name/universal.png)![](../images/image-to-text/module-name/universal.png)
:::info Info -Если у вас не получилось отправить капчу на определенный модуль, пожалуйста, напишите нам в [службу поддержки](https://helpdesk.zennolab.com/conversation/new), мы поможем вам в настройке! +Если не удается отправить CAPTCHA на нужный модуль, пожалуйста, обратитесь в [службу поддержки](https://helpdesk.zennolab.com/ru/conversation/new). Мы поможем проверить настройки и решить проблему. ::: \ No newline at end of file diff --git a/docs/api/threshold.mdx b/docs/captchas/ImageToText/threshold.mdx similarity index 81% rename from docs/api/threshold.mdx rename to docs/captchas/ImageToText/threshold.mdx index 566ea059..635d9ff8 100644 --- a/docs/api/threshold.mdx +++ b/docs/captchas/ImageToText/threshold.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 6 -sidebar_label: Установка порога уверенности при распознавании текстовых капч -title: "Установка порога списания денег при распознавании капч" -description: "Узнайте, как задать в сервисе распознавания и обхода капч Capmonster Cloud порог уверенности системы в ответе, ниже которого деньги не списываются." +sidebar_position: 3 +sidebar_label: Порог уверенности для текстовых CAPTCHA +title: Порог уверенности для текстовых CAPTCHA +description: "Узнайте, как настроить порог уверенности при распознавании CAPTCHA в CapMonster Cloud. Если уверенность системы ниже заданного значения, плата за решение не списывается." --- -import { ArticleHead } from '../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../src/theme/ArticleHead'; - + # Установка порога уверенности при распознавании текстовых капч @@ -59,5 +59,5 @@ https://api.capmonster.cloud/createTask Пример: “API_KEY\_\_solvemedia\_\_recognizingthreshold\_70” :::note -Если у вас не получилось настроить порог уверенности в ответе, пожалуйста, напишите нам в **[службу поддержки](https://helpdesk.zennolab.com/conversation/new)**, мы поможем вам в настройке! +Если у вас не получилось настроить порог уверенности в ответе, пожалуйста, обратитесь в **[службу поддержки](https://helpdesk.zennolab.com/ru/conversation/new)**, мы поможем вам в настройке. ::: diff --git a/docs/api/user-module.mdx b/docs/captchas/ImageToText/user-module.mdx similarity index 88% rename from docs/api/user-module.mdx rename to docs/captchas/ImageToText/user-module.mdx index eedd4c8d..f6654d9e 100644 --- a/docs/api/user-module.mdx +++ b/docs/captchas/ImageToText/user-module.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 10 +sidebar_position: 2 sidebar_label: Создание пользовательского модуля title: "Создание пользовательского модуля для настройки распознавания капч" description: "Создание пользовательского модуля позволяет создавать пользовательские модули, которые будут обучены под один конкретный вид капчи. Это позволит быстрее и эффективнее распознавать нестандартные капчи и снизит вероятность ошибок." --- -import { ArticleHead } from '../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../src/theme/ArticleHead'; - + # Создание пользовательского модуля @@ -17,7 +17,7 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; Перейдите на [страницу обучения модуля](https://capmonster.cloud/UserModules), или в [личном кабинете](https://dash.capmonster.cloud/) выберите соответствующий раздел в меню, расположенном слева: -![](./images/user-module/user-module.png) +![](../images/image-to-text/user-module/user-module.png) --- @@ -41,7 +41,7 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; На странице [Обучение модулей](https://capmonster.cloud/UserModules) нажмите кнопку **Добавить модуль** и в открывшемся окне укажите типы символов, встречающихся в вашей капче. После этого появится подсказка, сколько капч необходимо собрать и загрузить: -![](./images/user-module/user-module-archive.png) +![](../images/image-to-text/user-module/user-module-archive.png) #### Поддерживаемые форматы изображений @@ -70,7 +70,7 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; Сначала необходимо задать имя модуля. Оно должно содержать только латинские символы. -![](./images/user-module/user-module-name.png) +![](../images/image-to-text/user-module/user-module-name.png) :::warning Внимание! В названии модуля нельзя использовать слово **captcha**. @@ -83,7 +83,7 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; Можно отметить один или несколько вариантов из предложенного списка. -![](./images/user-module/user-module-params.png) +![](../images/image-to-text/user-module/user-module-params.png) :::info В этом списке обязательно должен быть отмечен один из пунктов (или несколько): "Содержит кириллицу", "Содержит латиницу", "Содержит цифры" @@ -93,7 +93,7 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; Здесь необходимо выбрать способ хранения ответов на капчи. -![](./images/user-module/user-module-markup.png) +![](../images/image-to-text/user-module/user-module-markup.png) Всё довольно просто: @@ -116,7 +116,7 @@ captcha3.png:99loe После того как вы указали имя модуля, выбрали типы символов и расположение ответов, осталось только загрузить zip-архив с капчами и отправить нам. -![](./images/user-module/user-module-upload.png) +![](../images/image-to-text/user-module/user-module-upload.png) #### 2.5. Оплата @@ -126,7 +126,7 @@ captcha3.png:99loe 1. Нажмите пункт **Пополнение баланса** 2. Нажмите кнопку **Пополнить баланс** и используйте удобный для вас способ оплаты. -![](./images/user-module/user-module-top-up-balance.png) +![](../images/image-to-text/user-module/user-module-top-up-balance.png) :::note Средства за обучение не списываются, они остаются на балансе. Вы можете их потратить на распознавание любых капч в любое время. @@ -140,7 +140,7 @@ captcha3.png:99loe #### Validated -![](./images/user-module/validated.png) +![](../images/image-to-text/user-module/validated.png) Данный статус назначается после того, как вы отправите форму (если всё было сделано правильно). @@ -150,34 +150,34 @@ captcha3.png:99loe #### Paid -![](./images/user-module/paid.png) +![](../images/image-to-text/user-module/paid.png) Оплата за модуль принята. #### ValidatedInDepth -![](./images/user-module/ValidatedInDepth.png) +![](../images/image-to-text/user-module/ValidatedInDepth.png) Подготовительные работы. #### Annotated -![](./images/user-module/Annotated.png) +![](../images/image-to-text/user-module/Annotated.png) Разметка капч произведена. Идёт процесс обучения. #### Trained -![](./images/user-module/trained.png) +![](../images/image-to-text/user-module/trained.png) -Модуль готов! Теперь на него можно отправлять капчи. +Модуль готов к использованию. Теперь его можно указать при отправке CAPTCHA на распознавание. -### 4. Отправка капч на конкретный модуль +### 4. Отправка CAPTCHA на конкретный модуль Существует несколько способов указать модуль для распознавания: -- [Добавить аргумент CapMonsterModule с именем необходимого модуля при отправке запроса на /createTask](../captchas/image-to-text.mdx) (если вы взаимодействуете напрямую с нашим API) -- [Добавить имя модуля в поле ApiKey](module-name.mdx) (очень удобно при использовании чужих программ, когда нет возможности изменить отправляемые запросы) +- [Передать параметр `CapMonsterModule` с именем нужного модуля при создании задачи](/docs/captchas/ImageToText/image-to-text/) — при прямом взаимодействии с API CapMonster Cloud. +- [Добавить имя модуля к API-ключу](/docs/captchas/ImageToText/module-name/) — при использовании сторонних программ, в которых нельзя изменить структуру отправляемого запроса. --- @@ -204,7 +204,7 @@ captcha3.png:99loe
Напротив моего модуля в колонке “Комментарий” появилась надпись `Ошибка` : Что мне делать? -![](./images/user-module/error.png) +![](../images/image-to-text/user-module/error.png) Пожалуйста, немного подождите. Если в течение 24 часов ситуация не изменится, обратитесь [в поддержку](https://helpdesk.zennolab.com/ru/conversation/new). diff --git a/docs/captchas/alibaba-task.mdx b/docs/captchas/alibaba-task.mdx index a769eef3..e14543c7 100644 --- a/docs/captchas/alibaba-task.mdx +++ b/docs/captchas/alibaba-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 27 +sidebar_position: 26 sidebar_label: Alibaba Captcha title: "Автоматическое распознавание и обход Alibaba CAPTCHA | API" description: "Узнайте, как распознать Alibaba с помощью API сервиса автоматического распознавания и решения капч CapMonster Cloud!" diff --git a/docs/captchas/altcha-task.mdx b/docs/captchas/altcha-task.mdx index 8647c4bc..a9acb5e4 100644 --- a/docs/captchas/altcha-task.mdx +++ b/docs/captchas/altcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 21 sidebar_label: Altcha --- diff --git a/docs/captchas/amazon-task.mdx b/docs/captchas/amazon-task.mdx index c7c7eb3d..e2a67e7a 100644 --- a/docs/captchas/amazon-task.mdx +++ b/docs/captchas/amazon-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 15 +sidebar_position: 14 sidebar_label: Amazon (AWS WAF) title: "Автоматическое распознавание и обход Amazon AWS WAF капчи через API Capmonster Cloud" description: Узнайте, как обойти капчу Amazon (AWS WAF) с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud! diff --git a/docs/captchas/binance.mdx b/docs/captchas/binance.mdx index 2fb96d18..b4024828 100644 --- a/docs/captchas/binance.mdx +++ b/docs/captchas/binance.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 16 +sidebar_position: 15 sidebar_label: Binance title: "Автоматическое распознавание и обход Binance капчи | API" description: "Узнайте, как обойти капчу Binance с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/castle-task.mdx b/docs/captchas/castle-task.mdx index 39d9a268..8ed827e6 100644 --- a/docs/captchas/castle-task.mdx +++ b/docs/captchas/castle-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 24 +sidebar_position: 23 sidebar_label: Castle title: "Автоматическое распознавание и обход Castle | API" description: "Узнайте, как распознать Castle с помощью API сервиса автоматического рапознавания и решения капч CapMonster Cloud!" diff --git a/docs/captchas/friendly-task.mdx b/docs/captchas/friendly-task.mdx index 01891832..bbde4477 100644 --- a/docs/captchas/friendly-task.mdx +++ b/docs/captchas/friendly-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 28 +sidebar_position: 27 sidebar_label: Friendly Captcha title: "Автоматическое распознавание и обход Friendly Captcha | API" description: "Узнайте, как распознать Friendly Captcha с помощью API сервиса автоматического рапознавания и решения капч CapMonster Cloud!" diff --git a/docs/captchas/funcaptcha-task.mdx b/docs/captchas/funcaptcha-task.mdx index 6868ecac..7e8aa1ab 100644 --- a/docs/captchas/funcaptcha-task.mdx +++ b/docs/captchas/funcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 23 +sidebar_position: 22 sidebar_label: FunCaptcha title: "Автоматическое распознавание и обход FunCaptcha | API" description: "Узнайте, как обойти FunCaptcha (Arkose Labs captcha) с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/geetest-task.mdx b/docs/captchas/geetest-task.mdx index 032708b3..79d25da5 100644 --- a/docs/captchas/geetest-task.mdx +++ b/docs/captchas/geetest-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 sidebar_label: GeeTest title: "Распознавание и решение GeeTest — GeeTest Task | API" description: "Смотрите в документации Capmonster Cloud Docs, как настроить автоматическое распознавание и решить (обойти) капчи GeeTest через API с помощью типа задач GeeTest Task с использованием ваших прокси." diff --git a/docs/captchas/hunt-task.mdx b/docs/captchas/hunt-task.mdx index 14b741fe..57c34b4a 100644 --- a/docs/captchas/hunt-task.mdx +++ b/docs/captchas/hunt-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 26 +sidebar_position: 25 sidebar_label: Hunt Captcha title: "Автоматическое распознавание и обход Hunt CAPTCHA | API" description: "Узнайте, как распознать Hunt CAPTCHA с помощью API сервиса CapMonster Cloud." diff --git a/docs/api/images/module-name/amazon.png b/docs/captchas/images/image-to-text/module-name/amazon.png similarity index 100% rename from docs/api/images/module-name/amazon.png rename to docs/captchas/images/image-to-text/module-name/amazon.png diff --git a/docs/api/images/module-name/apple.png b/docs/captchas/images/image-to-text/module-name/apple.png similarity index 100% rename from docs/api/images/module-name/apple.png rename to docs/captchas/images/image-to-text/module-name/apple.png diff --git a/docs/api/images/module-name/bls_text.png b/docs/captchas/images/image-to-text/module-name/bls_text.png similarity index 100% rename from docs/api/images/module-name/bls_text.png rename to docs/captchas/images/image-to-text/module-name/bls_text.png diff --git a/docs/api/images/module-name/botdetect.png b/docs/captchas/images/image-to-text/module-name/botdetect.png similarity index 100% rename from docs/api/images/module-name/botdetect.png rename to docs/captchas/images/image-to-text/module-name/botdetect.png diff --git a/docs/api/images/module-name/captcha_math.png b/docs/captchas/images/image-to-text/module-name/captcha_math.png similarity index 100% rename from docs/api/images/module-name/captcha_math.png rename to docs/captchas/images/image-to-text/module-name/captcha_math.png diff --git a/docs/api/images/module-name/facebook.png b/docs/captchas/images/image-to-text/module-name/facebook.png similarity index 100% rename from docs/api/images/module-name/facebook.png rename to docs/captchas/images/image-to-text/module-name/facebook.png diff --git a/docs/api/images/module-name/gmx.png b/docs/captchas/images/image-to-text/module-name/gmx.png similarity index 100% rename from docs/api/images/module-name/gmx.png rename to docs/captchas/images/image-to-text/module-name/gmx.png diff --git a/docs/api/images/module-name/google.png b/docs/captchas/images/image-to-text/module-name/google.png similarity index 100% rename from docs/api/images/module-name/google.png rename to docs/captchas/images/image-to-text/module-name/google.png diff --git a/docs/api/images/module-name/hotmail.png b/docs/captchas/images/image-to-text/module-name/hotmail.png similarity index 100% rename from docs/api/images/module-name/hotmail.png rename to docs/captchas/images/image-to-text/module-name/hotmail.png diff --git a/docs/api/images/module-name/mailru.png b/docs/captchas/images/image-to-text/module-name/mailru.png similarity index 100% rename from docs/api/images/module-name/mailru.png rename to docs/captchas/images/image-to-text/module-name/mailru.png diff --git a/docs/api/images/module-name/okeng.png b/docs/captchas/images/image-to-text/module-name/okeng.png similarity index 100% rename from docs/api/images/module-name/okeng.png rename to docs/captchas/images/image-to-text/module-name/okeng.png diff --git a/docs/api/images/module-name/okrus.png b/docs/captchas/images/image-to-text/module-name/okrus.png similarity index 100% rename from docs/api/images/module-name/okrus.png rename to docs/captchas/images/image-to-text/module-name/okrus.png diff --git a/docs/api/images/module-name/partiallyblur.png b/docs/captchas/images/image-to-text/module-name/partiallyblur.png similarity index 100% rename from docs/api/images/module-name/partiallyblur.png rename to docs/captchas/images/image-to-text/module-name/partiallyblur.png diff --git a/docs/api/images/module-name/rambler.png b/docs/captchas/images/image-to-text/module-name/rambler.png similarity index 100% rename from docs/api/images/module-name/rambler.png rename to docs/captchas/images/image-to-text/module-name/rambler.png diff --git a/docs/api/images/module-name/ramblerrusnew.png b/docs/captchas/images/image-to-text/module-name/ramblerrusnew.png similarity index 100% rename from docs/api/images/module-name/ramblerrusnew.png rename to docs/captchas/images/image-to-text/module-name/ramblerrusnew.png diff --git a/docs/api/images/module-name/sat.png b/docs/captchas/images/image-to-text/module-name/sat.png similarity index 100% rename from docs/api/images/module-name/sat.png rename to docs/captchas/images/image-to-text/module-name/sat.png diff --git a/docs/api/images/module-name/solvemedia.png b/docs/captchas/images/image-to-text/module-name/solvemedia.png similarity index 100% rename from docs/api/images/module-name/solvemedia.png rename to docs/captchas/images/image-to-text/module-name/solvemedia.png diff --git a/docs/api/images/module-name/steam.png b/docs/captchas/images/image-to-text/module-name/steam.png similarity index 100% rename from docs/api/images/module-name/steam.png rename to docs/captchas/images/image-to-text/module-name/steam.png diff --git a/docs/api/images/module-name/universal.png b/docs/captchas/images/image-to-text/module-name/universal.png similarity index 100% rename from docs/api/images/module-name/universal.png rename to docs/captchas/images/image-to-text/module-name/universal.png diff --git a/docs/api/images/module-name/vk.png b/docs/captchas/images/image-to-text/module-name/vk.png similarity index 100% rename from docs/api/images/module-name/vk.png rename to docs/captchas/images/image-to-text/module-name/vk.png diff --git a/docs/api/images/module-name/whatsapp.png b/docs/captchas/images/image-to-text/module-name/whatsapp.png similarity index 100% rename from docs/api/images/module-name/whatsapp.png rename to docs/captchas/images/image-to-text/module-name/whatsapp.png diff --git a/docs/api/images/module-name/wikimedia.png b/docs/captchas/images/image-to-text/module-name/wikimedia.png similarity index 100% rename from docs/api/images/module-name/wikimedia.png rename to docs/captchas/images/image-to-text/module-name/wikimedia.png diff --git a/docs/api/images/module-name/yandex.png b/docs/captchas/images/image-to-text/module-name/yandex.png similarity index 100% rename from docs/api/images/module-name/yandex.png rename to docs/captchas/images/image-to-text/module-name/yandex.png diff --git a/docs/api/images/module-name/yandexwave.png b/docs/captchas/images/image-to-text/module-name/yandexwave.png similarity index 100% rename from docs/api/images/module-name/yandexwave.png rename to docs/captchas/images/image-to-text/module-name/yandexwave.png diff --git a/docs/api/images/user-module/Annotated.png b/docs/captchas/images/image-to-text/user-module/Annotated.png similarity index 100% rename from docs/api/images/user-module/Annotated.png rename to docs/captchas/images/image-to-text/user-module/Annotated.png diff --git a/docs/api/images/user-module/ValidatedInDepth.png b/docs/captchas/images/image-to-text/user-module/ValidatedInDepth.png similarity index 100% rename from docs/api/images/user-module/ValidatedInDepth.png rename to docs/captchas/images/image-to-text/user-module/ValidatedInDepth.png diff --git a/docs/api/images/user-module/error.png b/docs/captchas/images/image-to-text/user-module/error.png similarity index 100% rename from docs/api/images/user-module/error.png rename to docs/captchas/images/image-to-text/user-module/error.png diff --git a/docs/api/images/user-module/paid.png b/docs/captchas/images/image-to-text/user-module/paid.png similarity index 100% rename from docs/api/images/user-module/paid.png rename to docs/captchas/images/image-to-text/user-module/paid.png diff --git a/docs/api/images/user-module/trained.png b/docs/captchas/images/image-to-text/user-module/trained.png similarity index 100% rename from docs/api/images/user-module/trained.png rename to docs/captchas/images/image-to-text/user-module/trained.png diff --git a/docs/api/images/user-module/user-module-archive.png b/docs/captchas/images/image-to-text/user-module/user-module-archive.png similarity index 100% rename from docs/api/images/user-module/user-module-archive.png rename to docs/captchas/images/image-to-text/user-module/user-module-archive.png diff --git a/docs/api/images/user-module/user-module-markup.png b/docs/captchas/images/image-to-text/user-module/user-module-markup.png similarity index 100% rename from docs/api/images/user-module/user-module-markup.png rename to docs/captchas/images/image-to-text/user-module/user-module-markup.png diff --git a/docs/api/images/user-module/user-module-name.png b/docs/captchas/images/image-to-text/user-module/user-module-name.png similarity index 100% rename from docs/api/images/user-module/user-module-name.png rename to docs/captchas/images/image-to-text/user-module/user-module-name.png diff --git a/docs/api/images/user-module/user-module-params.png b/docs/captchas/images/image-to-text/user-module/user-module-params.png similarity index 100% rename from docs/api/images/user-module/user-module-params.png rename to docs/captchas/images/image-to-text/user-module/user-module-params.png diff --git a/docs/api/images/user-module/user-module-top-up-balance.png b/docs/captchas/images/image-to-text/user-module/user-module-top-up-balance.png similarity index 100% rename from docs/api/images/user-module/user-module-top-up-balance.png rename to docs/captchas/images/image-to-text/user-module/user-module-top-up-balance.png diff --git a/docs/api/images/user-module/user-module-upload.png b/docs/captchas/images/image-to-text/user-module/user-module-upload.png similarity index 100% rename from docs/api/images/user-module/user-module-upload.png rename to docs/captchas/images/image-to-text/user-module/user-module-upload.png diff --git a/docs/api/images/user-module/user-module.png b/docs/captchas/images/image-to-text/user-module/user-module.png similarity index 100% rename from docs/api/images/user-module/user-module.png rename to docs/captchas/images/image-to-text/user-module/user-module.png diff --git a/docs/api/images/user-module/validated.png b/docs/captchas/images/image-to-text/user-module/validated.png similarity index 100% rename from docs/api/images/user-module/validated.png rename to docs/captchas/images/image-to-text/user-module/validated.png diff --git a/docs/captchas/incapsula.mdx b/docs/captchas/incapsula.mdx index 2774a658..bd70443b 100644 --- a/docs/captchas/incapsula.mdx +++ b/docs/captchas/incapsula.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 16 sidebar_label: Imperva (Incapsula) title: "Автоматическое распознавание и обход Imperva (Incapsula) | API" description: "Узнайте, как обойти капчу Imperva (Incapsula) с помощью API сервиса автоматического распознавания и решения капч Capmonster Cloud только на ваших ресурсах!" diff --git a/docs/captchas/mtcaptcha-task.mdx b/docs/captchas/mtcaptcha-task.mdx index 28eed979..e1576f1a 100644 --- a/docs/captchas/mtcaptcha-task.mdx +++ b/docs/captchas/mtcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 21 +sidebar_position: 20 sidebar_label: MTCaptcha title: "Автоматическое распознавание и обход MTCaptcha | API" description: "Узнайте, как обойти MTCaptcha с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/prosopo-task.mdx b/docs/captchas/prosopo-task.mdx index 46af6bca..61f736af 100644 --- a/docs/captchas/prosopo-task.mdx +++ b/docs/captchas/prosopo-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 17 sidebar_label: Prosopo title: "Автоматическое распознавание и обход Prosopo капчи | API" description: "Узнайте, как обойти капчу Prosopo с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/tendi.mdx b/docs/captchas/tendi.mdx index e647fccd..b4be5203 100644 --- a/docs/captchas/tendi.mdx +++ b/docs/captchas/tendi.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 14 +sidebar_position: 13 sidebar_label: TenDI title: "Автоматическое распознавание и обход капчи TenDI — Tencent captcha | API" description: "Узнайте, как обойти капчу TenDI (Tencent captcha) с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/docs/captchas/tspd-task.mdx b/docs/captchas/tspd-task.mdx index f44cb3c8..1cc66303 100644 --- a/docs/captchas/tspd-task.mdx +++ b/docs/captchas/tspd-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 25 +sidebar_position: 24 sidebar_label: TSPD title: "Автоматическое распознавание и обход TSPD | API" description: "Узнайте, как распознать TSPD с помощью API сервиса автоматического рапознавания и решения капч CapMonster Cloud!" diff --git a/docs/captchas/turnstile-challenge-task.mdx b/docs/captchas/turnstile-challenge-task.mdx index 6cb0b37f..348062af 100644 --- a/docs/captchas/turnstile-challenge-task.mdx +++ b/docs/captchas/turnstile-challenge-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 sidebar_label: Cloudflare Challenge title: "Распознавание и решение Cloudflare Challenge | API" description: "Задача Cloudflare Challenge для автоматического распознавания и решения Cloudflare Challenge капч через API Capmonster Cloud. Поддерживаются все подтипы - manual, non-interactive и invisible." diff --git a/docs/captchas/turnstile-task.mdx b/docs/captchas/turnstile-task.mdx index 759a8d63..1cd58312 100644 --- a/docs/captchas/turnstile-task.mdx +++ b/docs/captchas/turnstile-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: Cloudflare Turnstile title: "Распознавание и решение Cloudflare Turnstile | API" description: "Задача Turnstile Task для автоматического распознавания и решения Cloudflare Turnstile капчи через API Capmonster Cloud. Поддерживаются все подтипы Turnstile - manual, non-interactive и invisible." diff --git a/docs/captchas/turnstile-waitroom-task.mdx b/docs/captchas/turnstile-waitroom-task.mdx index f5f0741d..1e2ba7b1 100644 --- a/docs/captchas/turnstile-waitroom-task.mdx +++ b/docs/captchas/turnstile-waitroom-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 sidebar_label: Cloudflare Waiting Room title: "Распознавание и решение Cloudflare Waiting Room | API" description: "Задачи Turnstile Task и Cloudflare Waiting Room для автоматического распознавания и решения Cloudflare Waiting Room капч через API Capmonster Cloud." diff --git a/docs/captchas/yidun-task.mdx b/docs/captchas/yidun-task.mdx index dc96c4b9..43f70d51 100644 --- a/docs/captchas/yidun-task.mdx +++ b/docs/captchas/yidun-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 18 sidebar_label: Yidun title: "Автоматическое распознавание и обход Yidun (NECaptcha) капчи | API" description: "Узнайте, как обойти капчу Yidun с помощью API сервиса автоматического рапознавания и решения капч Capmonster Cloud!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/module-name.mdx b/i18n/en/docusaurus-plugin-content-docs/current/api/module-name.mdx deleted file mode 100644 index aee1aa35..00000000 --- a/i18n/en/docusaurus-plugin-content-docs/current/api/module-name.mdx +++ /dev/null @@ -1,131 +0,0 @@ ---- -sidebar_position: 5 -sidebar_label: Passing module name -title: "Passing the module name for captcha recognition" -description: "Passing the module name to recognize a specific captcha can be useful in cases of working with a specific service (e.g. Google, SolveMedia, Whatsapp, etc.). This will increase the speed and quality of recognition and reduce the probability of errors." ---- - -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; - - - -# Passing module name - -In working with automatic captcha recognition, accuracy and processing speed are critical. Different services use their own unique types of captchas, and a universal solution does not always handle them equally effectively. For example, captchas from **Google**, **SolveMedia**, **WhatsApp**, or **Yandex** may have their own specifics, which can cause the standard recognition module to work more slowly or with errors. - -To improve efficiency and reduce the likelihood of incorrect recognition, CapMonster Cloud allows you to specify a particular module that will process your captcha. The system will apply a specialized recognition algorithm designed for that specific service instead of using a universal captcha processing method. - -## How to pass module name to CapMonster Cloud, using ApiKey field only - -In order to send to CapMonsterCloud information about the module that will recognize your captcha, using only the field to specify ApiKey, you can add the module name to the key in the following format: `{apikey}__moduleName` - -For example, “00f87cb0f01330d33709ce3339ad0c8c__solvemedia” (**!important**, separate the API key and module name with a **double underscore**) - -The list of available module names: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
amazon![](images/module-name/amazon.png)
apple![](images/module-name/apple.png)
botdetect![](images/module-name/botdetect.png)
facebook![](images/module-name/facebook.png)
gmx![](images/module-name/gmx.png)
google![](images/module-name/google.png)
hotmail![](images/module-name/hotmail.png)
mailru![](images/module-name/mailru.png)
okeng![](images/module-name/okeng.png)
okrus![](images/module-name/okrus.png)
partiallyblur![](images/module-name/partiallyblur.png)
ramblerrus![](images/module-name/rambler.png)
ramblerrusnew![](images/module-name/ramblerrusnew.png)
solvemedia![](images/module-name/solvemedia.png)
steam![](images/module-name/steam.png)
vk![](images/module-name/vk.png)
whatsapp![](images/module-name/whatsapp.png)
wikimedia_paddle_ensemble![](images/module-name/wikimedia.png)
yandex![](images/module-name/yandex.png)
yandexnew (two-word captcha)![](images/module-name/yandexwave.png)
yandexwave
captcha_math![](images/module-name/captcha_math.png)
sat![](images/module-name/sat.png)
bls_text![](images/module-name/bls_text.png)
universal (all other text captchas)![](images/module-name/universal.png)
- -:::info Info -If you were unable to send a captcha to a specific module, please write to our [support team](https://helpdesk.zennolab.com/conversation/new), we will help you! -::: \ No newline at end of file diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx index 52ce7d4f..41dcc4df 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 13 +sidebar_position: 12 sidebar_label: Basilisk title: "Automatically recognise and bypass Basilisk captcha - Basilisk Task | API" description: "Learn how to bypass Basilisk captcha using Capmonster Cloud API! Detailed description of features and examples." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json new file mode 100644 index 00000000..a79081f3 --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "ImageToText", + "position": 6, + "link": { + "type": "generated-index", + "title": "ImageToText", + "description": "Text CAPTCHA recognition, confidence threshold configuration, and working with custom modules." + } +} diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx similarity index 71% rename from i18n/en/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx index aac4feb4..5fec7546 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx @@ -1,476 +1,491 @@ ---- -sidebar_position: 12 -sidebar_label: ImageToText -title: "Automatically recognise and bypass simple image-to-text captcha - Image-to-Text | API" -description: "Image-to-Text method via CapMonster.Cloud API to automatically recognise and bypass captcha with text on images. Detailed tutorial and examples for automatically solving simple captcha with text in Capmonster Cloud Docs!" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import ParamItem from '@theme/ParamItem'; -import MethodItem from '@theme/MethodItem'; -import MethodDescription from '@theme/MethodDescription' -import PriceBlock from '../../../../../src/theme/PriceBlock'; -import PriceBlockWrap from '@theme/PriceBlockWrap'; -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; - - - -# ImageToText - - - - - -![](./images/image-to-text/text-captcha-2.png) ---- - -This is a regular captcha, which is an image with text to be entered into the corresponding line. - -:::warning **Attention!** -Using proxy servers is not required for this task. -::: - - -## Request parameters - -
- -> IMPORTANT: retrieve the base64 image immediately before creating the task to avoid errors during solving (see the example below for obtaining a captcha image in base64 format). - -
- - -
- - **ImageToTextTask** - - --- - - - File body encoded in base64*. Make sure to send it without line breaks. - - --- - - - The name of recognizing module, for example, `yandex`. Alternative way to pass module name and list of all available modules you can find [here](../api/module-name.mdx).
- Example: `yandex`, `special` and others - - --- - - - Captcha recognition threshold with a possible value from **0** to **100**. For example, if recognizingThreshold was set to **90** and the task was solved with a confidence of **80**, you won't be charged. In this case the user will get a response ERROR_CAPTCHA_UNSOLVABLE. An alternative method for setting the threshold for deducting money is described in the [article](../api/threshold.mdx). - - --- - - - Whether the solution should be case-sensitive. Possible values: `true`, `false`. - - --- - - - `1` - if captcha contains numbers only.
- Possible values: `0`, `1` - - --- - - - `false` — undefined;
- `true` — if captcha requires a mathematical operation (for example: captcha 2 + 6 = will return a value of 8).
- - **Important:** Do not use the `math: true` parameter for the `captcha_math` module. -
- -
- -*Base64 is a data encoding method that allows you to represent binary data as text. Here is an example of obtaining a captcha image in base64 format using the console in the **Developer Tools**: - -```JavaScript -const captchaUrl = 'https://example.com/captcha.jpg'; - -function loadAndEncodeCaptchaToBase64(url) { - fetch(url) - .then(response => response.blob()) - .then(blob => { - const reader = new FileReader(); - reader.readAsDataURL(blob); - - reader.onloadend = function() { - const base64Data = reader.result; - console.log('Base64 Encoded Captcha:', base64Data); - - }; - }) - .catch(error => { - console.error('Error occurred while loading or encoding the captcha:', error); - }); -} - -loadAndEncodeCaptchaToBase64(captchaUrl); - -``` - - -## Create task method - -
- - ```http - https://api.capmonster.cloud/createTask - ``` - - - **Request example** -```json -{ - "clientKey": "API_KEY", - "task": { - "type": "ImageToTextTask", - "body": "BASE64_BODY_HERE!" - } -} -``` - **Response example** - ```json - { - "errorId":0, - "taskId":407533072 - } - ``` - -
- -## Get task result method -Use the [getTaskResult](../api/methods/get-task-result.mdx) method to get the captcha solution. Depending on the system load, you will receive an answer within an interval from 300 ms to 6 s - -
- - ```http - https://api.capmonster.cloud/getTaskResult - ``` - - - **Request example** - ```json - { - "clientKey":"API_KEY", - "taskId": 407533072 - } - ``` - **Response example** -```json -{ - "errorId": 0, - "status": "ready", - "solution": { - "text": "answer" - } -} -``` - -
- -
- -|**Property**|**Type**|**Description**| -| :-: | :-: | :-: | -|text|String|Captcha answer| - -## How to find all required parameters for task creation - -### Manually - -1. Open your website where the captcha appears in the browser. -2. Right-click on the captcha element and select **Inspect**. - -#### base64 - -Locate the required element in the DOM tree and hover over it – the *base64*-encoded image will be displayed directly in the element's attributes: - -![base64elements](images/image-to-text/base64-elements.png) - -If the image references an external URL rather than containing base64-encoded data, you can find it in the network requests (**Network**). Right-click on the relevant request and select **Copy image as data URI**. This will copy the *base64*-encoded image data to your clipboard. - -![base64network](images/image-to-text/base64-network.png) - -### Automatically - -To automate parameter extraction, you can retrieve them via a **browser** (regular or headless, e.g., using **Playwright**) or directly from **HTTP requests**. Since dynamic parameter values are short-lived, it is recommended to use them immediately after retrieval. - -:::warning **Important!** -The provided code snippets are basic examples for learning how to extract the required parameters. The exact implementation will depend on your captcha page, its structure, and the HTML elements and selectors used. -::: - - - -
- Show code (for browser) - ```js - (async () => { - const img = document.querySelector('img'); // Example selector - - const imageUrl = img.src; - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Failed to load image"); - } - - const buffer = await response.arrayBuffer(); - - // Convert binary data to base64 - const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); - - console.log(base64Image); - })(); - ``` -
- -
- Show code (Node.js) - ```js - (async () => { - const imageUrl = "https://example/img/.jpg"; // Image URL - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Failed to load image"); - } - - const buffer = await response.arrayBuffer(); - - // Convert data to base64 - const base64Image = Buffer.from(buffer).toString("base64"); - - console.log(base64Image); - })(); - ``` -
-
- - -
- Show code - ```python - import requests - import base64 - - # Image URL - image_url = "https://example/img.jpg" - - response = requests.get(image_url) - - if response.status_code == 200: - # Convert image binary data to base64 - base64_image = base64.b64encode(response.content).decode('utf-8') - - print(base64_image) - else: - print("Failed to load image") - ``` -
-
- - -
- Show code - ```csharp - using System; - using System.Net.Http; - using System.Threading.Tasks; - - class Program - { - static async Task Main(string[] args) - { - // Image URL - string imageUrl = "https://example/img.jpg"; - - using (HttpClient client = new HttpClient()) - { - try - { - byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); - - // Convert image binary data to base64 - string base64Image = Convert.ToBase64String(imageBytes); - - Console.WriteLine(base64Image); - } - catch (Exception ex) - { - Console.WriteLine("Failed to load image: " + ex.Message); - } - } - } - } - ``` -
-
-
- -## Use the SDK library - - - -
- Show code (for browser) - ```js - // https://github.com/ZennoLab/capmonstercloud-client-js - - import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - - document.addEventListener('DOMContentLoaded', async () => { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Specify your CapMonster Cloud API key - ); - - // Optionally, you can check the balance - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Replace with actual value - // Optional parameters - CapMonsterModule: CapMonsterModules.YandexWave, - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); - }); - ``` -
- -
- Show code (Node.js) -```javascript -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key - -async function solveImageToText() { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: API_KEY }) - ); - - // Optionally, you can check the balance - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Replace with actual value - // Optional parameters - CapMonsterModule: CapMonsterModules.YandexWave, - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); -} - -solveImageToText().catch(console.error); -``` -
- -
- - -
- Show code - ```python - # https://github.com/ZennoLab/capmonstercloud-client-python - - import asyncio - import base64 - from capmonstercloudclient import CapMonsterClient, ClientOptions - from capmonstercloudclient.requests import ImageToTextRequest - - # Specify your CapMonster Cloud API key - client_options = ClientOptions(api_key="YOUR_API_KEY") - cap_monster_client = CapMonsterClient(options=client_options) - - # Image in base64 format - image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Replace with actual value - image_bytes = base64.b64decode(image_base64) - - image_to_text_request = ImageToTextRequest( - image_bytes=image_bytes, - module_name=None, # You can select a module, e.g., YandexWave - # Optional parameters - threshold=50, - case=True, - numeric=0, - math=False - ) - - async def solve_captcha(): - # Optionally, you can check the balance - balance = await cap_monster_client.get_balance() - print("Balance:", balance) - - solution = await cap_monster_client.solve_captcha(image_to_text_request) - return solution - - responses = asyncio.run(solve_captcha()) - print("Solution:", responses) - ``` -
-
- - -
- Show code - ```csharp - // https://github.com/ZennoLab/capmonstercloud-client-dotnet - - using System; - using System.Threading.Tasks; - using Zennolab.CapMonsterCloud.Requests; - using Zennolab.CapMonsterCloud; - - class Program - { - static async Task Main(string[] args) - { - var clientOptions = new ClientOptions - { - ClientKey = "YOUR_API_KEY" // Specify your CapMonster Cloud API key - }; - - var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); - - // Optionally, you can check the balance - var balance = await cmCloudClient.GetBalanceAsync(); - Console.WriteLine("Balance: " + balance); - - var imageToTextRequest = new ImageToTextRequest - { - Body = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z", // Replace with actual value - // Optional parameters - CapMonsterModule = "None", - RecognizingThreshold = 70, - CaseSensitive = true, - Numeric = false, - Math = false - }; - - var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); - - Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); - } - } - ``` -
-
-
+--- +sidebar_position: 0 +sidebar_label: ImageToText +title: "Automatic recognition and bypass of simple text CAPTCHA — Image-to-Text | API" +description: "ImageToTextTask for automatic recognition of text CAPTCHAs via the CapMonster Cloud API. Parameter descriptions, request examples, and methods for obtaining an image in Base64 format." +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import ParamItem from '@theme/ParamItem'; +import MethodItem from '@theme/MethodItem'; +import MethodDescription from '@theme/MethodDescription' +import PriceBlock from '../../../../../../src/theme/PriceBlock'; +import PriceBlockWrap from '@theme/PriceBlockWrap'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; + + + +# ImageToText + + + + + +![](../images/image-to-text/text-captcha-2.png) + +ImageToText is a task type for recognizing text CAPTCHAs provided as images. + +:::warning **Attention!** +Proxy servers are not required for this task. +::: + + +## Request parameters + +
+ +> IMPORTANT: retrieve the Base64 image immediately before creating the task to avoid solving errors (see the example below for obtaining a CAPTCHA image in Base64 format). + +
+ + +
+ + **ImageToTextTask** + + --- + + + CAPTCHA image encoded in Base64. Send the value as a single line without line breaks. + + --- + + + Name of the module used to recognize the CAPTCHA.
+ Examples: `yandex`, `special`.
+ For the list of available modules and an alternative way to pass the module name, see [Passing the module name](./module-name.mdx). + + --- + + + Minimum confidence threshold for the recognition result. Allowed values: from `0` to `100`.
+ If the system confidence is below the specified value, the task ends with the `ERROR_CAPTCHA_UNSOLVABLE` error and no charge is applied.
+ For details, see [Recognition confidence threshold](./threshold.mdx). + + --- + + + Specifies whether character case must be considered during recognition. Possible values: `true`, `false`. + + --- + + + Specifies whether the CAPTCHA contains digits only.
+ `0` — the CAPTCHA may contain other characters;
+ `1` — the CAPTCHA contains digits only. + + --- + + +Specifies whether the mathematical operation shown in the image must be calculated.
+`false` — no mathematical operation is required;
+`true` — calculate the expression. For example, `2 + 6` returns `8`.
+ +**Important:** Do not use the `math: true` parameter for the `captcha_math` module. +
+ +
+ +Base64 is a way to represent binary data in text format. + +Below is an example of obtaining a CAPTCHA image in Base64 format using the console in **Developer Tools**: + +```JavaScript +const captchaUrl = 'https://example.com/captcha.jpg'; + +function loadAndEncodeCaptchaToBase64(url) { + fetch(url) + .then(response => response.blob()) + .then(blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + + reader.onloadend = function() { + const base64Data = reader.result; + console.log('Base64 Encoded Captcha:', base64Data); + + }; + }) + .catch(error => { + console.error('Error occurred while loading or encoding the captcha:', error); + }); +} + +loadAndEncodeCaptchaToBase64(captchaUrl); + +``` + + +## Create task method + + + +```http +https://api.capmonster.cloud/createTask +``` + + +
+ +
+ + **Request example** +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "ImageToTextTask", + "body": "BASE64_BODY_HERE!" + } +} +``` + **Response example** + ```json + { + "errorId":0, + "taskId":407533072 + } + ``` + +
+ +## Get task result method +Use the [getTaskResult](/en/docs/api/methods/get-task-result/) method to get the recognition result. Depending on the service load, the result is usually returned within 300 ms to 6 s. + + + +```http +https://api.capmonster.cloud/getTaskResult +``` + + +
+ +
+ + **Request example** + ```json + { + "clientKey":"API_KEY", + "taskId": 407533072 + } + ``` + **Response example** +```json +{ + "errorId": 0, + "status": "ready", + "solution": { + "text": "answer" + } +} +``` + +
+ +
+ +|**Property**|**Type**|**Description**| +| :-: | :-: | :-: | +|text|String|CAPTCHA solution text| + +## How to get parameters for task creation + +### Manually + +1. Open the page with the CAPTCHA in your browser. +2. Open Developer Tools. + +#### base64 + +Find the CAPTCHA image in the DOM tree. If the image is already represented in Base64 format, its value will be specified in the element attribute: + +![base64elements](../images/image-to-text/base64-elements.png) + +If the image is loaded from a separate URL, open the **Network** tab, find the corresponding request, right-click it, and select **Copy image as data URI**. The Base64-encoded image will be copied to the clipboard. + +![base64network](../images/image-to-text/base64-network.png) +### Automatically + +The CAPTCHA image can be obtained programmatically through a **browser** (including a headless browser such as **Playwright**) or directly from an **HTTP request**. + +Retrieve the image immediately before creating the task because the CAPTCHA content may change. + +:::warning **Important!** +The examples below demonstrate the general approach to obtaining a CAPTCHA image. The exact implementation depends on the website structure, HTML elements, and selectors used. +::: + + + +
+ Show code (for browser) + ```js + (async () => { + const img = document.querySelector('img'); // Example selector + + const imageUrl = img.src; + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Failed to load image"); + } + + const buffer = await response.arrayBuffer(); + + // Convert binary data to base64 + const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); + + console.log(base64Image); + })(); + ``` +
+ +
+ Show code (Node.js) + ```js + (async () => { + const imageUrl = "https://example/img/.jpg"; // Image URL + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Failed to load image"); + } + + const buffer = await response.arrayBuffer(); + + // Convert data to base64 + const base64Image = Buffer.from(buffer).toString("base64"); + + console.log(base64Image); + })(); + ``` +
+
+ + +
+ Show code + ```python + import requests + import base64 + + # Image URL + image_url = "https://example/img.jpg" + + response = requests.get(image_url) + + if response.status_code == 200: + # Convert image binary data to base64 + base64_image = base64.b64encode(response.content).decode('utf-8') + + print(base64_image) + else: + print("Failed to load image") + ``` +
+
+ + +
+ Show code + ```csharp + using System; + using System.Net.Http; + using System.Threading.Tasks; + + class Program + { + static async Task Main(string[] args) + { + // Image URL + string imageUrl = "https://example/img.jpg"; + + using (HttpClient client = new HttpClient()) + { + try + { + byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); + + // Convert image binary data to base64 + string base64Image = Convert.ToBase64String(imageBytes); + + Console.WriteLine(base64Image); + } + catch (Exception ex) + { + Console.WriteLine("Failed to load image: " + ex.Message); + } + } + } + } + ``` +
+
+
+ +## Use the SDK library + + + +
+ Show code (for browser) + ```js + // https://github.com/ZennoLab/capmonstercloud-client-js + + import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + + document.addEventListener('DOMContentLoaded', async () => { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Specify your CapMonster Cloud API key + ); + + // Optionally, you can check the balance + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Replace with actual value + // Optional parameters + CapMonsterModule: CapMonsterModules.YandexWave, + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); + }); + ``` +
+ +
+ Show code (Node.js) +```javascript +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key + +async function solveImageToText() { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: API_KEY }) + ); + + // Optionally, you can check the balance + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Replace with actual value + // Optional parameters + CapMonsterModule: CapMonsterModules.YandexWave, + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); +} + +solveImageToText().catch(console.error); +``` +
+ +
+ + +
+ Show code + ```python + # https://github.com/ZennoLab/capmonstercloud-client-python + + import asyncio + import base64 + from capmonstercloudclient import CapMonsterClient, ClientOptions + from capmonstercloudclient.requests import ImageToTextRequest + + # Specify your CapMonster Cloud API key + client_options = ClientOptions(api_key="YOUR_API_KEY") + cap_monster_client = CapMonsterClient(options=client_options) + + # Image in base64 format + image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Replace with actual value + image_bytes = base64.b64decode(image_base64) + + image_to_text_request = ImageToTextRequest( + image_bytes=image_bytes, + module_name=None, # You can select a module, e.g., YandexWave + # Optional parameters + threshold=50, + case=True, + numeric=0, + math=False + ) + + async def solve_captcha(): + # Optionally, you can check the balance + balance = await cap_monster_client.get_balance() + print("Balance:", balance) + + solution = await cap_monster_client.solve_captcha(image_to_text_request) + return solution + + responses = asyncio.run(solve_captcha()) + print("Solution:", responses) + ``` +
+
+ + +
+ Show code + ```csharp + // https://github.com/ZennoLab/capmonstercloud-client-dotnet + + using System; + using System.Threading.Tasks; + using Zennolab.CapMonsterCloud.Requests; + using Zennolab.CapMonsterCloud; + + class Program + { + static async Task Main(string[] args) + { + var clientOptions = new ClientOptions + { + ClientKey = "YOUR_API_KEY" // Specify your CapMonster Cloud API key + }; + + var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); + + // Optionally, you can check the balance + var balance = await cmCloudClient.GetBalanceAsync(); + Console.WriteLine("Balance: " + balance); + + var imageToTextRequest = new ImageToTextRequest + { + Body = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z", // Replace with actual value + // Optional parameters + CapMonsterModule = "None", + RecognizingThreshold = 70, + CaseSensitive = true, + Numeric = false, + Math = false + }; + + var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); + + Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); + } + } + ``` +
+
+
diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx new file mode 100644 index 00000000..8d0b05ca --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx @@ -0,0 +1,143 @@ +--- +sidebar_position: 1 +sidebar_label: Passing module name +title: "Passing the module name for captcha recognition" +description: "Passing the module name to recognize a specific captcha can be useful in cases of working with a specific service (e.g. Google, SolveMedia, Whatsapp, etc.). This will increase the speed and quality of recognition and reduce the probability of errors." +--- + +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; + + + +# Passing module name + +When working with automatic CAPTCHA recognition, recognition accuracy and processing speed are important. Different services use their own CAPTCHA types, and a universal solution may not handle all of them equally effectively. For example, CAPTCHAs from **Google**, **SolveMedia**, **WhatsApp**, or **Yandex** may have specific characteristics that can cause the standard recognition module to work more slowly or produce errors. + +To improve efficiency and reduce the likelihood of incorrect recognition, CapMonster Cloud allows you to specify the module that will process your CAPTCHA. The system will use a specialized recognition algorithm designed for the specific service instead of the universal CAPTCHA processing method. + +## How to pass the module name in CapMonster Cloud using only the ApiKey field + +If the integration provides only a field for the API key, append the required module name to the key using the following format: + +```text +{apikey}__module-name +``` + +For example: + +```text +00f87cb0f01330d33709ce3339ad0c8c__solvemedia +``` + +The API key and module name must be separated by **two underscores (****`__`****)**. + +The list of available module names: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
amazon![](../images/image-to-text/module-name/amazon.png)
apple![](../images/image-to-text/module-name/apple.png)
botdetect![](../images/image-to-text/module-name/botdetect.png)
facebook![](../images/image-to-text/module-name/facebook.png)
gmx![](../images/image-to-text/module-name/gmx.png)
google![](../images/image-to-text/module-name/google.png)
hotmail![](../images/image-to-text/module-name/hotmail.png)
mailru![](../images/image-to-text/module-name/mailru.png)
okeng![](../images/image-to-text/module-name/okeng.png)
okrus![](../images/image-to-text/module-name/okrus.png)
partiallyblur![](../images/image-to-text/module-name/partiallyblur.png)
ramblerrus![](../images/image-to-text/module-name/rambler.png)
ramblerrusnew![](../images/image-to-text/module-name/ramblerrusnew.png)
solvemedia![](../images/image-to-text/module-name/solvemedia.png)
steam![](../images/image-to-text/module-name/steam.png)
vk![](../images/image-to-text/module-name/vk.png)
whatsapp![](../images/image-to-text/module-name/whatsapp.png)
wikimedia_paddle_ensemble![](../images/image-to-text/module-name/wikimedia.png)
yandex![](../images/image-to-text/module-name/yandex.png)
yandexnew (two-word captcha)![](../images/image-to-text/module-name/yandexwave.png)
yandexwave
captcha_math![](../images/image-to-text/module-name/captcha_math.png)
sat![](../images/image-to-text/module-name/sat.png)
bls_text![](../images/image-to-text/module-name/bls_text.png)
universal (all other text captchas)![](../images/image-to-text/module-name/universal.png)
+ +:::info Info + +If you are unable to send a CAPTCHA to the required module, please contact our [support team](https://helpdesk.zennolab.com/en-us/conversation/new). We will help you check the configuration and resolve the issue. + +::: diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/threshold.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx similarity index 83% rename from i18n/en/docusaurus-plugin-content-docs/current/api/threshold.mdx rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx index 8a1527ae..22398004 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/api/threshold.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 6 -sidebar_label: Setting the confidence threshold for text CAPTCHA recognition -title: "Setting the threshold for charging money during captcha recognition" +sidebar_position: 3 +sidebar_label: Confidence threshold for text CAPTCHAs +title: "Setting the recognition threshold" description: "Learn how to set the Capmonster Cloud captcha recognition and traversal service to a threshold of system confidence in the answer, below which money is not deducted." --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # Setting the confidence threshold for text CAPTCHA recognition @@ -58,6 +58,7 @@ The key, the confidence threshold and the name of the module are indicated with Example: “API_KEY\_\_solvemedia\_\_recognizingthreshold\_70” :::note -If you are unable to set the response confidence threshold, please contact our **[support team](https://helpdesk.zennolab.com/conversation/new)**, and we will assist you with the setup! +If you are unable to configure the confidence threshold, please contact our **[support team](https://helpdesk.zennolab.com/en-us/conversation/new)**. We will help you with the configuration. ::: + diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/user-module.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx similarity index 87% rename from i18n/en/docusaurus-plugin-content-docs/current/api/user-module.mdx rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx index 44e12e19..324f93cb 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/api/user-module.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 10 +sidebar_position: 2 sidebar_label: Creating a user module title: "Creating a custom module to configure captcha recognition" description: "Creating a custom module allows you to create custom modules that will be trained for one specific type of captcha. This will allow faster and more efficient recognition of non-standard captchas and reduce the probability of errors." --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # Creating a user module @@ -18,7 +18,7 @@ The custom module creation feature allows you to train the system to recognize a Go to the [Training module page](https://capmonster.cloud/UserModules), or select the corresponding section from the left-hand menu in your [dashboard](https://dash.capmonster.cloud/): -![](./images/user-module/user-module.png) +![](../images/image-to-text/user-module/user-module.png) --- @@ -42,7 +42,7 @@ Each step is described in more detail below. On the [Training module page](https://capmonster.cloud/UserModules), click the **Add Module** button and, in the window that opens, specify the character types that appear in your CAPTCHA. After that, a hint will appear showing how many CAPTCHAs you need to collect and upload: -![](./images/user-module/user-module-archive.png) +![](../images/image-to-text/user-module/user-module-archive.png) #### Supported image formats @@ -72,7 +72,7 @@ It is not recommended to collect captchas in tens or hundreds of threads simulta First, you need to set the module name. It must contain only Latin characters. -![](./images/user-module/user-module-name.png) +![](../images/image-to-text/user-module/user-module-name.png) :::warning The module name must not contain the word **captcha**. @@ -85,7 +85,7 @@ The selected options determine the total number of captchas required to train th You can mark one or several items from the suggested list. -![](./images/user-module/user-module-params.png) +![](../images/image-to-text/user-module/user-module-params.png) :::info You should mark at least one of the following options: "Contains Cyrillic characters", "Contains Latin characters", "Contains numbers" @@ -95,7 +95,7 @@ You should mark at least one of the following options: "Contains Cyrillic charac Specify where captcha answers are located. -![](./images/user-module/user-module-markup.png) +![](../images/image-to-text/user-module/user-module-markup.png) It's quite simple: @@ -118,7 +118,7 @@ captcha3.png:99loe When you specified the module name, selected symbol types, and location of answers, you need to upload the zip archive with the captchas and send us. -![](./images/user-module/user-module-upload.png) +![](../images/image-to-text/user-module/user-module-upload.png) #### 2.5. Payment @@ -128,7 +128,7 @@ When you specified the module name, selected symbol types, and location of answe 1. Click **Top Up Balance** 2. Click the **Top Up Balance** button and use the payment method convenient for you. -![](./images/user-module/user-module-top-up-balance.png) +![](../images/image-to-text/user-module/user-module-top-up-balance.png) :::note @@ -144,7 +144,7 @@ You can use them to recognize any captchas at any time. #### Validated -![](./images/user-module/validated.png) +![](../images/image-to-text/user-module/validated.png) You get this status after you send the form (given that you have done everything correctly). @@ -154,25 +154,25 @@ For modules with this status, deletion is available — if you uploaded the wron #### Paid -![](./images/user-module/paid.png) +![](../images/image-to-text/user-module/paid.png) Your payment for the module was accepted. #### ValidatedInDepth -![](./images/user-module/ValidatedInDepth.png) +![](../images/image-to-text/user-module/ValidatedInDepth.png) Preparatory works. #### Annotated -![](./images/user-module/Annotated.png) +![](../images/image-to-text/user-module/Annotated.png) Captcha marking completed. Training is in progress. #### Trained -![](./images/user-module/trained.png) +![](../images/image-to-text/user-module/trained.png) The module is ready! You can now submit captchas to it. @@ -180,8 +180,8 @@ The module is ready! You can now submit captchas to it. There are several ways to specify a module that will solve the captchas: -- [Add the argument CapMonsterModule with the module name when sending a /createTask request ](../captchas/image-to-text.mdx) (if you interact directly with our API) -- [Specify a module name in ApiKey](module-name.mdx) (very handy when you use third-party programs and cannot modify the requests) +- [Add the argument CapMonsterModule with the module name when sending a /createTask request ](/docs/captchas/ImageToText/image-to-text/) (if you interact directly with our API) +- [Specify a module name in ApiKey](/docs/captchas/ImageToText/module-name/) (very handy when you use third-party programs and cannot modify the requests) --- @@ -208,7 +208,7 @@ The estimated time for one module to be ready is about one business day.
I see the `Error` sign in the "Comment" column next to my module. What should I do? -![](./images/user-module/error.png) +![](../images/image-to-text/user-module/error.png) Please wait a little. If the situation does not change within 24 hours, please contact [Support](https://helpdesk.zennolab.com/en-us/conversation/new). diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index 57d094f1..82a3eddb 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 27 +sidebar_position: 26 sidebar_label: Alibaba Captcha title: "Automatic recognition and bypass of Alibaba CAPTCHA | API" description: "Learn how to recognize Alibaba CAPTCHA using the API of the CapMonster Cloud automatic captcha recognition and solving service!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx index 8270c184..a3662a92 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 21 sidebar_label: Altcha --- diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx index 6953cc26..5ae1f039 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 15 +sidebar_position: 14 sidebar_label: Amazon (AWS WAF) title: "Automatic recognition and bypass of Amazon AWS WAF captcha via Capmonster Cloud API" description: Learn how to bypass Amazon (AWS WAF) captcha using the Capmonster Cloud captcha recognition and solving API! diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/binance.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/binance.mdx index 829abe75..e8cbc4e4 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/binance.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/binance.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 16 +sidebar_position: 15 sidebar_label: Binance title: "Automatically recognise and bypass Binance captcha | API" description: "Learn how to bypass Binance captcha using Capmonster Cloud API! Detailed description of features and examples." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx index 9e475b73..b5bd93fc 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 24 +sidebar_position: 23 sidebar_label: Castle title: "Automatic detection and bypass of Castle | API" description: "Learn how to detect Castle using the API of the automatic captcha recognition and solving service CapMonster Cloud!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx index 149f20e9..0a157329 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 28 +sidebar_position: 27 sidebar_label: Friendly Captcha title: "Automatic Friendly Captcha recognition and bypass | API" description: "Learn how to detect Friendly Captcha using the API of the CapMonster Cloud captcha recognition and solving service!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx index f873aeb4..557ebf2a 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 23 +sidebar_position: 22 sidebar_label: FunCaptcha title: "Automatic FunCaptcha recognition and bypass | API" description: "Learn how to bypass FunCaptcha (Arkose Labs captcha) using the CapMonster Cloud automatic captcha solving API!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx index 5674551a..533f81bc 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 sidebar_label: GeeTest title: 'Recognise and resolve GeeTest - GeeTest Task | API' description: 'Learn how to set up automatic recognition and solve (bypass) GeeTest captchas via API using GeeTest Task type, see Capmonster Cloud Docs.' diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx index 1f0bdbb8..84acab58 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 26 +sidebar_position: 25 sidebar_label: Hunt Captcha title: "Automatic Hunt CAPTCHA recognition and bypass | API" description: "Learn how to solve Hunt CAPTCHA using the CapMonster Cloud API." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/google.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/google.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/error.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/error.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png b/i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png similarity index 100% rename from i18n/en/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png rename to i18n/en/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx index dff6a21e..62bb650f 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 16 sidebar_label: Imperva (Incapsula) title: "Automatically recognise and bypass Imperva (Incapsula) | API" description: "Learn how to bypass Imperva (Incapsula) captcha using Capmonster Cloud API! Detailed description of features and examples." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx index 968b7bc7..9406928d 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 21 +sidebar_position: 20 sidebar_label: MTCaptcha description: "Learn how to bypass MTCaptcha using the API of the automatic recognition and captcha solving service Capmonster Cloud!" --- diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx index fbc8a814..201afce3 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 17 sidebar_label: Prosopo title: "Automatically recognise and bypass Prosopo captcha | API" description: "Learn how to bypass Prosopo captcha using Capmonster Cloud API! Detailed description of features and examples." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx index 74610227..1bf0eca5 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 19 +sidebar_position: 18 sidebar_label: Temu title: "Automatic recognition and bypass of Temu CAPTCHA | API" description: "Find out how to bypass Temu CAPTCHA using the Capmonster Cloud API for automatic CAPTCHA recognition and solving — exclusively on your own platforms!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index 6e9398bf..2e570f48 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 14 +sidebar_position: 13 sidebar_label: TenDI title: "Automatically recognise and bypass TenDI - Tencent captcha | API" description: "Learn how to bypass TenDl (Tencent captcha) using API of Capmonster Cloud's automatic captcha recognition and solution service." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx index b13f2a23..187bad9f 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 25 +sidebar_position: 24 sidebar_label: TSPD title: "Automatic TSPD detection and bypass | API" description: "Learn how to detect TSPD using the API of the CapMonster Cloud automatic captcha recognition and solving service!" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx index 63b66ad4..21dbd04a 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 sidebar_label: Cloudflare Challenge title: "Recognise and resolve Cloudflare Challenge | API" description: "Turnstile Task method to automatically recognise and solve Cloudflare Challenge captchas via Capmonster Cloud API. Full tutorial and examples in the Capmonster Cloud Docs documentation." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx index d6df459e..bbdb9fcb 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: Cloudflare Turnstile title: "Recognise and resolve Cloudflare Turnstile | API" description: "Turnstile Task method to automatically recognise and solve Cloudflare Turnstile captchas via Capmonster Cloud API. Full tutorial and examples in the Capmonster Cloud Docs documentation." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx index 5309e426..aff26915 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 sidebar_label: Cloudflare Waiting Room title: "Recognise and resolve Cloudflare Waiting Room | API" description: "Turnstile Task method to automatically recognise and solve Cloudflare Waiting Room captchas via Capmonster Cloud API. Full tutorial and examples in the Capmonster Cloud Docs documentation." diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx index 939aaf79..4585ced9 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 19 sidebar_label: Yidun title: "Automatic recognition and bypass of Yidun (NECaptcha) Captcha | API" description: "Learn how to bypass Yidun captcha using the Capmonster Cloud API for automated captcha recognition and solving!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/module-name.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/api/module-name.mdx deleted file mode 100644 index 037b155e..00000000 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/module-name.mdx +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 5 -sidebar_label: Nome do módulo -title: Nome do módulo ---- - -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; - - - -# Nome do módulo - -No trabalho com o reconhecimento automático de captchas, a precisão e a velocidade de processamento são fundamentais. Diferentes serviços utilizam tipos únicos de captchas, e uma solução universal nem sempre consegue lidar com todos de forma igualmente eficaz. Por exemplo, captchas do **Google**, **SolveMedia**, **WhatsApp** ou **Yandex** podem ter características específicas que fazem com que o módulo padrão de reconhecimento funcione mais lentamente ou com erros. - -Para aumentar a eficiência e reduzir a probabilidade de reconhecimento incorreto, o CapMonster Cloud permite selecionar um módulo específico para processar seu captcha. O sistema aplicará um algoritmo especializado desenvolvido para o serviço específico, em vez de usar um método universal de processamento de captchas. - -## Como passar o nome do módulo para CapMonster Cloud, usando apenas o campo ApiKey - -Para enviar ao CapMonsterCloud informações sobre o módulo que reconhecerá seu captcha, usando apenas o campo para especificar ApiKey, você pode adicionar o nome do módulo à chave no seguinte formato: `{apikey}__moduleName` - -Por exemplo, “00f87cb0f01330d33709ce3339ad0c8c__solvemedia” (**!importante**, separe a chave da API e o nome do módulo com um **duplo sublinhado**) - -A lista de nomes de módulos disponíveis: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
amazon![](images/module-name/amazon.png)
apple![](images/module-name/apple.png)
botdetect![](images/module-name/botdetect.png)
facebook![](images/module-name/facebook.png)
gmx![](images/module-name/gmx.png)
google![](images/module-name/google.png)
hotmail![](images/module-name/hotmail.png)
mailru![](images/module-name/mailru.png)
okeng![](images/module-name/okeng.png)
okrus![](images/module-name/okrus.png)
partiallyblur![](images/module-name/partiallyblur.png)
ramblerrus![](images/module-name/rambler.png)
ramblerrusnew![](images/module-name/ramblerrusnew.png)
solvemedia![](images/module-name/solvemedia.png)
steam![](images/module-name/steam.png)
vk![](images/module-name/vk.png)
whatsapp![](images/module-name/whatsapp.png)
wikimedia_paddle_ensemble![](images/module-name/wikimedia.png)
yandex![](images/module-name/yandex.png)
yandexnew (captcha de duas palavras)![](images/module-name/yandexwave.png)
yandexwave
captcha_math![](images/module-name/captcha_math.png)
sat![](images/module-name/sat.png)
bls_text![](images/module-name/bls_text.png)
universal (todas as outras captchas de texto)![](images/module-name/universal.png)
- -:::info Informação -Se você não conseguiu enviar um captcha para um módulo específico, por favor, escreva para nossa [equipe de suporte](https://helpdesk.zennolab.com/conversation/new), nós iremos ajudá-lo! -::: \ No newline at end of file diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx index f4e25197..76403417 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 13 +sidebar_position: 12 sidebar_label: Basilisk title: Reconhecimento automático e bypass do Basilisk | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json new file mode 100644 index 00000000..44c3de66 --- /dev/null +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "ImageToText", + "position": 6, + "link": { + "type": "generated-index", + "title": "ImageToText", + "description": "Reconhecimento de CAPTCHAs de texto, configuração do limite de confiança e trabalho com módulos personalizados." + } +} diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx similarity index 93% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx index 8b80808c..7c93914a 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx @@ -1,476 +1,475 @@ ---- -sidebar_position: 12 -sidebar_label: ImageToText -title: Reconhecimento automático e bypass do ImageToText | API ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import ParamItem from '@theme/ParamItem'; -import MethodItem from '@theme/MethodItem'; -import MethodDescription from '@theme/MethodDescription' -import PriceBlock from '../../../../../src/theme/PriceBlock'; -import PriceBlockWrap from '@theme/PriceBlockWrap'; -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; - - - -# ImageToText - - - - - -![](./images/image-to-text/text-captcha-2.png) - -Este é um captcha regular, que é uma imagem com texto a ser inserido na linha correspondente. - -:::warning **Atenção!** -O uso de servidores proxy para esta tarefa não é necessário. -::: - - -## Parâmetros da solicitação - -
- -> IMPORTANTE: obtenha a imagem em base64 imediatamente antes de criar a tarefa para evitar erros durante a resolução (veja abaixo um exemplo de obtenção da imagem CAPTCHA em formato base64). - -
- -
- -**ImageToTextTask** - ---- - - -Corpo do arquivo codificado em base64*. Certifique-se de enviá-lo sem quebras de linha. - ---- - - -Nome do módulo de reconhecimento, por exemplo, “yandex“. Forma alternativa de passar o nome do módulo e a lista de todos os módulos disponíveis que você pode encontrar [aqui](../api/module-name.mdx).
-Exemplo: `yandex`, `special` e outros. - ---- - - -Limite de reconhecimento de captcha com valor possível de **0** a **100**. Por exemplo, se o recognizingThreshold foi definido como **90** e a tarefa foi resolvida com uma confiança de **80**, você não será cobrado. Nesse caso, o usuário receberá uma resposta ERROR_CAPTCHA_UNSOLVABLE. Um método alternativo para definir o limite de dedução de dinheiro é descrito no [artigo](../api/threshold.mdx). - ---- - - -Considerar ou não a diferenciação entre maiúsculas e minúsculas durante a resolução. Valores possíveis: `true`, `false` - ---- - - -`1` - se o captcha for composto apenas por números.
-Valores possíveis: `0`, `1` - ---- - - -`false` — não definido por padrão;
-`true` — o captcha exige a realização de uma operação matemática (por exemplo, o captcha `2 + 6` retornará o valor `8`).
- -**Importante:** para o módulo `captcha_math`, **não utilize** o parâmetro `math: true`. - -
- -
- - -*Base64 é um método de codificação de dados que permite representar dados binários como texto. Aqui está um exemplo de obtenção de uma imagem captcha em formato base64 usando o console nas *Ferramentas de Desenvolvedor*: - -```javascript -const captchaUrl = 'https://example.com/captcha.jpg'; - -function loadAndEncodeCaptchaToBase64(url) { - fetch(url) - .then(response => response.blob()) - .then(blob => { - const reader = new FileReader(); - reader.readAsDataURL(blob); - - reader.onloadend = function() { - const base64Data = reader.result; - console.log('Base64 Encoded Captcha:', base64Data); - - }; - }) - .catch(error => { - console.error('Error occurred while loading or encoding the captcha:', error); - }); -} - -loadAndEncodeCaptchaToBase64(captchaUrl); - -``` - - -## Criar tarefa - - -
- - ```http - https://api.capmonster.cloud/createTask - ``` - - -**Exemplo de requisição** -```json -{ - "clientKey":"API_KEY", - "task": { - "type":"ImageToTextTask", - "body":"BASE64_BODY_HERE!" - } -} -``` -**Exemplo de resposta** -```json -{ - "errorId":0, - "taskId":407533072 -} -``` - - -
- -## Obter resultado da tarefa -Use o método [getTaskResult](../api/methods/get-task-result.mdx) para obter a solução do captcha. Dependendo da carga do sistema, você receberá uma resposta em um intervalo de 300ms a 6s. - -
- -```http -https://api.capmonster.cloud/getTaskResult -``` - - -**Exemplo de requisição** -```json -{ - "clientKey":"API_KEY", - "taskId": 407533072 -} -``` -**Exemplo de resposta** -```json -{ - "errorId":0, - "status":"ready", - "solution": { - "text":"answer" - } -} -``` - -
- -
- -|**Propriedade**|**Tipo**|**Descrição**| -| :-: | :-: | :-: | -|text|String|Resposta do captcha| - -## Como Encontrar Todos os Parâmetros Necessários para a Criação da Tarefa - -### Manualmente - -1. Abra seu site onde o captcha aparece no navegador. -2. Clique com o botão direito no elemento do captcha e selecione **Inspecionar**. - -#### base64 - -Localize o elemento necessário na árvore DOM e passe o mouse sobre ele – a imagem codificada em *base64* será exibida diretamente nos atributos do elemento: - -![base64elements](images/image-to-text/base64-elements.png) - -Se a imagem fizer referência a uma URL externa em vez de conter dados codificados em base64, você pode encontrá-la nas requisições de rede (**Network**). Clique com o botão direito na requisição relevante e selecione **Copiar imagem como URI de dados**. Isso copiará os dados da imagem codificados em *base64* para sua área de transferência. - -![base64network](images/image-to-text/base64-network.png) - -### Automaticamente - -Para automatizar a extração dos parâmetros, eles podem ser obtidos via **navegador** (normal ou headless, por exemplo, usando **Playwright**) ou diretamente a partir de **requisições HTTP**. Como os valores dos parâmetros dinâmicos têm curta duração, recomenda-se utilizá-los imediatamente após a extração. - -:::warning **Importante!** -Os trechos de código fornecidos são exemplos básicos para aprendizado sobre como extrair os parâmetros necessários. A implementação exata dependerá do seu site com captcha, sua estrutura e os elementos HTML e seletores utilizados. -::: - - - -
- Mostrar código (para navegador) - ```js - (async () => { - const img = document.querySelector('img'); // Seletor de exemplo - - const imageUrl = img.src; - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Falha ao carregar a imagem"); - } - - const buffer = await response.arrayBuffer(); - - // Converter dados binários para base64 - const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); - - console.log(base64Image); - })(); - ``` -
- -
- Mostrar código (Node.js) - ```js - (async () => { - const imageUrl = "https://example/img/.jpg"; // URL da imagem - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("Falha ao carregar a imagem"); - } - - const buffer = await response.arrayBuffer(); - - // Converter dados para base64 - const base64Image = Buffer.from(buffer).toString("base64"); - - console.log(base64Image); - })(); - ``` -
-
- - -
- Mostrar código - ```python - import requests - import base64 - - # URL da imagem - image_url = "https://example/img.jpg" - - response = requests.get(image_url) - - if response.status_code == 200: - # Converter dados binários da imagem para base64 - base64_image = base64.b64encode(response.content).decode('utf-8') - - print(base64_image) - else: - print("Falha ao carregar a imagem") - ``` -
-
- - -
- Mostrar código - ```csharp - using System; - using System.Net.Http; - using System.Threading.Tasks; - - class Program - { - static async Task Main(string[] args) - { - // URL da imagem - string imageUrl = "https://example/img.jpg"; - - using (HttpClient client = new HttpClient()) - { - try - { - byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); - - // Converter dados binários da imagem para base64 - string base64Image = Convert.ToBase64String(imageBytes); - - Console.WriteLine(base64Image); - } - catch (Exception ex) - { - Console.WriteLine("Falha ao carregar a imagem: " + ex.Message); - } - } - } - } - ``` -
-
-
- -## Usar biblioteca SDK - - - -
- Mostrar Código (para navegador) -```js -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -document.addEventListener('DOMContentLoaded', async () => { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Insira sua chave de API do CapMonster Cloud - ); - - // Se necessário, você pode verificar o saldo - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Substitua pelo valor real - // Parâmetros opcionais - CapMonsterModule: CapMonsterModules.YandexWave, // É possível escolher um módulo, por exemplo, YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); - }); - ``` -
- -
- Mostrar Código (Node.js) -```javascript -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -const API_KEY = "YOUR_API_KEY"; // Insira sua chave de API do CapMonster Cloud - -async function solveImageToText() { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: API_KEY }) - ); - - // Se necessário, você pode verificar o saldo - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // Substitua pelo valor real - // Parâmetros opcionais - CapMonsterModule: CapMonsterModules.YandexWave, // É possível escolher um módulo, por exemplo, YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); -} - -solveImageToText().catch(console.error); -``` -
-
- - -
- Mostrar Código -```python -# https://github.com/ZennoLab/capmonstercloud-client-python - -import asyncio -import base64 -from capmonstercloudclient import CapMonsterClient, ClientOptions -from capmonstercloudclient.requests import ImageToTextRequest - -# Insira sua chave de API do CapMonster Cloud -client_options = ClientOptions(api_key="YOUR_API_KEY") -cap_monster_client = CapMonsterClient(options=client_options) - -# Imagem em formato base64 -image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Substitua pelo valor real -image_bytes = base64.b64decode(image_base64) - -image_to_text_request = ImageToTextRequest( - image_bytes=image_bytes, - module_name=None, # Você pode escolher um módulo, por exemplo YandexWave - # Parâmetros opcionais - threshold=50, - case=True, - numeric=0, - math=False -) - -async def solve_captcha(): - # Se necessário, você pode verificar o saldo - balance = await cap_monster_client.get_balance() - print("Balance:", balance) - - solution = await cap_monster_client.solve_captcha(image_to_text_request) - return solution - -responses = asyncio.run(solve_captcha()) -print("Solution:", responses) -``` -
-
- - -
- Mostrar Código - ```csharp - // https://github.com/ZennoLab/capmonstercloud-client-dotnet - - using System; - using System.Threading.Tasks; - using Zennolab.CapMonsterCloud.Requests; - using Zennolab.CapMonsterCloud; - - class Program - { - static async Task Main(string[] args) - { - var clientOptions = new ClientOptions - { - ClientKey = "YOUR_API_KEY" // Insira sua chave de API do CapMonster Cloud - }; - - var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); - - // Se necessário, você pode verificar o saldo - var balance = await cmCloudClient.GetBalanceAsync(); - Console.WriteLine("Balance: " + balance); - - var imageToTextRequest = new ImageToTextRequest - { - Body = "/9j/4AAQSkZJRgABAQAAAQABA...wwzqR4U/yZ//Z", // Substitua pelo valor real - // Parâmetros opcionais - CapMonsterModule = "None", // É possível escolher um módulo, por exemplo, YandexWave - RecognizingThreshold = 70, - CaseSensitive = true, - Numeric = false, - Math = false - }; - - var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); - - Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); - } - } - ``` -
-
-
+--- +sidebar_position: 0 +sidebar_label: ImageToText +title: Reconhecimento automático e bypass do ImageToText | API +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import ParamItem from '@theme/ParamItem'; +import MethodItem from '@theme/MethodItem'; +import MethodDescription from '@theme/MethodDescription' +import PriceBlock from '../../../../../../src/theme/PriceBlock'; +import PriceBlockWrap from '@theme/PriceBlockWrap'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; + + + +# ImageToText + + + + + +![](../images/image-to-text/text-captcha-2.png) + +Este é um captcha regular, que é uma imagem com texto a ser inserido na linha correspondente. + +:::warning **Atenção!** +O uso de servidores proxy para esta tarefa não é necessário. +::: + + +## Parâmetros da solicitação + +
+ +> IMPORTANTE: obtenha a imagem em base64 imediatamente antes de criar a tarefa para evitar erros durante a resolução (veja abaixo um exemplo de obtenção da imagem CAPTCHA em formato base64). + +
+ +
+ +**ImageToTextTask** + +--- + + +Corpo do arquivo codificado em base64*. Certifique-se de enviá-lo sem quebras de linha. + +--- + + +Nome do módulo de reconhecimento, por exemplo, “yandex“. Forma alternativa de passar o nome do módulo e a lista de todos os módulos disponíveis que você pode encontrar [aqui](./module-name.mdx).
+Exemplo: `yandex`, `special` e outros. + +--- + + +Limite de reconhecimento de captcha com valor possível de **0** a **100**. Por exemplo, se o recognizingThreshold foi definido como **90** e a tarefa foi resolvida com uma confiança de **80**, você não será cobrado. Nesse caso, o usuário receberá uma resposta ERROR_CAPTCHA_UNSOLVABLE. Um método alternativo para definir o limite de dedução de dinheiro é descrito no [artigo](./threshold.mdx). + +--- + + +Considerar ou não a diferenciação entre maiúsculas e minúsculas durante a resolução. Valores possíveis: `true`, `false` + +--- + + +`1` - se o captcha for composto apenas por números.
+Valores possíveis: `0`, `1` + +--- + + +`false` — não definido por padrão;
+`true` — o captcha exige a realização de uma operação matemática (por exemplo, o captcha `2 + 6` retornará o valor `8`).
+ +**Importante:** para o módulo `captcha_math`, **não utilize** o parâmetro `math: true`. + +
+ +
+ + +*Base64 é um método de codificação de dados que permite representar dados binários como texto. Aqui está um exemplo de obtenção de uma imagem captcha em formato base64 usando o console nas *Ferramentas de Desenvolvedor*: + +```javascript +const captchaUrl = 'https://example.com/captcha.jpg'; + +function loadAndEncodeCaptchaToBase64(url) { + fetch(url) + .then(response => response.blob()) + .then(blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + + reader.onloadend = function() { + const base64Data = reader.result; + console.log('Base64 Encoded Captcha:', base64Data); + + }; + }) + .catch(error => { + console.error('Error occurred while loading or encoding the captcha:', error); + }); +} + +loadAndEncodeCaptchaToBase64(captchaUrl); + +``` + + +## Criar tarefa + + +
+ + ```http + https://api.capmonster.cloud/createTask + ``` + + +**Exemplo de requisição** +```json +{ + "clientKey":"API_KEY", + "task": { + "type":"ImageToTextTask", + "body":"BASE64_BODY_HERE!" + } +} +``` +**Exemplo de resposta** +```json +{ + "errorId":0, + "taskId":407533072 +} +``` + + +
+ +## Obter resultado da tarefa +Use o método [getTaskResult](/docs/api/methods/get-task-result/) para obter a solução do captcha. Dependendo da carga do sistema, você receberá uma resposta em um intervalo de 300ms a 6s. + +
+ +```http +https://api.capmonster.cloud/getTaskResult +``` + + +**Exemplo de requisição** +```json +{ + "clientKey":"API_KEY", + "taskId": 407533072 +} +``` +**Exemplo de resposta** +```json +{ + "errorId":0, + "status":"ready", + "solution": { + "text":"answer" + } +} +``` + +
+ +
+ +|**Propriedade**|**Tipo**|**Descrição**| +| :-: | :-: | :-: | +|text|String|Resposta do captcha| + +## Como Encontrar Todos os Parâmetros Necessários para a Criação da Tarefa + +### Manualmente + +1. Abra seu site onde o captcha aparece no navegador. +2. Clique com o botão direito no elemento do captcha e selecione **Inspecionar**. + +#### base64 + +Localize o elemento necessário na árvore DOM e passe o mouse sobre ele – a imagem codificada em *base64* será exibida diretamente nos atributos do elemento: + +![base64elements](../images/image-to-text/base64-elements.png) + +Se a imagem fizer referência a uma URL externa em vez de conter dados codificados em base64, você pode encontrá-la nas requisições de rede (**Network**). Clique com o botão direito na requisição relevante e selecione **Copiar imagem como URI de dados**. Isso copiará os dados da imagem codificados em *base64* para sua área de transferência. + +![base64network](../images/image-to-text/base64-network.png) +### Automaticamente + +Para automatizar a extração dos parâmetros, eles podem ser obtidos via **navegador** (normal ou headless, por exemplo, usando **Playwright**) ou diretamente a partir de **requisições HTTP**. Como os valores dos parâmetros dinâmicos têm curta duração, recomenda-se utilizá-los imediatamente após a extração. + +:::warning **Importante!** +Os trechos de código fornecidos são exemplos básicos para aprendizado sobre como extrair os parâmetros necessários. A implementação exata dependerá do seu site com captcha, sua estrutura e os elementos HTML e seletores utilizados. +::: + + + +
+ Mostrar código (para navegador) + ```js + (async () => { + const img = document.querySelector('img'); // Seletor de exemplo + + const imageUrl = img.src; + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Falha ao carregar a imagem"); + } + + const buffer = await response.arrayBuffer(); + + // Converter dados binários para base64 + const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); + + console.log(base64Image); + })(); + ``` +
+ +
+ Mostrar código (Node.js) + ```js + (async () => { + const imageUrl = "https://example/img/.jpg"; // URL da imagem + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("Falha ao carregar a imagem"); + } + + const buffer = await response.arrayBuffer(); + + // Converter dados para base64 + const base64Image = Buffer.from(buffer).toString("base64"); + + console.log(base64Image); + })(); + ``` +
+
+ + +
+ Mostrar código + ```python + import requests + import base64 + + # URL da imagem + image_url = "https://example/img.jpg" + + response = requests.get(image_url) + + if response.status_code == 200: + # Converter dados binários da imagem para base64 + base64_image = base64.b64encode(response.content).decode('utf-8') + + print(base64_image) + else: + print("Falha ao carregar a imagem") + ``` +
+
+ + +
+ Mostrar código + ```csharp + using System; + using System.Net.Http; + using System.Threading.Tasks; + + class Program + { + static async Task Main(string[] args) + { + // URL da imagem + string imageUrl = "https://example/img.jpg"; + + using (HttpClient client = new HttpClient()) + { + try + { + byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); + + // Converter dados binários da imagem para base64 + string base64Image = Convert.ToBase64String(imageBytes); + + Console.WriteLine(base64Image); + } + catch (Exception ex) + { + Console.WriteLine("Falha ao carregar a imagem: " + ex.Message); + } + } + } + } + ``` +
+
+
+ +## Usar biblioteca SDK + + + +
+ Mostrar Código (para navegador) +```js +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +document.addEventListener('DOMContentLoaded', async () => { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // Insira sua chave de API do CapMonster Cloud + ); + + // Se necessário, você pode verificar o saldo + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Substitua pelo valor real + // Parâmetros opcionais + CapMonsterModule: CapMonsterModules.YandexWave, // É possível escolher um módulo, por exemplo, YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); + }); + ``` +
+ +
+ Mostrar Código (Node.js) +```javascript +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +const API_KEY = "YOUR_API_KEY"; // Insira sua chave de API do CapMonster Cloud + +async function solveImageToText() { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: API_KEY }) + ); + + // Se necessário, você pode verificar o saldo + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // Substitua pelo valor real + // Parâmetros opcionais + CapMonsterModule: CapMonsterModules.YandexWave, // É possível escolher um módulo, por exemplo, YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); +} + +solveImageToText().catch(console.error); +``` +
+
+ + +
+ Mostrar Código +```python +# https://github.com/ZennoLab/capmonstercloud-client-python + +import asyncio +import base64 +from capmonstercloudclient import CapMonsterClient, ClientOptions +from capmonstercloudclient.requests import ImageToTextRequest + +# Insira sua chave de API do CapMonster Cloud +client_options = ClientOptions(api_key="YOUR_API_KEY") +cap_monster_client = CapMonsterClient(options=client_options) + +# Imagem em formato base64 +image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # Substitua pelo valor real +image_bytes = base64.b64decode(image_base64) + +image_to_text_request = ImageToTextRequest( + image_bytes=image_bytes, + module_name=None, # Você pode escolher um módulo, por exemplo YandexWave + # Parâmetros opcionais + threshold=50, + case=True, + numeric=0, + math=False +) + +async def solve_captcha(): + # Se necessário, você pode verificar o saldo + balance = await cap_monster_client.get_balance() + print("Balance:", balance) + + solution = await cap_monster_client.solve_captcha(image_to_text_request) + return solution + +responses = asyncio.run(solve_captcha()) +print("Solution:", responses) +``` +
+
+ + +
+ Mostrar Código + ```csharp + // https://github.com/ZennoLab/capmonstercloud-client-dotnet + + using System; + using System.Threading.Tasks; + using Zennolab.CapMonsterCloud.Requests; + using Zennolab.CapMonsterCloud; + + class Program + { + static async Task Main(string[] args) + { + var clientOptions = new ClientOptions + { + ClientKey = "YOUR_API_KEY" // Insira sua chave de API do CapMonster Cloud + }; + + var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); + + // Se necessário, você pode verificar o saldo + var balance = await cmCloudClient.GetBalanceAsync(); + Console.WriteLine("Balance: " + balance); + + var imageToTextRequest = new ImageToTextRequest + { + Body = "/9j/4AAQSkZJRgABAQAAAQABA...wwzqR4U/yZ//Z", // Substitua pelo valor real + // Parâmetros opcionais + CapMonsterModule = "None", // É possível escolher um módulo, por exemplo, YandexWave + RecognizingThreshold = 70, + CaseSensitive = true, + Numeric = false, + Math = false + }; + + var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); + + Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); + } + } + ``` +
+
+
diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx new file mode 100644 index 00000000..d7210265 --- /dev/null +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx @@ -0,0 +1,140 @@ +--- +sidebar_position: 1 +sidebar_label: Nome do módulo +title: Nome do módulo +--- + +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; + + + +# Nome do módulo + +Ao trabalhar com o reconhecimento automático de CAPTCHAs, a precisão e a velocidade de processamento são importantes. Diferentes serviços usam seus próprios tipos de CAPTCHA, e uma solução universal nem sempre consegue processá-los com a mesma eficiência. Por exemplo, CAPTCHAs do **Google**, **SolveMedia**, **WhatsApp** ou **Yandex** podem ter características específicas que fazem com que o módulo de reconhecimento padrão funcione mais lentamente ou apresente erros. + +Para aumentar a eficiência e reduzir a probabilidade de reconhecimento incorreto, o CapMonster Cloud permite especificar o módulo que processará a CAPTCHA. O sistema usará um algoritmo de reconhecimento especializado, desenvolvido para o serviço específico, em vez do método universal de processamento de CAPTCHAs. + +## Como passar o nome do módulo no CapMonster Cloud usando apenas o campo ApiKey + +Se a integração disponibilizar apenas um campo para a chave de API, adicione o nome do módulo necessário após a chave no seguinte formato: + +```text +{apikey}__nome-do-módulo +``` + +Por exemplo: + +```text +00f87cb0f01330d33709ce3339ad0c8c__solvemedia +``` + +A chave de API e o nome do módulo devem ser separados por **dois caracteres de sublinhado (`__`)**. + +A lista de nomes de módulos disponíveis: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
amazon![](../images/image-to-text/module-name/amazon.png)
apple![](../images/image-to-text/module-name/apple.png)
botdetect![](../images/image-to-text/module-name/botdetect.png)
facebook![](../images/image-to-text/module-name/facebook.png)
gmx![](../images/image-to-text/module-name/gmx.png)
google![](../images/image-to-text/module-name/google.png)
hotmail![](../images/image-to-text/module-name/hotmail.png)
mailru![](../images/image-to-text/module-name/mailru.png)
okeng![](../images/image-to-text/module-name/okeng.png)
okrus![](../images/image-to-text/module-name/okrus.png)
partiallyblur![](../images/image-to-text/module-name/partiallyblur.png)
ramblerrus![](../images/image-to-text/module-name/rambler.png)
ramblerrusnew![](../images/image-to-text/module-name/ramblerrusnew.png)
solvemedia![](../images/image-to-text/module-name/solvemedia.png)
steam![](../images/image-to-text/module-name/steam.png)
vk![](../images/image-to-text/module-name/vk.png)
whatsapp![](../images/image-to-text/module-name/whatsapp.png)
wikimedia_paddle_ensemble![](../images/image-to-text/module-name/wikimedia.png)
yandex![](../images/image-to-text/module-name/yandex.png)
yandexnew (captcha de duas palavras)![](../images/image-to-text/module-name/yandexwave.png)
yandexwave
captcha_math![](../images/image-to-text/module-name/captcha_math.png)
sat![](../images/image-to-text/module-name/sat.png)
bls_text![](../images/image-to-text/module-name/bls_text.png)
universal (todas as outras captchas de texto)![](../images/image-to-text/module-name/universal.png)
+ +:::info Informação +Se você não conseguiu enviar um captcha para um módulo específico, por favor, escreva para nossa [equipe de suporte](https://helpdesk.zennolab.com/en-us/conversation/new), nós iremos ajudá-lo! +::: \ No newline at end of file diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/threshold.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx similarity index 85% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/threshold.mdx rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx index 95217519..2caeff8e 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/threshold.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx @@ -1,12 +1,13 @@ --- -sidebar_position: 6 +sidebar_position: 3 sidebar_label: Limite de confiança para CAPTCHA de texto title: Limite de confiança para CAPTCHA de texto +description: "Saiba como configurar o limite de confiança no reconhecimento de CAPTCHA no CapMonster Cloud. Se a confiança do sistema estiver abaixo do valor definido, a solução não será cobrada." --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # Configuração do limite de confiança para reconhecimento de CAPTCHA de texto @@ -59,5 +60,5 @@ A chave, o limite de confiança e o nome do módulo são indicados com o sublinh Exemplo: “API_KEY\_\_solvemedia\_\_recognizingthreshold\_70”. :::note -Se você não conseguir definir o limite de confiança da resposta, entre em contato com nossa **[equipe de suporte](https://helpdesk.zennolab.com/conversation/new)**, nós ajudaremos você a configurá-lo! +Se você não conseguir definir o limite de confiança da resposta, entre em contato com nossa **[equipe de suporte](https://helpdesk.zennolab.com/en-us/conversation/new)**, nós ajudaremos você a configurá-lo. ::: \ No newline at end of file diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/user-module.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx similarity index 85% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/user-module.mdx rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx index 359579d3..5e433ac8 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/user-module.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx @@ -1,11 +1,13 @@ --- +sidebar_position: 2 sidebar_label: Criando um módulo de usuário title: Criando um módulo de usuário +description: "A criação de um módulo personalizado permite treinar um módulo para um tipo específico de CAPTCHA. Isso permite reconhecer CAPTCHAs não padrão de forma mais rápida e eficiente, além de reduzir a probabilidade de erros." --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # Criando um módulo de usuário @@ -16,7 +18,7 @@ A função de criação de módulo personalizado permite treinar o sistema para Acesse a [página de Módulos de treinamento](https://capmonster.cloud/UserModules) ou, no [painel de controle](https://dash.capmonster.cloud/), selecione a seção correspondente no menu localizado à esquerda: -![](./images/user-module/user-module.png) +![](../images/image-to-text/user-module/user-module.png) --- @@ -40,7 +42,7 @@ Abaixo, cada etapa é descrita com mais detalhes. Na página [Módulos de treinamento](https://capmonster.cloud/UserModules), clique no botão **Adicionar módulo** e, na janela que será aberta, especifique os tipos de caracteres presentes no seu CAPTCHA. Depois disso, aparecerá uma dica informando quantos CAPTCHAs você precisa coletar e enviar: -![](./images/user-module/user-module-archive.png) +![](../images/image-to-text/user-module/user-module-archive.png) #### Formatos de imagem suportados @@ -70,7 +72,7 @@ Não execute a coleta de captchas em dezenas ou centenas de threads! Poucos site Primeiro, defina o nome do módulo (apenas caracteres latinos). -![](./images/user-module/user-module-name.png) +![](../images/image-to-text/user-module/user-module-name.png) :::warning O nome do módulo não deve conter a palavra **captcha**. @@ -84,7 +86,7 @@ O que você marcar aqui afeta o número de captchas que você precisará fazer u Você pode escolher uma ou várias opções das sugeridas. -![](./images/user-module/user-module-params.png) +![](../images/image-to-text/user-module/user-module-params.png) :::info Você deve marcar pelo menos uma das seguintes opções: "Contém caracteres cirílicos", "Contém caracteres latinos", "Contém números". @@ -94,7 +96,7 @@ Você deve marcar pelo menos uma das seguintes opções: "Contém caracteres cir Especifique onde as respostas dos captchas estão localizadas. -![](./images/user-module/user-module-markup.png) +![](../images/image-to-text/user-module/user-module-markup.png) É bem simples: @@ -117,7 +119,7 @@ captcha3.png:99loe Depois de especificar o nome do módulo, selecionar os tipos de símbolos e a localização das respostas, você precisa enviar o arquivo zip com os captchas e nos enviar. -![](./images/user-module/user-module-upload.png) +![](../images/image-to-text/user-module/user-module-upload.png) #### 2.5. Pagamento @@ -127,7 +129,7 @@ Depois de especificar o nome do módulo, selecionar os tipos de símbolos e a lo 1. Clique em **Recarga de saldo** 2. Clique no botão **Recarregar saldo** e use o método de pagamento mais conveniente para você. -![](./images/user-module/user-module-top-up-balance.png) +![](../images/image-to-text/user-module/user-module-top-up-balance.png) :::note @@ -142,7 +144,7 @@ Os fundos alocados para o treinamento não são debitados, mas permanecem no sal #### Validated -![](./images/user-module/validated.png) +![](../images/image-to-text/user-module/validated.png) Você recebe esse status após enviar o formulário (desde que você tenha feito tudo corretamente). @@ -152,25 +154,25 @@ Módulos com esse status podem ser excluídos. Se você enviou o módulo, mas pe #### Paid -![](./images/user-module/paid.png) +![](../images/image-to-text/user-module/paid.png) Seu pagamento pelo módulo foi aceito. #### ValidatedInDepth -![](./images/user-module/ValidatedInDepth.png) +![](../images/image-to-text/user-module/ValidatedInDepth.png) Trabalhos preparatórios. #### Annotated -![](./images/user-module/Annotated.png) +![](../images/image-to-text/user-module/Annotated.png) Marcação de captcha concluída. O treinamento está em andamento. #### Trained -![](./images/user-module/trained.png) +![](../images/image-to-text/user-module/trained.png) O módulo está pronto! Agora você pode enviar captchas para ele. @@ -178,8 +180,8 @@ O módulo está pronto! Agora você pode enviar captchas para ele. Existem várias maneiras de especificar um módulo que resolverá os captchas: -- [Adicione o argumento CapMonsterModule com o nome do módulo ao enviar uma solicitação /createTask](../captchas/image-to-text.mdx) (se você interagir diretamente com nossa API) -- [Especifique um nome de módulo na chave API](module-name.mdx) (muito prático quando você usa programas de terceiros e não pode modificar as solicitações) +- [Adicione o argumento CapMonsterModule com o nome do módulo ao enviar uma solicitação /createTask](/docs/captchas/ImageToText/image-to-text/) (se você interagir diretamente com nossa API) +- [Especifique um nome de módulo na chave API](/docs/captchas/ImageToText/module-name/) (muito prático quando você usa programas de terceiros e não pode modificar as solicitações) --- @@ -206,7 +208,7 @@ O treinamento leva um dia por módulo.
Vejo o sinal `Erro` na coluna "Comentário" ao lado do meu módulo. O que devo fazer? -![](./images/user-module/error.png) +![](../images/image-to-text/user-module/error.png) Por favor, aguarde um pouco. Se a situação não mudar dentro de 24 horas, entre em contato com o [suporte](https://helpdesk.zennolab.com/en-us/conversation/new). diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index e36258f9..c3cb7b26 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 27 +sidebar_position: 26 sidebar_label: Alibaba Captcha title: "Reconhecimento automático e bypass do Alibaba CAPTCHA | API" description: "Aprenda como reconhecer o Alibaba CAPTCHA usando a API do serviço de reconhecimento e resolução automática de captchas CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx index fe5d9558..525bfdd8 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 21 sidebar_label: Altcha title: "Reconhecimento e Bypass Automático do Altcha | API" description: "Aprenda a contornar o Altcha usando a API do serviço de reconhecimento e resolução automática de captchas CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx index e97e8624..66a22c39 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 15 +sidebar_position: 14 sidebar_label: Amazon (AWS WAF) title: "Reconhecimento automático e bypass do captcha do Amazon AWS WAF via Capmonster Cloud API" description: Saiba como contornar o captcha da Amazon (AWS WAF) usando a API de reconhecimento e resolução automática de captchas do Capmonster Cloud! diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/binance.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/binance.mdx index 9e02e8e2..d8796d48 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/binance.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/binance.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 16 +sidebar_position: 15 sidebar_label: Binance title: Reconhecimento automático e bypass do Binance | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx index 1990f284..41d9312a 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 24 +sidebar_position: 23 sidebar_label: Castle title: "Detecção e bypass automáticos do Castle | API" description: "Aprenda como detectar o Castle usando a API do serviço automático de reconhecimento e resolução de captchas CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx index 00956c5c..5327d921 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 28 +sidebar_position: 27 sidebar_label: Friendly Captcha title: "Reconhecimento automático e bypass do Friendly Captcha | API" description: "Saiba como contornar o Friendly Captcha usando a API de resolução automática de captchas do CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx index 14e4038e..fa844ee2 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 23 +sidebar_position: 22 sidebar_label: FunCaptcha title: "Reconhecimento Automático e Bypass do FunCaptcha | API" description: "Saiba como contornar o FunCaptcha (captcha da Arkose Labs) usando a API de resolução automática de captchas do CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx index 9e7b772a..398c49a5 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 sidebar_label: GeeTest title: Reconhecimento automático e bypass do GeeTest v3/v4 | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx index e5c4beda..19178e1b 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 26 +sidebar_position: 25 sidebar_label: Hunt Captcha title: "Reconhecimento e resolução automática do Hunt CAPTCHA | API" description: "Saiba como resolver o Hunt CAPTCHA usando a API do CapMonster Cloud." diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/google.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/google.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/error.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/error.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png similarity index 100% rename from i18n/pt-br/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png rename to i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx index 5a28450e..33a647d9 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 16 sidebar_label: Imperva (Incapsula) title: Reconhecimento automático e bypass do Imperva (Incapsula) | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx index 10b5787d..1d43869f 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 21 +sidebar_position: 20 sidebar_label: MTCaptchaTask title: "Reconhecimento automático e bypass do MTCaptcha | API" description: "Descubra como contornar o MTCaptcha usando a API do serviço de reconhecimento e solução de captchas Capmonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx index 7d66d65c..3836102b 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 17 sidebar_label: Prosopo title: Reconhecimento automático e bypass do Prosopo | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx index c072b51d..b5333c58 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 19 +sidebar_position: 18 sidebar_label: Temu draft: true --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index 46d04862..b0d3e3ff 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 14 +sidebar_position: 13 sidebar_label: TenDI title: Reconhecimento automático e bypass do TenDI | API --- diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx index c81a206a..38129235 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 25 +sidebar_position: 24 sidebar_label: TSPD title: "Reconhecimento e bypass automático do TSPD | API" description: "Saiba como reconhecer o TSPD usando a API do serviço de reconhecimento e resolução automática de captchas CapMonster Cloud!" diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx index 737039a1..502a3d79 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 sidebar_label: Cloudflare Challenge title: "Reconhecer e resolver o Cloudflare Challenge | API" description: "Método Turnstile Task para reconhecer e resolver automaticamente captchas Cloudflare Challenge via a API do CapMonster Cloud. Tutorial completo e exemplos na documentação CapMonster Cloud Docs." diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx index e8f07f57..434ca3b1 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: Cloudflare Turnstile title: "Reconhecer e resolver Cloudflare Turnstile | API" description: "Método Turnstile Task para reconhecer e resolver automaticamente captchas Cloudflare Turnstile via API do Capmonster Cloud. Tutorial completo e exemplos na documentação do Capmonster Cloud." diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx index 53f5b82a..aaff652c 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 sidebar_label: Cloudflare Waiting Room title: "Reconhecer e resolver o Cloudflare Waiting Room | API" description: "Método Turnstile Task para reconhecer e resolver automaticamente captchas do Cloudflare Waiting Room via a API do CapMonster Cloud. Tutorial completo e exemplos na documentação do CapMonster Cloud." diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx index c70cbf06..9ac2b429 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 19 sidebar_label: Yidun title: "Reconhecimento e bypass automático do captcha Yidun (NECaptcha) | API" description: "Descubra como contornar o captcha Yidun usando a API do serviço Capmonster Cloud para reconhecimento e resolução automática de captchas!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx index a81d933a..970c0c51 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/Basilisk-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 13 +sidebar_position: 12 sidebar_label: Basilisk title: "Basilisk 验证码自动识别与绕过 — Basilisk Task | API" description: "了解如何使用 Capmonster Cloud 自动验证码识别与解决服务的 API 绕过 Basilisk 验证码!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json new file mode 100644 index 00000000..963b04ab --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/_category_.json @@ -0,0 +1,9 @@ +{ + "label": "ImageToText", + "position": 6, + "link": { + "type": "generated-index", + "title": "ImageToText", + "description": "文本 CAPTCHA 识别、置信度阈值设置以及自定义模块的使用。" + } +} diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx similarity index 92% rename from i18n/zh/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx index f377d502..5283e3a8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/image-to-text.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx @@ -1,475 +1,475 @@ ---- -sidebar_position: 12 -sidebar_label: ImageToText -title: "简单文本验证码的自动识别与绕过 — Image-to-Text | API" -description: "通过 CapMonster Cloud API 使用 Image-to-Text 方法,自动识别并绕过简单文本验证码。Capmonster Cloud Docs 文档中提供了自动解决简单验证码(包含文本的图像)的详细指南和示例!" ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import ParamItem from '@theme/ParamItem'; -import MethodItem from '@theme/MethodItem'; -import MethodDescription from '@theme/MethodDescription' -import PriceBlock from '../../../../../src/theme/PriceBlock'; -import PriceBlockWrap from '@theme/PriceBlockWrap'; -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; - - - -# ImageToText - - - - - -![](./images/image-to-text/text-captcha-2.png) - -这是常规验证码,即包含文本的图片,需要输入相应的文本。 - -:::warning **注意!** -此任务无需使用代理服务器。 -::: - - -## 请求参数 - -
- -> 重要提示:请在创建任务前立即获取图像的 base64,以避免在解决过程中出现错误(见下方 CAPTCHA 图像 base64 获取示例)。 - -
- -
- - **ImageToTextTask** - - --- - - - 以 base64* 编码的验证码文件内容。请确保该值以单行形式发送,不包含换行。 - - --- - - - 模块名称,例如 “yandex”。传递模块名称的替代方式以及所有可用模块的列表可在[此处](../api/module-name.mdx)查看。
- 示例:`yandex`、`special` 等。 - - --- - - - 验证码识别阈值,可取 **0** 到 **100**。例如,如果向系统发送的值为 **90**,而任务解决置信度为 **80**,则不会扣除解决费用。在这种情况下,用户将收到 ERROR_CAPTCHA_UNSOLVABLE 响应。设置扣费阈值的另一种方法请参阅[文章](../api/threshold.mdx)。 - - --- - - - 解决时是否区分大小写。可选值:`true`、`false` - - --- - - - `1` - 如果验证码仅由数字组成。
- 可选值:`0`、`1` - - --- - - -`false` — 默认未设置;
-`true` — 验证码要求执行数学运算(例如验证码 `2 + 6` 将返回值 `8`)。
- -**重要:** 对于 `captcha_math` 模块,**请勿使用**参数 `math: true`。 -
- -
- -Base64 是一种数据编码方法,允许将二进制数据表示为文本。以下是使用*开发者工具*中的控制台获取验证码图像的 base64 格式的示例: - -```JavaScript -const captchaUrl = 'https://example.com/captcha.jpg'; - -function loadAndEncodeCaptchaToBase64(url) { - fetch(url) - .then(response => response.blob()) - .then(blob => { - const reader = new FileReader(); - reader.readAsDataURL(blob); - - reader.onloadend = function() { - const base64Data = reader.result; - console.log('Base64 编码的验证码:, base64Data); - - }; - }) - .catch(error => { - console.error('加载或编码验证码时出错:', error); - }); -} - -loadAndEncodeCaptchaToBase64(captchaUrl); - -``` - - -## 创建任务方法 - -
- - ```http - https://api.capmonster.cloud/createTask - ``` - - - **请求示例** -```json -{ - "clientKey": "API_KEY", - "task": { - "type": "ImageToTextTask", - "body": "BASE64_BODY_HERE!" - } -} -``` - **响应示例** - ```json - { - "errorId":0, - "taskId":407533072 - } - ``` - -
- - -## 获取任务结果方法 -使用[getTaskResult](../api/methods/get-task-result.mdx)方法获取验证码的解决方案。根据系统负载,您将在300毫秒到6秒的时间范围内收到答案。 - -
- - ```http - https://api.capmonster.cloud/getTaskResult - ``` - - - **请求示例** - ```json - { - "clientKey":"API_KEY", - "taskId": 407533072 - } - ``` - **响应示例** -```json -{ - "errorId": 0, - "status": "ready", - "solution": { - "text": "answer" - } -} -``` - -
- -
- -|**属性**|**类型**|**描述**| -| :-: | :-: | :-: | -|text|String|验证码答案| - -## 如何查找任务创建所需的所有参数 - -### 手动方式 - -1. 请在浏览器中访问您的网站,该网站包含验证码功能。 -2. 右键点击验证码元素,选择 **检查(Inspect)**。 - -#### base64 - -在 DOM 树中找到所需的元素并将鼠标悬停在其上——*base64* 编码的图片会直接显示在元素的属性中: - -![base64elements](images/image-to-text/base64-elements.png) - -如果图片引用的是外部 URL,而不是包含 base64 编码的数据,你可以在网络请求(**Network**)中找到它。右键点击相关请求,选择 **复制图片为数据 URI**。这会将 *base64* 编码的图片数据复制到剪贴板。 - -![base64network](images/image-to-text/base64-network.png) - -### 自动方法 - -为了自动化获取所需参数,可以通过 **浏览器**(普通模式或 headless 模式,例如使用 **Playwright**)进行提取,或直接从 **HTTP 请求**中获取。由于动态参数的有效时间较短,建议在获取后尽快使用。 - -:::warning **重要** -所提供的代码片段仅作为获取必要参数的基础示例。具体实现方式取决于包含验证码的网站、本身的页面结构,以及所使用的 HTML 元素和选择器。 -::: - - - -
- 显示代码(浏览器端) - ```js - (async () => { - const img = document.querySelector('img'); // 示例选择器 - - const imageUrl = img.src; - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("加载图片失败"); - } - - const buffer = await response.arrayBuffer(); - - // 将二进制数据转换为 base64 - const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); - - console.log(base64Image); - })(); - ``` -
- -
- 显示代码(Node.js) - ```js - (async () => { - const imageUrl = "https://example/img/.jpg"; // 图片 URL - - const response = await fetch(imageUrl); - - if (!response.ok) { - throw new Error("加载图片失败"); - } - - const buffer = await response.arrayBuffer(); - - // 转换数据为 base64 - const base64Image = Buffer.from(buffer).toString("base64"); - - console.log(base64Image); - })(); - ``` -
-
- - -
- 显示代码 - ```python - import requests - import base64 - - # 图片 URL - image_url = "https://example/img.jpg" - - response = requests.get(image_url) - - if response.status_code == 200: - # 将图片二进制数据转换为 base64 - base64_image = base64.b64encode(response.content).decode('utf-8') - - print(base64_image) - else: - print("加载图片失败") - ``` -
-
- - -
- 显示代码 - ```csharp - using System; - using System.Net.Http; - using System.Threading.Tasks; - - class Program - { - static async Task Main(string[] args) - { - // 图片 URL - string imageUrl = "https://example/img.jpg"; - - using (HttpClient client = new HttpClient()) - { - try - { - byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); - - // 将图片二进制数据转换为 base64 - string base64Image = Convert.ToBase64String(imageBytes); - - Console.WriteLine(base64Image); - } - catch (Exception ex) - { - Console.WriteLine("加载图片失败: " + ex.Message); - } - } - } - } - ``` -
-
-
- -## 使用 SDK 库 - - - -
- 显示代码(用于浏览器) -```js -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -document.addEventListener('DOMContentLoaded', async () => { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // 输入您的 CapMonster Cloud API 密钥 - ); - - // 如有必要,可以检查余额 - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // 替换为实际值 - // 可选参数 - CapMonsterModule: CapMonsterModules.YandexWave, // 可以选择模块,例如 YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); -}); -``` -
- -
- 显示代码 (Node.js) -```javascript -// https://github.com/ZennoLab/capmonstercloud-client-js - -import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; - -const API_KEY = "YOUR_API_KEY"; // 输入您的 CapMonster Cloud API 密钥 - -async function solveImageToText() { - const cmcClient = CapMonsterCloudClientFactory.Create( - new ClientOptions({ clientKey: API_KEY }) - ); - - // 如有必要,可以检查余额 - const balance = await cmcClient.getBalance(); - console.log("Balance:", balance); - - const imageToTextRequest = new ImageToTextRequest({ - body: 'some base64 body', // 替换为实际值 - // 可选参数 - CapMonsterModule: CapMonsterModules.YandexWave, // 可以选择模块,例如 YandexWave - Case: true, - numeric: 1, - recognizingThreshold: 65, - math: false - }); - - const result = await cmcClient.Solve(imageToTextRequest); - console.log("Solution:", result); -} - -solveImageToText().catch(console.error); -``` -
- -
- - -
- 显示代码 - ```python - # https://github.com/ZennoLab/capmonstercloud-client-python - - import asyncio - import base64 - from capmonstercloudclient import CapMonsterClient, ClientOptions - from capmonstercloudclient.requests import ImageToTextRequest - - # 输入您的 CapMonster Cloud API 密钥 - client_options = ClientOptions(api_key="YOUR_API_KEY") - cap_monster_client = CapMonsterClient(options=client_options) - - # base64 格式的图片 - image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # 替换为真实值 - image_bytes = base64.b64decode(image_base64) - - image_to_text_request = ImageToTextRequest( - image_bytes=image_bytes, - module_name=None, # 可以选择模块,例如 YandexWave - # 可选参数 - threshold=50, - case=True, - numeric=0, - math=False - ) - - async def solve_captcha(): - # 如有必要,可以检查余额 - balance = await cap_monster_client.get_balance() - print("Balance:", balance) - - solution = await cap_monster_client.solve_captcha(image_to_text_request) - return solution - - responses = asyncio.run(solve_captcha()) - print("Solution:", responses) - ``` -
-
- - -
- 显示代码 - ```csharp - // https://github.com/ZennoLab/capmonstercloud-client-dotnet - - using System; - using System.Threading.Tasks; - using Zennolab.CapMonsterCloud.Requests; - using Zennolab.CapMonsterCloud; - - class Program - { - static async Task Main(string[] args) - { - var clientOptions = new ClientOptions - { - ClientKey = "YOUR_API_KEY" // 输入您的 CapMonster Cloud API 密钥 - }; - - var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); - - // 如有必要,可以检查余额 - var balance = await cmCloudClient.GetBalanceAsync(); - Console.WriteLine("Balance: " + balance); - - var imageToTextRequest = new ImageToTextRequest - { - Body = "/9j/4AAQSkZJRgABAQAAAQABA...hMjIyMjIyMjIyMjIyMj", // 替换为实际值 - // 可选参数 - CapMonsterModule = "None", // 可以选择模块,例如 YandexWave - RecognizingThreshold = 70, - CaseSensitive = true, - Numeric = false, - Math = false - }; - - var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); - - Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); - } - } - ``` -
-
-
+--- +sidebar_position: 0 +sidebar_label: ImageToText +title: "简单文本验证码的自动识别与绕过 — Image-to-Text | API" +description: "通过 CapMonster Cloud API 使用 Image-to-Text 方法,自动识别并绕过简单文本验证码。Capmonster Cloud Docs 文档中提供了自动解决简单验证码(包含文本的图像)的详细指南和示例!" +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import ParamItem from '@theme/ParamItem'; +import MethodItem from '@theme/MethodItem'; +import MethodDescription from '@theme/MethodDescription' +import PriceBlock from '../../../../../../src/theme/PriceBlock'; +import PriceBlockWrap from '@theme/PriceBlockWrap'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; + + + +# ImageToText + + + + + +![](../images/image-to-text/text-captcha-2.png) + +这是常规验证码,即包含文本的图片,需要输入相应的文本。 + +:::warning **注意!** +此任务无需使用代理服务器。 +::: + + +## 请求参数 + +
+ +> 重要提示:请在创建任务前立即获取图像的 base64,以避免在解决过程中出现错误(见下方 CAPTCHA 图像 base64 获取示例)。 + +
+ +
+ + **ImageToTextTask** + + --- + + + 以 base64* 编码的验证码文件内容。请确保该值以单行形式发送,不包含换行。 + + --- + + + 模块名称,例如 “yandex”。传递模块名称的替代方式以及所有可用模块的列表可在[此处](./module-name.mdx)查看。
+ 示例:`yandex`、`special` 等。 + + --- + + + 验证码识别阈值,可取 **0** 到 **100**。例如,如果向系统发送的值为 **90**,而任务解决置信度为 **80**,则不会扣除解决费用。在这种情况下,用户将收到 ERROR_CAPTCHA_UNSOLVABLE 响应。设置扣费阈值的另一种方法请参阅[文章](./threshold.mdx)。 + + --- + + + 解决时是否区分大小写。可选值:`true`、`false` + + --- + + + `1` - 如果验证码仅由数字组成。
+ 可选值:`0`、`1` + + --- + + +`false` — 默认未设置;
+`true` — 验证码要求执行数学运算(例如验证码 `2 + 6` 将返回值 `8`)。
+ +**重要:** 对于 `captcha_math` 模块,**请勿使用**参数 `math: true`。 +
+ +
+ +Base64 是一种数据编码方法,允许将二进制数据表示为文本。以下是使用*开发者工具*中的控制台获取验证码图像的 base64 格式的示例: + +```JavaScript +const captchaUrl = 'https://example.com/captcha.jpg'; + +function loadAndEncodeCaptchaToBase64(url) { + fetch(url) + .then(response => response.blob()) + .then(blob => { + const reader = new FileReader(); + reader.readAsDataURL(blob); + + reader.onloadend = function() { + const base64Data = reader.result; + console.log('Base64 编码的验证码:, base64Data); + + }; + }) + .catch(error => { + console.error('加载或编码验证码时出错:', error); + }); +} + +loadAndEncodeCaptchaToBase64(captchaUrl); + +``` + + +## 创建任务方法 + +
+ + ```http + https://api.capmonster.cloud/createTask + ``` + + + **请求示例** +```json +{ + "clientKey": "API_KEY", + "task": { + "type": "ImageToTextTask", + "body": "BASE64_BODY_HERE!" + } +} +``` + **响应示例** + ```json + { + "errorId":0, + "taskId":407533072 + } + ``` + +
+ + +## 获取任务结果方法 +使用[getTaskResult](/docs/api/methods/get-task-result/)方法获取验证码的解决方案。根据系统负载,您将在300毫秒到6秒的时间范围内收到答案。 + +
+ + ```http + https://api.capmonster.cloud/getTaskResult + ``` + + + **请求示例** + ```json + { + "clientKey":"API_KEY", + "taskId": 407533072 + } + ``` + **响应示例** +```json +{ + "errorId": 0, + "status": "ready", + "solution": { + "text": "answer" + } +} +``` + +
+ +
+ +|**属性**|**类型**|**描述**| +| :-: | :-: | :-: | +|text|String|验证码答案| + +## 如何查找任务创建所需的所有参数 + +### 手动方式 + +1. 请在浏览器中访问您的网站,该网站包含验证码功能。 +2. 右键点击验证码元素,选择 **检查(Inspect)**。 + +#### base64 + +在 DOM 树中找到所需的元素并将鼠标悬停在其上——*base64* 编码的图片会直接显示在元素的属性中: + +![base64elements](../images/image-to-text/base64-elements.png) + +如果图片引用的是外部 URL,而不是包含 base64 编码的数据,你可以在网络请求(**Network**)中找到它。右键点击相关请求,选择 **复制图片为数据 URI**。这会将 *base64* 编码的图片数据复制到剪贴板。 + +![base64network](../images/image-to-text/base64-network.png) + +### 自动方法 + +为了自动化获取所需参数,可以通过 **浏览器**(普通模式或 headless 模式,例如使用 **Playwright**)进行提取,或直接从 **HTTP 请求**中获取。由于动态参数的有效时间较短,建议在获取后尽快使用。 + +:::warning **重要** +所提供的代码片段仅作为获取必要参数的基础示例。具体实现方式取决于包含验证码的网站、本身的页面结构,以及所使用的 HTML 元素和选择器。 +::: + + + +
+ 显示代码(浏览器端) + ```js + (async () => { + const img = document.querySelector('img'); // 示例选择器 + + const imageUrl = img.src; + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("加载图片失败"); + } + + const buffer = await response.arrayBuffer(); + + // 将二进制数据转换为 base64 + const base64Image = btoa(String.fromCharCode(...new Uint8Array(buffer))); + + console.log(base64Image); + })(); + ``` +
+ +
+ 显示代码(Node.js) + ```js + (async () => { + const imageUrl = "https://example/img/.jpg"; // 图片 URL + + const response = await fetch(imageUrl); + + if (!response.ok) { + throw new Error("加载图片失败"); + } + + const buffer = await response.arrayBuffer(); + + // 转换数据为 base64 + const base64Image = Buffer.from(buffer).toString("base64"); + + console.log(base64Image); + })(); + ``` +
+
+ + +
+ 显示代码 + ```python + import requests + import base64 + + # 图片 URL + image_url = "https://example/img.jpg" + + response = requests.get(image_url) + + if response.status_code == 200: + # 将图片二进制数据转换为 base64 + base64_image = base64.b64encode(response.content).decode('utf-8') + + print(base64_image) + else: + print("加载图片失败") + ``` +
+
+ + +
+ 显示代码 + ```csharp + using System; + using System.Net.Http; + using System.Threading.Tasks; + + class Program + { + static async Task Main(string[] args) + { + // 图片 URL + string imageUrl = "https://example/img.jpg"; + + using (HttpClient client = new HttpClient()) + { + try + { + byte[] imageBytes = await client.GetByteArrayAsync(imageUrl); + + // 将图片二进制数据转换为 base64 + string base64Image = Convert.ToBase64String(imageBytes); + + Console.WriteLine(base64Image); + } + catch (Exception ex) + { + Console.WriteLine("加载图片失败: " + ex.Message); + } + } + } + } + ``` +
+
+
+ +## 使用 SDK 库 + + + +
+ 显示代码(用于浏览器) +```js +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +document.addEventListener('DOMContentLoaded', async () => { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: 'YOUR_API_KEY' }) // 输入您的 CapMonster Cloud API 密钥 + ); + + // 如有必要,可以检查余额 + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // 替换为实际值 + // 可选参数 + CapMonsterModule: CapMonsterModules.YandexWave, // 可以选择模块,例如 YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); +}); +``` +
+ +
+ 显示代码 (Node.js) +```javascript +// https://github.com/ZennoLab/capmonstercloud-client-js + +import { CapMonsterCloudClientFactory, ClientOptions, ImageToTextRequest, CapMonsterModules } from '@zennolab_com/capmonstercloud-client'; + +const API_KEY = "YOUR_API_KEY"; // 输入您的 CapMonster Cloud API 密钥 + +async function solveImageToText() { + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: API_KEY }) + ); + + // 如有必要,可以检查余额 + const balance = await cmcClient.getBalance(); + console.log("Balance:", balance); + + const imageToTextRequest = new ImageToTextRequest({ + body: 'some base64 body', // 替换为实际值 + // 可选参数 + CapMonsterModule: CapMonsterModules.YandexWave, // 可以选择模块,例如 YandexWave + Case: true, + numeric: 1, + recognizingThreshold: 65, + math: false + }); + + const result = await cmcClient.Solve(imageToTextRequest); + console.log("Solution:", result); +} + +solveImageToText().catch(console.error); +``` +
+ +
+ + +
+ 显示代码 + ```python + # https://github.com/ZennoLab/capmonstercloud-client-python + + import asyncio + import base64 + from capmonstercloudclient import CapMonsterClient, ClientOptions + from capmonstercloudclient.requests import ImageToTextRequest + + # 输入您的 CapMonster Cloud API 密钥 + client_options = ClientOptions(api_key="YOUR_API_KEY") + cap_monster_client = CapMonsterClient(options=client_options) + + # base64 格式的图片 + image_base64 = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgc...wwzqR4U/yZ//Z" # 替换为真实值 + image_bytes = base64.b64decode(image_base64) + + image_to_text_request = ImageToTextRequest( + image_bytes=image_bytes, + module_name=None, # 可以选择模块,例如 YandexWave + # 可选参数 + threshold=50, + case=True, + numeric=0, + math=False + ) + + async def solve_captcha(): + # 如有必要,可以检查余额 + balance = await cap_monster_client.get_balance() + print("Balance:", balance) + + solution = await cap_monster_client.solve_captcha(image_to_text_request) + return solution + + responses = asyncio.run(solve_captcha()) + print("Solution:", responses) + ``` +
+
+ + +
+ 显示代码 + ```csharp + // https://github.com/ZennoLab/capmonstercloud-client-dotnet + + using System; + using System.Threading.Tasks; + using Zennolab.CapMonsterCloud.Requests; + using Zennolab.CapMonsterCloud; + + class Program + { + static async Task Main(string[] args) + { + var clientOptions = new ClientOptions + { + ClientKey = "YOUR_API_KEY" // 输入您的 CapMonster Cloud API 密钥 + }; + + var cmCloudClient = CapMonsterCloudClientFactory.Create(clientOptions); + + // 如有必要,可以检查余额 + var balance = await cmCloudClient.GetBalanceAsync(); + Console.WriteLine("Balance: " + balance); + + var imageToTextRequest = new ImageToTextRequest + { + Body = "/9j/4AAQSkZJRgABAQAAAQABA...hMjIyMjIyMjIyMjIyMj", // 替换为实际值 + // 可选参数 + CapMonsterModule = "None", // 可以选择模块,例如 YandexWave + RecognizingThreshold = 70, + CaseSensitive = true, + Numeric = false, + Math = false + }; + + var imageToTextResult = await cmCloudClient.SolveAsync(imageToTextRequest); + + Console.WriteLine("Captcha Solved: " + imageToTextResult.Solution.Value); + } + } + ``` +
+
+
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/module-name.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx similarity index 56% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/module-name.mdx rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx index 0dee2e4f..547697e3 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/api/module-name.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/module-name.mdx @@ -1,13 +1,13 @@ --- -sidebar_position: 5 +sidebar_position: 1 sidebar_label: 模块名称传递 title: "为验证码识别传递模块名称" description: "在处理特定服务(如 Google、SolveMedia、Whatsapp 等)的验证码时,传递模块名称可提高识别速度和准确性,并降低错误发生率。" --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # 模块名称传递 @@ -28,106 +28,106 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; amazon - ![](images/module-name/amazon.png) + ![](../images/image-to-text/module-name/amazon.png) apple - ![](images/module-name/apple.png) + ![](../images/image-to-text/module-name/apple.png) botdetect - ![](images/module-name/botdetect.png) + ![](../images/image-to-text/module-name/botdetect.png) facebook - ![](images/module-name/facebook.png) + ![](../images/image-to-text/module-name/facebook.png) gmx - ![](images/module-name/gmx.png) + ![](../images/image-to-text/module-name/gmx.png) google - ![](images/module-name/google.png) + ![](../images/image-to-text/module-name/google.png) hotmail - ![](images/module-name/hotmail.png) + ![](../images/image-to-text/module-name/hotmail.png) mailru - ![](images/module-name/mailru.png) + ![](../images/image-to-text/module-name/mailru.png) okeng - ![](images/module-name/okeng.png) + ![](../images/image-to-text/module-name/okeng.png) okrus - ![](images/module-name/okrus.png) + ![](../images/image-to-text/module-name/okrus.png) partiallyblur - ![](images/module-name/partiallyblur.png) + ![](../images/image-to-text/module-name/partiallyblur.png) ramblerrus - ![](images/module-name/rambler.png) + ![](../images/image-to-text/module-name/rambler.png) ramblerrusnew - ![](images/module-name/ramblerrusnew.png) + ![](../images/image-to-text/module-name/ramblerrusnew.png) solvemedia - ![](images/module-name/solvemedia.png) + ![](../images/image-to-text/module-name/solvemedia.png) steam - ![](images/module-name/steam.png) + ![](../images/image-to-text/module-name/steam.png) vk - ![](images/module-name/vk.png) + ![](../images/image-to-text/module-name/vk.png) whatsapp - ![](images/module-name/whatsapp.png) + ![](../images/image-to-text/module-name/whatsapp.png) wikimedia_paddle_ensemble - ![](images/module-name/wikimedia.png) + ![](../images/image-to-text/module-name/wikimedia.png) yandex - ![](images/module-name/yandex.png) + ![](../images/image-to-text/module-name/yandex.png) yandexnew (双词验证码) - ![](images/module-name/yandexwave.png) + ![](../images/image-to-text/module-name/yandexwave.png) yandexwave captcha_math - ![](images/module-name/captcha_math.png) + ![](../images/image-to-text/module-name/captcha_math.png) sat - ![](images/module-name/sat.png) + ![](../images/image-to-text/module-name/sat.png) bls_text - ![](images/module-name/bls_text.png) + ![](../images/image-to-text/module-name/bls_text.png) universal(其他所有文本验证码) - ![](images/module-name/universal.png) + ![](../images/image-to-text/module-name/universal.png) :::info 提示 -如果无法将验证码发送到特定模块,请通过 [客服支持](https://helpdesk.zennolab.com/conversation/new) 联系我们,我们将协助您完成设置! +如果无法将验证码发送到特定模块,请通过 [客服支持](https://helpdesk.zennolab.com/zh-cn/conversation/new) 联系我们,我们将协助您完成设置! ::: diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/threshold.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx similarity index 92% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/threshold.mdx rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx index bac75870..e1b68e50 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/api/threshold.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/threshold.mdx @@ -1,14 +1,13 @@ --- - -sidebar_position: 6 +sidebar_position: 3 sidebar_label: 设置文本验证码识别置信度阈值 title: "在验证码识别中设置扣费阈值" description: "了解如何在 CapMonster Cloud 服务中设置系统对验证码答案的置信度阈值,低于该阈值时不会扣除余额。" --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # 设置文本验证码识别置信度阈值 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/user-module.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx similarity index 84% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/user-module.mdx rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx index 81f7426b..3ad8ddad 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/api/user-module.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/ImageToText/user-module.mdx @@ -1,12 +1,14 @@ --- +sidebar_position: 2 sidebar_label: 创建用户模块 title: 创建用户模块 +description: "创建自定义模块可以针对特定类型的 CAPTCHA 进行训练,从而更快速、更高效地识别非标准 CAPTCHA,并降低出错的可能性。" --- -import { ArticleHead } from '../../../../../src/theme/ArticleHead'; +import { ArticleHead } from '../../../../../../src/theme/ArticleHead'; - + # 创建用户模块 @@ -16,7 +18,7 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 前往[训练模块](https://capmonster.cloud/UserModules),或在[控制面板](https://dash.capmonster.cloud/)中,从左侧菜单选择相应的部分: -![](./images/user-module/user-module.png) +![](../images/image-to-text/user-module/user-module.png) ----- ## 工作原理 @@ -38,7 +40,7 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 在[模块训练页面](https://capmonster.cloud/UserModules)中,点击**添加模块**按钮,然后在弹出的窗口中指定验证码中包含的字符类型。完成后,系统将提示您需要收集并上传多少张验证码: -![](./images/user-module/user-module-archive.png) +![](../images/image-to-text/user-module/user-module-archive.png) #### 支持的图片格式 @@ -64,7 +66,7 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 首先,设置模块名称(只能使用拉丁字符)。 -![](./images/user-module/user-module-name.png) +![](../images/image-to-text/user-module/user-module-name.png) :::warning 警告 模块名称不能包含单词 **captcha**。 @@ -78,7 +80,7 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 您可以从建议中选择一个或多个选项。 -![](./images/user-module/user-module-params.png) +![](../images/image-to-text/user-module/user-module-params.png) :::info 信息 您至少应标记以下选项之一:“包含 Cyrillic 字符”、“包含 Latin 字符”、包含数字。 @@ -88,7 +90,7 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 指定验证码答案的位置。 -![](./images/user-module/user-module-markup.png) +![](../images/image-to-text/user-module/user-module-markup.png) 非常简单: @@ -111,7 +113,7 @@ captcha3.png:99loe 在指定了模块名称、选择了符号类型和答案位置后,您需要上传包含验证码的 zip 归档并发送给我们。 -![](./images/user-module/user-module-upload.png) +![](../images/image-to-text/user-module/user-module-upload.png) #### 2.5.付款 @@ -121,7 +123,7 @@ captcha3.png:99loe 1. 点击 **充值余额** 2. 点击 **充值** 按钮,并选择您方便的支付方式。 -![](./images/user-module/user-module-top-up-balance.png) +![](../images/image-to-text/user-module/user-module-top-up-balance.png) :::note 注意 用于训练的资金不会被扣除,而是保留在余额中。您随时可以将它们用于解决任何验证码。 @@ -133,7 +135,7 @@ captcha3.png:99loe #### Validated -![](./images/user-module/validated.png) +![](../images/image-to-text/user-module/validated.png) 在正确提交表单后(假设你已经一切都做对了)你会获得这个状态。 @@ -143,25 +145,25 @@ captcha3.png:99loe #### Paid -![](./images/user-module/paid.png) +![](../images/image-to-text/user-module/paid.png) 你的模块付款已经成功接受。 #### ValidatedInDepth -![](./images/user-module/ValidatedInDepth.png) +![](../images/image-to-text/user-module/ValidatedInDepth.png) 准备工作进行中。 #### Annotated -![](./images/user-module/Annotated.png) +![](../images/image-to-text/user-module/Annotated.png) 验证码标记已完成。训练正在进行中。 #### Trained -![](./images/user-module/trained.png) +![](../images/image-to-text/user-module/trained.png) 模块已准备就绪!你现在可以向其提交验证码。 @@ -169,8 +171,8 @@ captcha3.png:99loe 有几种方法可以指定一个解决验证码的模块: -- [在发送 /createTask 请求时添加 CapMonsterModule 参数及模块名称](../captchas/image-to-text.mdx)(如果您直接与我们的 API 交互) -- [在 ApiKey 中指定模块名称](module-name.mdx)(当您使用第三方程序且无法修改请求时非常方便) +- [在发送 /createTask 请求时添加 CapMonsterModule 参数及模块名称](/docs/captchas/ImageToText/image-to-text/)(如果您直接与我们的 API 交互) +- [在 ApiKey 中指定模块名称](/docs/captchas/ImageToText/module-name/)(当您使用第三方程序且无法修改请求时非常方便) ----- ## 常见问题解答
@@ -194,7 +196,7 @@ captcha3.png:99loe
我的模块在“备注”列中显示了 `错误`:我该怎么办? -![](./images/user-module/error.png) +![](../images/image-to-text/user-module/error.png) 请稍候。如果 24 小时内情况仍未发生变化,请联系 [技术支持](https://helpdesk.zennolab.com/zh-cn/conversation/new)。 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx index f5b91d83..26414d32 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/alibaba-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 27 +sidebar_position: 26 sidebar_label: Alibaba Captcha title: "Alibaba CAPTCHA 自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动识别与验证码解决服务的 API 来识别 Alibaba CAPTCHA!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx index 07cb81fb..bc3da416 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/altcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 22 +sidebar_position: 21 sidebar_label: Altcha --- diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx index 95f38e24..275e1a84 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/amazon-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 15 +sidebar_position: 14 sidebar_label: Amazon (AWS WAF) title: "通过 Capmonster Cloud API 自动识别和绕过 Amazon AWS WAF 验证码" description: 学习如何使用 Capmonster Cloud 验证码识别和解决 API 绕过 Amazon (AWS WAF) 验证码! diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/binance.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/binance.mdx index 15669665..dbb07be8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/binance.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/binance.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 16 +sidebar_position: 15 sidebar_label: Binance title: "Binance 验证码自动识别与绕过 | API" description: "了解如何使用 Capmonster Cloud 自动验证码识别与解决服务的 API 绕过 Binance 验证码!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx index 5cd6f71b..b627aa0d 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/castle-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 24 +sidebar_position: 23 sidebar_label: Castle title: "Castle 自动检测与绕过 | API" description: "学习如何使用 CapMonster Cloud 自动识别与解决验证码服务 API 来检测 Castle!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx index 2d4a52b3..c3f5e9bd 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/friendly-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 28 +sidebar_position: 27 sidebar_label: Friendly Captcha title: "Friendly Captcha 自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别与解决服务的 API 识别 Friendly Captcha!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx index b66bb71d..49ca964f 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/funcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 23 +sidebar_position: 22 sidebar_label: FunCaptcha title: "FunCaptcha 自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别 API 绕过 FunCaptcha(Arkose Labs 验证码)!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx index 13ddcaf4..09161168 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/geetest-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 sidebar_label: GeeTest title: "GeeTest 识别与解决 — GeeTest Task | API" description: "请参阅 CapMonster Cloud Docs 文档,了解如何使用您自己的代理,通过 GeeTest Task 任务类型配置自动识别并解决(绕过)GeeTest 验证码。" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx index 95d8681e..4120e450 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/hunt-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 26 +sidebar_position: 25 sidebar_label: Hunt Captcha title: "Hunt CAPTCHA 自动识别与解决 | API" description: "了解如何使用 CapMonster Cloud API 解决 Hunt CAPTCHA。" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/amazon.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/amazon.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/apple.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/apple.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/bls_text.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/bls_text.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/botdetect.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/botdetect.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/captcha_math.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/captcha_math.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/facebook.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/facebook.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/gmx.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/gmx.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/google.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/google.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/google.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/hotmail.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/hotmail.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/mailru.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/mailru.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/okeng.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okeng.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/okrus.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/okrus.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/partiallyblur.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/partiallyblur.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/rambler.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/rambler.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/ramblerrusnew.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/ramblerrusnew.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/sat.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/sat.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/solvemedia.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/solvemedia.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/steam.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/steam.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/universal.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/universal.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/vk.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/vk.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/whatsapp.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/whatsapp.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/wikimedia.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/wikimedia.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/yandex.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandex.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/module-name/yandexwave.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/module-name/yandexwave.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/Annotated.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/Annotated.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/ValidatedInDepth.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/ValidatedInDepth.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/error.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/error.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/error.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/paid.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/paid.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/trained.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/trained.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-archive.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-archive.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-markup.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-markup.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-name.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-name.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-params.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-params.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-top-up-balance.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-top-up-balance.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module-upload.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module-upload.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/user-module.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/user-module.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png similarity index 100% rename from i18n/zh/docusaurus-plugin-content-docs/current/api/images/user-module/validated.png rename to i18n/zh/docusaurus-plugin-content-docs/current/captchas/images/image-to-text/user-module/validated.png diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx index 41436a4c..7512eba8 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/incapsula.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 17 +sidebar_position: 16 sidebar_label: Imperva (Incapsula) title: "Imperva(Incapsula)自动识别与绕过 | API" description: "了解如何仅在您自己的资源上,使用 CapMonster Cloud 自动验证码识别与解决服务的 API 绕过 Imperva(Incapsula)验证码!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx index fa88c99a..8e879f44 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/mtcaptcha-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 21 +sidebar_position: 20 sidebar_label: MTCaptcha title: "MTCaptcha 自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别与解决服务的 API 绕过 MTCaptcha!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx index 84702a18..69ea015b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/prosopo-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 18 +sidebar_position: 17 sidebar_label: Prosopo title: "Prosopo 验证码自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别与解决服务的 API 绕过 Prosopo 验证码!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx index cdcb2a22..8ff227ba 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/temu-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 19 +sidebar_position: 18 sidebar_label: Temu draft: true --- diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx index 69eea96a..f2936b87 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tendi.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 14 +sidebar_position: 13 sidebar_label: TenDI title: "TenDI 验证码自动识别与绕过 — Tencent captcha | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别与解决服务的 API 绕过 TenDI(Tencent captcha)验证码!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx index 8905af6a..0f90ec7a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/tspd-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 25 +sidebar_position: 24 sidebar_label: TSPD title: "TSPD 自动识别与绕过 | API" description: "了解如何使用 CapMonster Cloud 自动验证码识别与解决服务的 API 识别 TSPD!" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx index 454a0d49..2b90000a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-challenge-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 sidebar_label: Cloudflare Challenge title: "识别并解决 Cloudflare Challenge | API" description: "通过 Capmonster Cloud API,使用 Turnstile Task 方法自动识别并解决 Cloudflare Challenge 验证码。完整教程和示例请参阅 Capmonster Cloud 文档。" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx index b3d6a58d..f9043f45 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: Cloudflare Turnstile title: "识别并解决 Cloudflare Turnstile | API" description: "使用 CapMonster Cloud API 的 Turnstile Task 方法,自动识别并解决 Cloudflare Turnstile 验证码。CapMonster Cloud 文档中提供完整教程和示例。" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx index f4b41806..8ba52e04 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/turnstile-waitroom-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 sidebar_label: Cloudflare Waiting Room title: "识别并解决 Cloudflare 等待室 | API" description: "Turnstile Task 方法通过 Capmonster Cloud API 自动识别并解决 Cloudflare 等待室验证码。在 Capmonster Cloud 文档中提供完整教程和示例。" diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx index 77409e2c..6bf25d09 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/yidun-task.mdx @@ -1,5 +1,5 @@ --- -sidebar_position: 20 +sidebar_position: 19 sidebar_label: Yidun title: "Yidun(NECaptcha)验证码的自动识别与绕过 | API" description: "了解如何使用 Capmonster Cloud 的 API 自动识别并绕过 Yidun 验证码!" From cf44f01dc685b490d42e93eb27379e385d2d2e7b Mon Sep 17 00:00:00 2001 From: Katyanch Date: Wed, 12 Aug 2026 00:46:21 +0900 Subject: [PATCH 2/4] UOD-162: Move module info to ImageToText --- i18n/en/docusaurus-plugin-content-docs/current.json | 12 ++++++++++++ .../docusaurus-plugin-content-docs/current.json | 12 ++++++++++++ i18n/ru/docusaurus-plugin-content-docs/current.json | 12 ++++++++++++ i18n/zh/docusaurus-plugin-content-docs/current.json | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json index 46188947..cc3bf8ee 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current.json +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -142,5 +142,17 @@ "sidebar.tutorialSidebar.category.Маппинг параметров в расширении.link.generated-index.description": { "message": "View CAPTCHA parameter mappings in CapMonster Cloud browser extensions.", "description": "The generated-index page description for category Получение параметров CAPTCHA в расширении in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText": { + "message": "ImageToText", + "description": "The label for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.title": { + "message": "ImageToText", + "description": "The generated-index page title for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.description": { + "message": "Text CAPTCHA recognition, confidence threshold configuration, and working with custom modules.", + "description": "The generated-index page description for category ImageToText in sidebar tutorialSidebar" } } diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current.json b/i18n/pt-br/docusaurus-plugin-content-docs/current.json index bea40ad9..83a9d231 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current.json +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current.json @@ -147,5 +147,17 @@ "sidebar.tutorialSidebar.category.Маппинг параметров в расширении.link.generated-index.description": { "message": "Visualize o mapeamento dos parâmetros de CAPTCHA nas extensões de navegador do CapMonster Cloud.", "description": "A descrição da página generated-index para a categoria Маппинг параметров в расширении na sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText": { + "message": "ImageToText", + "description": "The label for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.title": { + "message": "ImageToText", + "description": "The generated-index page title for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.description": { + "message": "Reconhecimento de CAPTCHA de texto, configuração do limite de confiança e uso de módulos personalizados.", + "description": "The generated-index page description for category ImageToText in sidebar tutorialSidebar" } } diff --git a/i18n/ru/docusaurus-plugin-content-docs/current.json b/i18n/ru/docusaurus-plugin-content-docs/current.json index 7d62ca5d..31c4bdfe 100644 --- a/i18n/ru/docusaurus-plugin-content-docs/current.json +++ b/i18n/ru/docusaurus-plugin-content-docs/current.json @@ -30,5 +30,17 @@ "sidebar.tutorialSidebar.category.Маппинг параметров в расширении.link.generated-index.description": { "message": "Просмотрите параметры CAPTCHA в расширениях CapMonster Cloud для браузеров.", "description": "The generated-index page description for category Маппинг параметров в расширении in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText": { + "message": "ImageToText", + "description": "The label for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.title": { + "message": "ImageToText", + "description": "The generated-index page title for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.description": { + "message": "Распознавание текстовых CAPTCHA, настройка порога уверенности и работа с пользовательскими модулями.", + "description": "The generated-index page description for category ImageToText in sidebar tutorialSidebar" } } diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index 35c14d40..423f73b5 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -147,5 +147,17 @@ "sidebar.tutorialSidebar.category.Маппинг параметров в расширении.link.generated-index.description": { "message": "查看 CapMonster Cloud 浏览器扩展程序中的 CAPTCHA 参数映射。", "description": "tutorialSidebar 侧边栏中“Маппинг параметров в расширении”分类的 generated-index 页面描述" + }, + "sidebar.tutorialSidebar.category.ImageToText": { + "message": "ImageToText", + "description": "The label for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.title": { + "message": "ImageToText", + "description": "The generated-index page title for category ImageToText in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.ImageToText.link.generated-index.description": { + "message": "文本 CAPTCHA 识别、置信度阈值设置以及自定义模块的使用。", + "description": "The generated-index page description for category ImageToText in sidebar tutorialSidebar" } } From 69237fefabd566ffae48f1bd3b43da3d02fab274 Mon Sep 17 00:00:00 2001 From: Katyanch Date: Wed, 12 Aug 2026 01:17:48 +0900 Subject: [PATCH 3/4] fix links --- docs/captchas/compleximage/grid/bls.mdx | 2 +- docs/extension/text-captcha-solve.mdx | 4 ++-- .../current/captchas/ImageToText/image-to-text.mdx | 2 +- .../current/captchas/compleximage/grid/bls.mdx | 2 +- .../current/extension/text-captcha-solve.mdx | 4 ++-- .../current/captchas/compleximage/grid/bls.mdx | 2 +- .../current/extension/text-captcha-solve.mdx | 4 ++-- .../current/captchas/compleximage/grid/bls.mdx | 2 +- .../current/extension/text-captcha-solve.mdx | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/captchas/compleximage/grid/bls.mdx b/docs/captchas/compleximage/grid/bls.mdx index 4e61f41e..39dd505c 100644 --- a/docs/captchas/compleximage/grid/bls.mdx +++ b/docs/captchas/compleximage/grid/bls.mdx @@ -211,7 +211,7 @@ https://ru.api.capmonster.cloud/getTaskResult Вместо автоматического режима определения совпадений (`bls_3x3`) возможно использовать распознавание текста для каждого изображения отдельно — это даёт больше гибкости и позволяет точнее контролировать процесс обработки. -Данный подход реализуется через задачу `ImageToTextTask` с модулем `bls_text` (*см. раздел [Передача имени модуля](/api/module-name.mdx)*). В этом режиме **каждое изображение обрабатывается как отдельная капча**, а результатом является распознанное текстовое значение. +Данный подход реализуется через задачу `ImageToTextTask` с модулем `bls_text` (*см. раздел [Передача имени модуля](/docs/captchas/ImageToText/module-name)*). В этом режиме **каждое изображение обрабатывается как отдельная капча**, а результатом является распознанное текстовое значение. ### Принцип работы diff --git a/docs/extension/text-captcha-solve.mdx b/docs/extension/text-captcha-solve.mdx index 4e7a0883..02f4b1e4 100644 --- a/docs/extension/text-captcha-solve.mdx +++ b/docs/extension/text-captcha-solve.mdx @@ -52,8 +52,8 @@ import { ArticleHead } from '../../src/theme/ArticleHead'; Если текстовая капча решается некорректно через расширение, выполните следующие шаги: -1. Выберите подходящий модуль из списка доступных (см. раздел [Передача имени модуля](/docs/api/module-name)). -2. Если нужного модуля нет — создайте свой (см. раздел [Создание пользовательского модуля](/docs/api/user-module)) и дождитесь готовности. +1. Выберите подходящий модуль из списка доступных (см. раздел [Передача имени модуля](/docs/captchas/ImageToText/module-name)). +2. Если нужного модуля нет — создайте свой (см. раздел [Создание пользовательского модуля](/docs/captchas/ImageToText/user-module)) и дождитесь готовности. 3. В расширении откройте **Текстовая капча** → **Настройки** (фиолетовая кнопка со стрелкой). ![](./images/text-captcha-solve/open-settings.png) diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx index 5fec7546..74f28475 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/ImageToText/image-to-text.mdx @@ -151,7 +151,7 @@ https://api.capmonster.cloud/createTask ## Get task result method -Use the [getTaskResult](/en/docs/api/methods/get-task-result/) method to get the recognition result. Depending on the service load, the result is usually returned within 300 ms to 6 s. +Use the [getTaskResult](/docs/api/methods/get-task-result/) method to get the recognition result. Depending on the service load, the result is usually returned within 300 ms to 6 s. diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx index 620d0e80..5f3ff9c3 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx @@ -174,7 +174,7 @@ Additionally, the `TaskArgument` value must be passed inside `metadata`. Instead of using the automatic matching mode (`bls_3x3`), you can use text recognition for each image separately. This approach provides greater flexibility and allows more precise control over the processing workflow. -This method is implemented via the `ImageToTextTask` with the `bls_text` module (*see section [Module name passing](/api/module-name.mdx)*). In this mode, **each image is processed as an individual captcha**, and the result is a recognized text value. +This method is implemented via the `ImageToTextTask` with the `bls_text` module (*see section [Module name passing](/docs/captchas/ImageToText/module-name)*). In this mode, **each image is processed as an individual captcha**, and the result is a recognized text value. ### Workflow diff --git a/i18n/en/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx b/i18n/en/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx index 7dc94b09..67d18611 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx @@ -52,8 +52,8 @@ You can solve several captchas on the page in parallel, the main thing is that t If the text captcha is being solved incorrectly through the extension, follow these steps: -1. Select the appropriate module from the available list (see [Passing module name](/docs/api/module-name)). -2. If the required module is not available, create your own (see [Creating a user module](/docs/api/user-module)) and wait until it is ready. +1. Select the appropriate module from the available list (see [Passing module name](/docs/captchas/ImageToText/module-name)). +2. If the required module is not available, create your own (see [Creating a user module](/docs/captchas/ImageToText/user-module)) and wait until it is ready. 3. In the extension, open **Text captcha** → **Settings** (purple button with an arrow). ![](./images/text-captcha-solve/open-settings.png) diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx index 6433e34a..e6d8d3c8 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx @@ -175,7 +175,7 @@ Além disso, o valor `TaskArgument` deve ser passado dentro de `metadata`. Em vez de usar o modo automático de correspondência (`bls_3x3`), você pode utilizar o reconhecimento de texto para cada imagem separadamente. Essa abordagem oferece maior flexibilidade e permite um controle mais preciso do fluxo de processamento. -Este método é implementado por meio da tarefa `ImageToTextTask` com o módulo `bls_text` (*veja a seção [Nome do módulo](/api/module-name.mdx)*). Nesse modo, **cada imagem é processada como uma captcha individual**, e o resultado é um valor de texto reconhecido. +Este método é implementado por meio da tarefa `ImageToTextTask` com o módulo `bls_text` (*veja a seção [Nome do módulo](/docs/captchas/ImageToText/module-name)*). Nesse modo, **cada imagem é processada como uma captcha individual**, e o resultado é um valor de texto reconhecido. ### Fluxo de trabalho diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx index ead7d58d..92fce9ff 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx @@ -49,8 +49,8 @@ Você pode resolver várias captchas na página em paralelo, o importante é que Se o CAPTCHA de texto estiver sendo resolvido incorretamente pela extensão, siga estas etapas: -1. Selecione o módulo apropriado na lista disponível (veja [Nome do Módulo](/docs/api/module-name)). -2. Se o módulo necessário não estiver disponível, crie o seu próprio (veja [Criando um módulo de usuário](/docs/api/user-module)) e aguarde até que esteja pronto. +1. Selecione o módulo apropriado na lista disponível (veja [Nome do Módulo](/docs/captchas/ImageToText/module-name)). +2. Se o módulo necessário não estiver disponível, crie o seu próprio (veja [Criando um módulo de usuário](/docs/captchas/ImageToText/user-module)) e aguarde até que esteja pronto. 3. Na extensão, abra **Text captcha** → **Settings** (botão roxo com uma seta). ![](./images/text-captcha-solve/open-settings.png) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx index eff1f46b..54d97a35 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/compleximage/grid/bls.mdx @@ -172,7 +172,7 @@ import { ArticleHead } from '@site/src/theme/ArticleHead'; 除了使用自动匹配模式(`bls_3x3`)外,你还可以对每张图片分别进行文本识别。该方法提供了更高的灵活性,并允许对处理流程进行更精细的控制。 -此方法通过使用 `ImageToTextTask` 并结合 `bls_text` 模块来实现(*参见章节 [模块名称传递](/api/module-name.mdx)*)。在该模式下,**每张图片都会作为单独的验证码进行处理**,返回结果为识别出的文本值。 +此方法通过使用 `ImageToTextTask` 并结合 `bls_text` 模块来实现(*参见章节 [模块名称传递](/docs/captchas/ImageToText/module-name)*)。在该模式下,**每张图片都会作为单独的验证码进行处理**,返回结果为识别出的文本值。 ### 工作流程 diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx index 3514381b..f98b9d89 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/extension/text-captcha-solve.mdx @@ -49,8 +49,8 @@ import { ArticleHead } from '../../../../../src/theme/ArticleHead'; 如果文字验证码通过扩展程序识别错误,请按照以下步骤操作: -1. 从可用列表中选择合适的模块(参见 [模块名称传递](/docs/api/module-name))。 -2. 如果没有所需的模块,请创建自己的模块(参见 [创建用户模块](/docs/api/user-module)),并等待其准备就绪。 +1. 从可用列表中选择合适的模块(参见 [模块名称传递](/docs/captchas/ImageToText/module-name))。 +2. 如果没有所需的模块,请创建自己的模块(参见 [创建用户模块](/docs/captchas/ImageToText/user-module)),并等待其准备就绪。 3. 在扩展程序中打开 **Text captcha** → **Settings**(紫色带箭头的按钮)。 ![](./images/text-captcha-solve/open-settings.png) From fd663f85e4bd0d71712e5dabe02722c22746e7d2 Mon Sep 17 00:00:00 2001 From: Katyanch Date: Wed, 12 Aug 2026 04:03:16 +0900 Subject: [PATCH 4/4] UOD-167: Update DataDome solution code examples --- docs/captchas/datadome.mdx | 1167 ++++++---------- .../current/captchas/datadome.mdx | 1172 ++++++---------- .../current/captchas/datadome.mdx | 1179 ++++++----------- .../current/captchas/datadome.mdx | 1155 +++++----------- 4 files changed, 1466 insertions(+), 3207 deletions(-) diff --git a/docs/captchas/datadome.mdx b/docs/captchas/datadome.mdx index 6e6f312e..f4258c85 100644 --- a/docs/captchas/datadome.mdx +++ b/docs/captchas/datadome.mdx @@ -325,67 +325,69 @@ https://ru.api.capmonster.cloud/getTaskResult -
- Показать код +
+ Показать код (Node.js + Playwright) ```js -// npm install axios cheerio https-proxy-agent - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { URL } from "url"; -import { HttpsProxyAgent } from "https-proxy-agent"; - -// ====================================================== -// НАСТРОЙКИ -// ====================================================== - -// Включает/выключает подробный вывод логов -// Используется только для удобства разработки и поиска ошибок -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY"; // Укажите ваш API-ключ CapMonster Cloud -const PAGE_URL = "https://www.example.com/"; // Укажите URL страницы, на которой срабатывает DataDome - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port"; - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// ОТЛАДОЧНЫЙ ЛОГГЕР -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// ИЗВЛЕЧЕНИЕ ОБЪЕКТА DD -// ====================================================== - +// npm install cheerio playwright @zennolab_com/capmonstercloud-client +// npx playwright install chromium + +const cheerio = require("cheerio"); +const { chromium } = require("playwright"); + +const { + CapMonsterCloudClientFactory, + ClientOptions, + DataDomeRequest, +} = require("@zennolab_com/capmonstercloud-client"); + +const API_KEY = "YOUR_API_KEY"; // Укажите ваш API-ключ CapMonster Cloud + +const PAGE_URL = "https://example.com/"; // Укажите URL страницы с DataDome + +const USER_AGENT = "userAgentPlaceholder"; + +const BASE_HEADERS = { + accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + pragma: "no-cache", + "sec-ch-ua": + '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +}; + +const PROXY = { + proxyType: "http", + proxyAddress: "127.0.0.1", + proxyPort: 8080, + proxyLogin: "proxy_login", + proxyPassword: "proxy_password", +}; + +/** + * Извлечение параметров DataDome из HTML-кода страницы + * + * @param {string} html + */ function extractDD(html) { const $ = cheerio.load(html); - const scripts = $("script").toArray(); - for (const s of scripts) { - const text = $(s).html(); + for (const script of $("script").toArray()) { + const text = $(script).html(); + if (text && text.includes("var dd=")) { try { const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); + return JSON.parse(raw); - } catch (e) { + } catch { return null; } } @@ -394,13 +396,13 @@ function extractDD(html) { return null; } -// ====================================================== -// СБОР CAPTCHA URL -// ====================================================== - +/** + * Формирование URL CAPTCHA DataDome на основе параметров, + * полученных со страницы + * + * @param {any} dd + */ function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - const params = new URLSearchParams({ initialCid: dd.cid, hash: dd.hsh, @@ -411,883 +413,452 @@ function buildCaptchaUrl(dd) { dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} - -// ====================================================== -// РАБОТА С CAPMONSTER CLOUD -// ====================================================== - -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); - - const { data } = await axios.post(CREATE_TASK, payload); - - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} - -async function waitResult(taskId) { - const start = Date.now(); - - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); - - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... solving"); - continue; - } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); + if (dd.e) { + params.append("e", dd.e); } + + return `https://${dd.host}/captcha/?${params.toString()}`; } -// ====================================================== -// ОСНОВНОЙ SOLVER -// ====================================================== +(async () => { + // Настройка прокси для браузера + // Для браузера и задачи CapMonster Cloud должен использоваться один и тот же прокси + const proxyConfig = { + server: `http://${PROXY.proxyAddress}:${PROXY.proxyPort}`, + username: PROXY.proxyLogin, + password: PROXY.proxyPassword, + }; -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver started (HTTP mode)\n"); + // Запуск Chromium с указанным прокси + const browser = await chromium.launch({ + headless: false, + proxy: proxyConfig, + }); - let agent = null; - let parsedProxy = null; + // Создание браузерного контекста с заданными User-Agent и HTTP-заголовками + const context = await browser.newContext({ + userAgent: USER_AGENT, + extraHTTPHeaders: BASE_HEADERS, + }); - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - agent = new HttpsProxyAgent(PROXY_URL); - } + const page = await context.newPage(); - // 1. Первый запрос - console.log("Opening page..."); - - const response = await axios.get(PAGE_URL, { - headers: { - "User-Agent": USER_AGENT, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Cache-Control": "no-cache", - Pragma: "no-cache", - "Upgrade-Insecure-Requests": "1", - }, - httpsAgent: agent, - proxy: false, // важно при использовании httpsAgent - validateStatus: () => true, + // Открытие защищенной страницы + await page.goto(PAGE_URL, { + waitUntil: "domcontentloaded", }); - const html = response.data; - - log("STATUS", response.status); + // Получение HTML-кода страницы и извлечение параметров DataDome + const html = await page.content(); const dd = extractDD(html); if (!dd) { - console.log("No DataDome detected."); - return; + throw new Error("Параметры DataDome не найдены."); } - log("DD OBJECT", dd); - + // Проверка блокировки прокси DataDome if (dd.t === "bv") { - console.log("Proxy banned. Change proxy."); - return; + throw new Error("Прокси заблокирован DataDome."); } - // 2. Сбор captcha URL + // Формирование полного URL CAPTCHA для передачи в задачу const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); - // 3. Создание задачи в CapMonster Cloud - const task = { - type: "CustomTask", - class: "DataDome", + // Создание клиента CapMonster Cloud + const client = CapMonsterCloudClientFactory.Create( + new ClientOptions({ + clientKey: API_KEY, + }), + ); + + // Проверка текущего баланса аккаунта + const balance = await client.getBalance(); + + console.log("Баланс:", balance); + + // Формирование задачи DataDome для CapMonster Cloud + const request = new DataDomeRequest({ + _class: "DataDome", websiteURL: PAGE_URL, userAgent: USER_AGENT, + proxy: PROXY, metadata: { captchaUrl, datadomeCookie: `datadome=${dd.cookie}`, datadomeVersion: "new", }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } - - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; - - const taskId = await createTask(payload); - - if (!taskId) { - console.log("Failed to create task."); - return; - } - - const solution = await waitResult(taskId); - - log("SOLUTION", solution); - - console.log("\nDataDome solved successfully.\n"); -} - -solveDataDome().catch(console.error); -``` -
- -
- Показать код (Node.js + Playwright) -```js -// npm install axios cheerio playwright - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { chromium } from "playwright"; -import { URL } from "url"; - -// ====================================================== -// НАСТРОЙКИ -// ====================================================== - -// Включает/выключает подробный вывод логов -// Используется только для удобства разработки и поиска ошибок -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY" // Укажите ваш API-ключ CapMonster Cloud -const PAGE_URL = "https://www.example.com/" // Укажите URL страницы, на которой срабатывает DataDome - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port" // Укажите ваш прокси - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// ОТЛАДОЧНЫЙ ЛОГГЕР -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// ИЗВЛЕЧЕНИЕ ОБЪЕКТА DD -// ====================================================== - -function extractDD(html) { - const $ = cheerio.load(html); - const scripts = $("script").toArray(); - - for (const s of scripts) { - const text = $(s).html(); - if (text && text.includes("var dd=")) { - try { - const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); - return JSON.parse(raw); - } catch (e) { - return null; - } - } - } - - return null; -} - -// ====================================================== -// СБОРКА CAPTCHA URL -// ====================================================== - -function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - - const params = new URLSearchParams({ - initialCid: dd.cid, - hash: dd.hsh, - cid: dd.cookie, - t: dd.t, - referer: PAGE_URL, - s: dd.s, - dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} + console.log("Отправка DataDome на решение..."); -// ====================================================== -// РАБОТА С CAPMONSTER CLOUD -// ====================================================== + // Отправка задачи в CapMonster Cloud и ожидание результата + const result = await client.Solve(request); -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); + console.dir(result, { depth: null }); - const { data } = await axios.post(CREATE_TASK, payload); + // ===================================== + // ИЗВЛЕЧЕНИЕ COOKIES ИЗ ОТВЕТА + // CAPMONSTER CLOUD + // ===================================== - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} + const domains = result?.solution?.domains ?? {}; -async function waitResult(taskId) { - const start = Date.now(); + const allCookies = []; - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); + // Преобразование cookies из ответа CapMonster Cloud + // в формат, который принимает Playwright + for (const [domain, data] of Object.entries(domains)) { + const cookies = data?.cookies ?? {}; - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... solving"); - continue; + for (const [name, value] of Object.entries(cookies)) { + allCookies.push({ + name, + value, + domain: ".example.com", // Замените на нужный домен + path: "/", + secure: true, + sameSite: "Lax", + }); } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); } -} - -// ====================================================== -// ОСНОВНОЙ SOLVER (PLAYWRIGHT) -// ====================================================== - -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver started\n"); - - let proxyConfig = null; - let parsedProxy = null; - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - - proxyConfig = { - server: `http://${parsedProxy.hostname}:${parsedProxy.port}`, - username: parsedProxy.username, - password: parsedProxy.password, - }; + if (!allCookies.length) { + throw new Error("CapMonster Cloud не вернул cookies."); } - const browser = await chromium.launch({ - headless: false, - proxy: proxyConfig, - }); + // =============================== + // ПРИМЕНЕНИЕ COOKIES В PLAYWRIGHT + // =============================== - const context = await browser.newContext({ - userAgent: USER_AGENT, - }); + // Получение cookies текущего браузерного контекста + const existingCookies = await context.cookies(); - const page = await context.newPage(); + // Удаление старых cookies DataDome + // для предотвращения конфликта с новым решением + const filtered = existingCookies.filter((c) => { + const name = c.name.toLowerCase(); - console.log("Opening page..."); - await page.goto(PAGE_URL, { waitUntil: "domcontentloaded" }); + return !name.includes("datadome"); + }); - const html = await page.content(); - const dd = extractDD(html); + await context.clearCookies(); - if (!dd) { - console.log("No DataDome detected."); - await browser.close(); - return; + // Возвращение остальных cookies текущей сессии + if (filtered.length) { + await context.addCookies(filtered); } - log("DD OBJECT", dd); + console.log("Старые cookies DataDome удалены."); - if (dd.t === "bv") { - console.log("Proxy banned. Change proxy."); - await browser.close(); - return; - } + // Добавление cookies, полученных от CapMonster Cloud + await context.addCookies(allCookies); - const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); + console.log("Cookies CapMonster Cloud применены:", allCookies); - const task = { - type: "CustomTask", - class: "DataDome", - websiteURL: PAGE_URL, - userAgent: USER_AGENT, - metadata: { - captchaUrl, - datadomeCookie: `datadome=${dd.cookie}`, - datadomeVersion: "new", - }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } + // =============================== + // ПОВТОРНАЯ ЗАГРУЗКА СТРАНИЦЫ + // С НОВЫМИ COOKIES + // =============================== - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; + // Передача полученных cookies вместе с исходными HTTP-заголовками + await context.setExtraHTTPHeaders({ + ...BASE_HEADERS, + cookie: allCookies.map((c) => `${c.name}=${c.value}`).join("; "), + }); - const taskId = await createTask(payload); + // Повторная загрузка страницы с решенной проверкой DataDome + await page.reload({ + waitUntil: "domcontentloaded", + }); - if (!taskId) { - console.log("Failed to create task."); - await browser.close(); - return; - } + console.log("Страница перезагружена с полученными cookies DataDome."); - const solution = await waitResult(taskId); - log("SOLUTION", solution); + await page.waitForTimeout(10000); await browser.close(); -} - -solveDataDome().catch(console.error); +})().catch(console.error); ```
+
- Показать код + Показать код (Python + Playwright) ```python -# pip install requests beautifulsoup4 +# pip install playwright beautifulsoup4 capmonstercloudclient +# playwright install chromium -import time import json -import requests -import urllib.parse # Для разбора и кодирования URL (прокси, параметры captcha) -from bs4 import BeautifulSoup # Для парсинга HTML и извлечения объекта DataDome (var dd) -from urllib.parse import urlparse - - -# ====================================================== -# НАСТРОЙКИ -# ====================================================== +import asyncio +from urllib.parse import urlencode -# Включает/выключает подробный вывод логов -# Используется только для удобства разработки и поиска ошибок -DEBUG = True +from bs4 import BeautifulSoup +from playwright.async_api import async_playwright -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Укажите ваш API-ключ CapMonster Cloud - -PAGE_URL = "https://www.example.com/" # Укажите URL страницы, на которой срабатывает DataDome +from capmonstercloudclient import CapMonsterClient, ClientOptions +from capmonstercloudclient.requests import DataDomeCustomTaskRequest +API_KEY = "YOUR_CAPMONSTER_API_KEY" # Укажите ваш API-ключ CapMonster Cloud +PAGE_URL = "https://example.com/" # Укажите URL страницы с DataDome USER_AGENT = ( "userAgentPlaceholder" ) -PROXY_URL = "http://login:pass@address:port" # Укажите ваш прокси - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# ОТЛАДОЧНЫЙ ЛОГГЕР -# ====================================================== - -def log(title, data=None): - if not DEBUG: - return - - print(f"\n{'='*25} {title} {'='*25}") - - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) - - print("=" * 70) - - -# ====================================================== -# ЗАГОЛОВКИ (МОЖЕТЕ УКАЗАТЬ СВОИ) -# ====================================================== - -def build_headers(first_request=True): - return { - "User-Agent": USER_AGENT, - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate, br", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Cache-Control": "max-age=0", - "DNT": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "none" if first_request else "same-origin", - "Sec-Fetch-User": "?1", - } - - -# ====================================================== -# ПРОКСИ -# ====================================================== - -def build_proxy(proxy_url): - if not proxy_url: - return None, None - - parsed = urlparse(proxy_url) - - proxy_dict = { - "http": proxy_url, - "https": proxy_url - } - - proxy_data = { - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username or "", - "proxyPassword": parsed.password or "" - } +BASE_HEADERS = { + "accept": ( + "text/html,application/xhtml+xml,application/xml;q=0.9," + "image/avif,image/webp,image/apng,*/*;q=0.8" + ), + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + "pragma": "no-cache", + "sec-ch-ua": '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +} - return proxy_dict, proxy_data +PROXY = { + "proxyType": "http", + "proxyAddress": "YOUR_PROXY_ADDRESS", + "proxyPort": 12345, + "proxyLogin": "YOUR_PROXY_LOGIN", + "proxyPassword": "YOUR_PROXY_PASSWORD", +} -# ====================================================== -# ИЗВЛЕЧЕНИЕ ОБЪЕКТА DD -# ====================================================== +def extract_dd(html: str): + """ + Извлечение параметров DataDome из HTML-кода страницы -def extract_dd(html): + :param html: HTML-код страницы + """ soup = BeautifulSoup(html, "html.parser") - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None - - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') - - return json.loads(raw) + for script in soup.find_all("script"): + text = script.string or script.get_text() + if text and "var dd=" in text: + try: + raw = text.split("var dd=")[1].split(";")[0].replace("'", '"') + return json.loads(raw) + except Exception: + return None -# ====================================================== -# СБОР CAPTCHA URL -# ====================================================== + return None def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" - - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + """ + Формирование URL CAPTCHA DataDome на основе параметров, + полученных со страницы + + :param dd: параметры DataDome + """ + params = { + "initialCid": dd.get("cid"), + "hash": dd.get("hsh"), + "cid": dd.get("cookie"), + "t": dd.get("t"), + "referer": PAGE_URL, + "s": dd.get("s"), + "dm": "cd", + } if dd.get("e"): - parts.append(("e", dd["e"])) - - parts.append(("dm", "cd")) - - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) - - return base + "?" + query - - -# ====================================================== -# РЕШЕНИЕ ЧЕРЕЗ CAPMONSTER CLOUD -# ====================================================== - -def create_task(payload): - log("CREATE TASK REQUEST", payload) - - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - - log("CREATE TASK RESPONSE", resp) - - return resp.get("taskId") - - -def wait_result(task_id): - start = time.time() - - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster timeout") - - time.sleep(2) - - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id - }) - - resp = r.json() - - if resp.get("status") == "processing": - print("... solving") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# ОСНОВНОЙ SOLVER -# ====================================================== - -def solve_datadome(): + params["e"] = dd.get("e") - print("\n DataDome → CapMonster solver started\n") + return f"https://{dd.get('host')}/captcha/?{urlencode(params)}" - proxy_dict, proxy_data = build_proxy(PROXY_URL) +def normalize_result(result): + if isinstance(result, dict): + return result - session = requests.Session() + if hasattr(result, "model_dump"): + return result.model_dump() - session.headers.update(build_headers(first_request=True)) + if hasattr(result, "dict"): + return result.dict() - if proxy_dict: - session.proxies.update(proxy_dict) + return result - # -------------------------------------------------- - # 1. Первый запрос - # -------------------------------------------------- +def extract_datadome_cookies(result): + result = normalize_result(result) - print("Opening page...") + print("Результат решения:") + print(json.dumps(result, indent=2, default=str)) - r = session.get(PAGE_URL) + # ===================================== + # ИЗВЛЕЧЕНИЕ COOKIES ИЗ ОТВЕТА + # CAPMONSTER CLOUD + # ===================================== - log("FIRST STATUS", r.status_code) + solution = result.get("solution", result) if isinstance(result, dict) else result - dd = extract_dd(r.text) + domains = {} - if not dd: - print("No DataDome detected") - return + if isinstance(solution, dict): + domains = solution.get("domains") or {} - log("DD OBJECT", dd) + all_cookies = [] - if dd.get("t") == "bv": - print("Proxy banned (t=bv). Change proxy or headers.") - return + # Преобразование cookies из ответа CapMonster Cloud + # в формат, который принимает Playwright + for domain, data in domains.items(): + cookies = data.get("cookies", {}) if isinstance(data, dict) else {} - # -------------------------------------------------- - # 2. Сбор captcha URL - # -------------------------------------------------- - - captcha_url = build_captcha_url(dd) - - log("CAPTCHA URL", captcha_url) - - # -------------------------------------------------- - # 3. Создание задачи в CapMonster Cloud - # -------------------------------------------------- - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } + for name, value in cookies.items(): + all_cookies.append({ + "name": name, + "value": value, + "domain": ".example.com", # Замените на нужный домен + "path": "/", + "secure": True, + "sameSite": "Lax", + }) - if proxy_data: - task.update(proxy_data) + return all_cookies - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task +async def main(): + # Настройка прокси для браузера + # Для браузера и задачи CapMonster Cloud должен использоваться один и тот же прокси + proxy_config = { + "server": f"http://{PROXY['proxyAddress']}:{PROXY['proxyPort']}", + "username": PROXY["proxyLogin"], + "password": PROXY["proxyPassword"], } - task_id = create_task(payload) - - if not task_id: - print("Failed to create task") - return - - # -------------------------------------------------- - # 4. Ожидание решения - # -------------------------------------------------- - - solution = wait_result(task_id) - - log("SOLUTION", solution) - -if __name__ == "__main__": - solve_datadome() -``` -
- -
- Показать код (Python + Playwright) -```python -# pip install requests beautifulsoup4 playwright - -import time -import json -import requests -import urllib.parse # Для кодирования параметров URL (captcha URL) -from bs4 import BeautifulSoup # Для парсинга HTML и извлечения объекта var dd -from urllib.parse import urlparse -from playwright.sync_api import sync_playwright # Для запуска браузера и работы со страницей через Playwright - - -# ====================================================== -# НАСТРОЙКИ -# ====================================================== - -# Включает/выключает подробный вывод логов -# Используется только для удобства разработки и поиска ошибок -DEBUG = True - -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Укажите ваш API-ключ CapMonster Cloud - -PAGE_URL = "https://www.example.com/" # Укажите URL страницы, на которой срабатывает DataDome - -USER_AGENT = ( - "userAgentPlaceholder" -) - -PROXY_URL = "http://login:pass@address:port" # Укажите ваш прокси + async with async_playwright() as p: + # Запуск Chromium с указанным прокси + browser = await p.chromium.launch( + headless=False, + proxy=proxy_config, + ) -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" + # Создание браузерного контекста с заданными User-Agent и HTTP-заголовками + context = await browser.new_context( + user_agent=USER_AGENT, + extra_http_headers=BASE_HEADERS, + ) -MAX_WAIT = 120 + page = await context.new_page() + # Открытие защищенной страницы + await page.goto( + PAGE_URL, + wait_until="domcontentloaded", + ) -# ====================================================== -# ОТЛАДОЧНЫЙ ЛОГГЕР -# ====================================================== + # Получение HTML-кода страницы и извлечение параметров DataDome + html = await page.content() -def log(title, data=None): - if not DEBUG: - return + dd = extract_dd(html) - print(f"\n{'='*25} {title} {'='*25}") + if not dd: + raise Exception("Параметры DataDome не найдены.") - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) + # Проверка блокировки прокси DataDome + if dd.get("t") == "bv": + raise Exception("Прокси заблокирован DataDome.") - print("=" * 70) + # Формирование полного URL CAPTCHA для передачи в задачу + captcha_url = build_captcha_url(dd) + # Создание клиента CapMonster Cloud + client = CapMonsterClient( + options=ClientOptions( + api_key=API_KEY, + ) + ) -# ====================================================== -# ИЗВЛЕЧЕНИЕ ОБЪЕКТА DD -# ====================================================== + # Проверка текущего баланса аккаунта + balance = await client.get_balance() -def extract_dd(html): - soup = BeautifulSoup(html, "html.parser") + print("Баланс:", balance) - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None + # Формирование задачи DataDome для CapMonster Cloud + request = DataDomeCustomTaskRequest( + _class="DataDome", - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') + websiteUrl=PAGE_URL, - return json.loads(raw) + userAgent=USER_AGENT, + proxy=PROXY, -# ====================================================== -# СБОРКА CAPTCHA URL -# ====================================================== + metadata={ + "captchaUrl": captcha_url, + "datadomeCookie": f"datadome={dd.get('cookie')}", + "datadomeVersion": "new", + }, + ) -def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" + print("Отправка DataDome на решение...") - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + # Отправка задачи в CapMonster Cloud и ожидание результата + result = await client.solve_captcha(request) - if dd.get("e"): - parts.append(("e", dd["e"])) + all_cookies = extract_datadome_cookies(result) - parts.append(("dm", "cd")) + if not all_cookies: + raise Exception("CapMonster Cloud не вернул cookies.") - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) + # =============================== + # ПРИМЕНЕНИЕ COOKIES В PLAYWRIGHT + # =============================== - return base + "?" + query + # Получение cookies текущего браузерного контекста + existing_cookies = await context.cookies() + # Удаление старых cookies DataDome + # для предотвращения конфликта с новым решением + filtered = [ + c for c in existing_cookies + if "datadome" not in c.get("name", "").lower() + ] -# ====================================================== -# РАБОТА С CAPMONSTER CLOUD -# ====================================================== + await context.clear_cookies() -def create_task(payload): - log("CREATE TASK REQUEST", payload) - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - log("CREATE TASK RESPONSE", resp) - return resp.get("taskId") + # Возвращение остальных cookies текущей сессии + if filtered: + await context.add_cookies(filtered) + print("Старые cookies DataDome удалены.") -def wait_result(task_id): - start = time.time() + # Добавление cookies, полученных от CapMonster Cloud + await context.add_cookies(all_cookies) - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster timeout") + print("Cookies CapMonster Cloud применены:", all_cookies) - time.sleep(2) + # =============================== + # ПОВТОРНАЯ ЗАГРУЗКА СТРАНИЦЫ + # С НОВЫМИ COOKIES + # =============================== - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id + # Передача полученных cookies вместе с исходными HTTP-заголовками + await context.set_extra_http_headers({ + **BASE_HEADERS, + "cookie": "; ".join( + f"{cookie['name']}={cookie['value']}" for cookie in all_cookies + ), }) - resp = r.json() - - if resp.get("status") == "processing": - print("... solving") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# ОСНОВНОЙ SOLVER (PLAYWRIGHT) -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver (Playwright) started\n") - - proxy = None - if PROXY_URL: - parsed = urlparse(PROXY_URL) - proxy = { - "server": f"http://{parsed.hostname}:{parsed.port}", - "username": parsed.username, - "password": parsed.password - } - - with sync_playwright() as p: - browser = p.chromium.launch(headless=False, proxy=proxy) - context = browser.new_context(user_agent=USER_AGENT) - page = context.new_page() - - print("Opening page in real browser...") - page.goto(PAGE_URL, wait_until="domcontentloaded") - - html = page.content() - - log("FIRST PAGE LOADED") - - dd = extract_dd(html) - - if not dd: - print("No DataDome detected") - browser.close() - return - - log("DD OBJECT", dd) - - if dd.get("t") == "bv": - print("Proxy banned (t=bv). Change proxy.") - browser.close() - return - - captcha_url = build_captcha_url(dd) - log("CAPTCHA URL", captcha_url) - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } - - if PROXY_URL: - task.update({ - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username, - "proxyPassword": parsed.password - }) - - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task - } - - task_id = create_task(payload) - - if not task_id: - print("Failed to create task") - browser.close() - return + # Повторная загрузка страницы с решенной проверкой DataDome + await page.reload( + wait_until="domcontentloaded", + ) - solution = wait_result(task_id) - log("SOLUTION", solution) + print("Страница перезагружена с полученными cookies DataDome.") - browser.close() + await page.wait_for_timeout(10000) + await browser.close() -if __name__ == "__main__": - solve_datadome() +asyncio.run(main()) ```
diff --git a/i18n/en/docusaurus-plugin-content-docs/current/captchas/datadome.mdx b/i18n/en/docusaurus-plugin-content-docs/current/captchas/datadome.mdx index 65d2882f..a83b2fc5 100644 --- a/i18n/en/docusaurus-plugin-content-docs/current/captchas/datadome.mdx +++ b/i18n/en/docusaurus-plugin-content-docs/current/captchas/datadome.mdx @@ -295,67 +295,69 @@ Since websites differ in protection mechanisms, request structures, and paramete -
- Show code +
+ Show code (Node.js + Playwright) ```js -// npm install axios cheerio https-proxy-agent - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { URL } from "url"; -import { HttpsProxyAgent } from "https-proxy-agent"; - -// ====================================================== -// SETTINGS -// ====================================================== - -// Enables/disables detailed logging output -// Used only for development convenience and debugging -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key -const PAGE_URL = "https://www.example.com/"; // Specify the URL of the page where DataDome is triggered - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port"; - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// DEBUG LOGGER -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// DD OBJECT EXTRACTION -// ====================================================== - +// npm install cheerio playwright @zennolab_com/capmonstercloud-client +// npx playwright install chromium + +const cheerio = require("cheerio"); +const { chromium } = require("playwright"); + +const { + CapMonsterCloudClientFactory, + ClientOptions, + DataDomeRequest, +} = require("@zennolab_com/capmonstercloud-client"); + +const API_KEY = "YOUR_API_KEY"; // Enter your CapMonster Cloud API key + +const PAGE_URL = "https://example.com/"; // Enter the URL of the page with DataDome + +const USER_AGENT = "userAgentPlaceholder"; + +const BASE_HEADERS = { + accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + pragma: "no-cache", + "sec-ch-ua": + '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +}; + +const PROXY = { + proxyType: "http", + proxyAddress: "127.0.0.1", + proxyPort: 8080, + proxyLogin: "proxy_login", + proxyPassword: "proxy_password", +}; + +/** + * Extract DataDome parameters from the page HTML. + * + * @param {string} html + */ function extractDD(html) { const $ = cheerio.load(html); - const scripts = $("script").toArray(); - for (const s of scripts) { - const text = $(s).html(); + for (const script of $("script").toArray()) { + const text = $(script).html(); + if (text && text.includes("var dd=")) { try { const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); + return JSON.parse(raw); - } catch (e) { + } catch { return null; } } @@ -364,13 +366,13 @@ function extractDD(html) { return null; } -// ====================================================== -// CAPTCHA URL BUILDING -// ====================================================== - +/** + * Build the DataDome CAPTCHA URL using the parameters + * obtained from the page. + * + * @param {any} dd + */ function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - const params = new URLSearchParams({ initialCid: dd.cid, hash: dd.hsh, @@ -381,883 +383,447 @@ function buildCaptchaUrl(dd) { dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} - -// ====================================================== -// WORKING WITH CAPMONSTER CLOUD -// ====================================================== - -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); - - const { data } = await axios.post(CREATE_TASK, payload); - - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} - -async function waitResult(taskId) { - const start = Date.now(); - - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); - - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... solving"); - continue; - } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); + if (dd.e) { + params.append("e", dd.e); } + + return `https://${dd.host}/captcha/?${params.toString()}`; } -// ====================================================== -// MAIN SOLVER -// ====================================================== +(async () => { + // Configure the proxy for the browser. + // The browser and the CapMonster Cloud task must use the same proxy. + const proxyConfig = { + server: `http://${PROXY.proxyAddress}:${PROXY.proxyPort}`, + username: PROXY.proxyLogin, + password: PROXY.proxyPassword, + }; -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver started (HTTP mode)\n"); + // Launch Chromium with the specified proxy. + const browser = await chromium.launch({ + headless: false, + proxy: proxyConfig, + }); - let agent = null; - let parsedProxy = null; + // Create a browser context with the specified User-Agent and HTTP headers. + const context = await browser.newContext({ + userAgent: USER_AGENT, + extraHTTPHeaders: BASE_HEADERS, + }); - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - agent = new HttpsProxyAgent(PROXY_URL); - } + const page = await context.newPage(); - // 1. First request - console.log("Opening page..."); - - const response = await axios.get(PAGE_URL, { - headers: { - "User-Agent": USER_AGENT, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Cache-Control": "no-cache", - Pragma: "no-cache", - "Upgrade-Insecure-Requests": "1", - }, - httpsAgent: agent, - proxy: false, // important when using httpsAgent - validateStatus: () => true, + // Open the protected page. + await page.goto(PAGE_URL, { + waitUntil: "domcontentloaded", }); - const html = response.data; - - log("STATUS", response.status); + // Get the page HTML and extract DataDome parameters. + const html = await page.content(); const dd = extractDD(html); if (!dd) { - console.log("No DataDome detected."); - return; + throw new Error("DataDome parameters were not found."); } - log("DD OBJECT", dd); - + // Check whether the proxy has been blocked by DataDome. if (dd.t === "bv") { - console.log("Proxy banned. Change proxy."); - return; + throw new Error("Proxy blocked by DataDome."); } - // 2. Build captcha URL + // Build the complete CAPTCHA URL for the task. const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); - // 3. Create task in CapMonster Cloud - const task = { - type: "CustomTask", - class: "DataDome", + // Create the CapMonster Cloud client. + const client = CapMonsterCloudClientFactory.Create( + new ClientOptions({ + clientKey: API_KEY, + }), + ); + + // Check the current account balance. + const balance = await client.getBalance(); + + console.log("Balance:", balance); + + // Create the DataDome task for CapMonster Cloud. + const request = new DataDomeRequest({ + _class: "DataDome", websiteURL: PAGE_URL, userAgent: USER_AGENT, + proxy: PROXY, metadata: { captchaUrl, datadomeCookie: `datadome=${dd.cookie}`, datadomeVersion: "new", }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } - - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; - - const taskId = await createTask(payload); - - if (!taskId) { - console.log("Failed to create task."); - return; - } - - const solution = await waitResult(taskId); - - log("SOLUTION", solution); - - console.log("\nDataDome solved successfully.\n"); -} - -solveDataDome().catch(console.error); -``` -
- -
- Show code (Node.js + Playwright) -```js -// npm install axios cheerio playwright - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { chromium } from "playwright"; -import { URL } from "url"; - -// ====================================================== -// SETTINGS -// ====================================================== - -// Enables/disables detailed logging output -// Used only for development convenience and debugging -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY" // Specify your CapMonster Cloud API key -const PAGE_URL = "https://www.example.com/" // Specify the URL of the page where DataDome is triggered - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port" // Specify your proxy - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// DEBUG LOGGER -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// DD OBJECT EXTRACTION -// ====================================================== - -function extractDD(html) { - const $ = cheerio.load(html); - const scripts = $("script").toArray(); - - for (const s of scripts) { - const text = $(s).html(); - if (text && text.includes("var dd=")) { - try { - const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); - return JSON.parse(raw); - } catch (e) { - return null; - } - } - } - - return null; -} - -// ====================================================== -// CAPTCHA URL BUILDING -// ====================================================== - -function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - - const params = new URLSearchParams({ - initialCid: dd.cid, - hash: dd.hsh, - cid: dd.cookie, - t: dd.t, - referer: PAGE_URL, - s: dd.s, - dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} + console.log("Sending DataDome task for solving..."); -// ====================================================== -// WORKING WITH CAPMONSTER CLOUD -// ====================================================== + // Send the task to CapMonster Cloud and wait for the result. + const result = await client.Solve(request); -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); + console.dir(result, { depth: null }); - const { data } = await axios.post(CREATE_TASK, payload); + // ===================================== + // EXTRACT COOKIES FROM THE + // CAPMONSTER CLOUD RESPONSE + // ===================================== - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} + const domains = result?.solution?.domains ?? {}; -async function waitResult(taskId) { - const start = Date.now(); + const allCookies = []; - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); + // Convert cookies from the CapMonster Cloud response + // into the format accepted by Playwright. + for (const [domain, data] of Object.entries(domains)) { + const cookies = data?.cookies ?? {}; - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... solving"); - continue; + for (const [name, value] of Object.entries(cookies)) { + allCookies.push({ + name, + value, + domain: ".example.com", // Replace with the required domain + path: "/", + secure: true, + sameSite: "Lax", + }); } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); } -} - -// ====================================================== -// MAIN SOLVER (PLAYWRIGHT) -// ====================================================== - -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver started\n"); - let proxyConfig = null; - let parsedProxy = null; - - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - - proxyConfig = { - server: `http://${parsedProxy.hostname}:${parsedProxy.port}`, - username: parsedProxy.username, - password: parsedProxy.password, - }; + if (!allCookies.length) { + throw new Error("CapMonster Cloud did not return any cookies."); } - const browser = await chromium.launch({ - headless: false, - proxy: proxyConfig, - }); + // =============================== + // APPLY COOKIES IN PLAYWRIGHT + // =============================== - const context = await browser.newContext({ - userAgent: USER_AGENT, - }); + // Get cookies from the current browser context. + const existingCookies = await context.cookies(); - const page = await context.newPage(); + // Remove existing DataDome cookies + // to prevent conflicts with the new solution. + const filtered = existingCookies.filter((c) => { + const name = c.name.toLowerCase(); - console.log("Opening page..."); - await page.goto(PAGE_URL, { waitUntil: "domcontentloaded" }); + return !name.includes("datadome"); + }); - const html = await page.content(); - const dd = extractDD(html); + await context.clearCookies(); - if (!dd) { - console.log("No DataDome detected."); - await browser.close(); - return; + // Restore the remaining cookies from the current session. + if (filtered.length) { + await context.addCookies(filtered); } - log("DD OBJECT", dd); + console.log("Old DataDome cookies removed."); - if (dd.t === "bv") { - console.log("Proxy banned. Change proxy."); - await browser.close(); - return; - } - - const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); + // Add cookies received from CapMonster Cloud. + await context.addCookies(allCookies); - const task = { - type: "CustomTask", - class: "DataDome", - websiteURL: PAGE_URL, - userAgent: USER_AGENT, - metadata: { - captchaUrl, - datadomeCookie: `datadome=${dd.cookie}`, - datadomeVersion: "new", - }, - }; + console.log("CapMonster Cloud cookies applied:", allCookies); - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } + // =============================== + // RELOAD THE PAGE + // WITH THE NEW COOKIES + // =============================== - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; + // Send the received cookies along with the original HTTP headers. + await context.setExtraHTTPHeaders({ + ...BASE_HEADERS, + cookie: allCookies.map((c) => `${c.name}=${c.value}`).join("; "), + }); - const taskId = await createTask(payload); + // Reload the page with the solved DataDome cookies. + await page.reload({ + waitUntil: "domcontentloaded", + }); - if (!taskId) { - console.log("Failed to create task."); - await browser.close(); - return; - } + console.log("Page reloaded with the received DataDome cookies."); - const solution = await waitResult(taskId); - log("SOLUTION", solution); + await page.waitForTimeout(10000); await browser.close(); -} - -solveDataDome().catch(console.error); +})().catch(console.error); ```
+
- Show code + Show code (Python + Playwright) ```python -# pip install requests beautifulsoup4 +# pip install playwright beautifulsoup4 capmonstercloudclient +# playwright install chromium -import time import json -import requests -import urllib.parse # For parsing and encoding URLs (proxy, captcha parameters) -from bs4 import BeautifulSoup # For parsing HTML and extracting the DataDome object (var dd) -from urllib.parse import urlparse - +import asyncio +from urllib.parse import urlencode -# ====================================================== -# SETTINGS -# ====================================================== +from bs4 import BeautifulSoup +from playwright.async_api import async_playwright -# Enables/disables detailed logging output -# Used only for development convenience and debugging -DEBUG = True - -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Specify your CapMonster Cloud API key - -PAGE_URL = "https://www.example.com/" # Specify the URL of the page where DataDome is triggered +from capmonstercloudclient import CapMonsterClient, ClientOptions +from capmonstercloudclient.requests import DataDomeCustomTaskRequest +API_KEY = "YOUR_CAPMONSTER_API_KEY" # Enter your CapMonster Cloud API key +PAGE_URL = "https://example.com/" # Enter the URL of the page with DataDome USER_AGENT = ( "userAgentPlaceholder" ) -PROXY_URL = "http://login:pass@address:port" # Specify your proxy - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# DEBUG LOGGER -# ====================================================== - -def log(title, data=None): - if not DEBUG: - return - - print(f"\n{'='*25} {title} {'='*25}") - - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) - - print("=" * 70) - - -# ====================================================== -# HEADERS (YOU CAN SPECIFY YOUR OWN) -# ====================================================== - -def build_headers(first_request=True): - return { - "User-Agent": USER_AGENT, - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate, br", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Cache-Control": "max-age=0", - "DNT": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "none" if first_request else "same-origin", - "Sec-Fetch-User": "?1", - } - - -# ====================================================== -# PROXY -# ====================================================== - -def build_proxy(proxy_url): - if not proxy_url: - return None, None - - parsed = urlparse(proxy_url) - - proxy_dict = { - "http": proxy_url, - "https": proxy_url - } - - proxy_data = { - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username or "", - "proxyPassword": parsed.password or "" - } - - return proxy_dict, proxy_data +BASE_HEADERS = { + "accept": ( + "text/html,application/xhtml+xml,application/xml;q=0.9," + "image/avif,image/webp,image/apng,*/*;q=0.8" + ), + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + "pragma": "no-cache", + "sec-ch-ua": '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +} +PROXY = { + "proxyType": "http", + "proxyAddress": "YOUR_PROXY_ADDRESS", + "proxyPort": 12345, + "proxyLogin": "YOUR_PROXY_LOGIN", + "proxyPassword": "YOUR_PROXY_PASSWORD", +} -# ====================================================== -# DD OBJECT EXTRACTION -# ====================================================== +def extract_dd(html: str): + """ + Extract DataDome parameters from the page HTML. -def extract_dd(html): + :param html: Page HTML + """ soup = BeautifulSoup(html, "html.parser") - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None - - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') - - return json.loads(raw) + for script in soup.find_all("script"): + text = script.string or script.get_text() + if text and "var dd=" in text: + try: + raw = text.split("var dd=")[1].split(";")[0].replace("'", '"') + return json.loads(raw) + except Exception: + return None -# ====================================================== -# CAPTCHA URL BUILDING -# ====================================================== + return None def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" - - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + """ + Build the DataDome CAPTCHA URL using the parameters + obtained from the page. + + :param dd: DataDome parameters + """ + params = { + "initialCid": dd.get("cid"), + "hash": dd.get("hsh"), + "cid": dd.get("cookie"), + "t": dd.get("t"), + "referer": PAGE_URL, + "s": dd.get("s"), + "dm": "cd", + } if dd.get("e"): - parts.append(("e", dd["e"])) - - parts.append(("dm", "cd")) - - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) - - return base + "?" + query - - -# ====================================================== -# SOLVING VIA CAPMONSTER CLOUD -# ====================================================== - -def create_task(payload): - log("CREATE TASK REQUEST", payload) - - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - - log("CREATE TASK RESPONSE", resp) - - return resp.get("taskId") + params["e"] = dd.get("e") + return f"https://{dd.get('host')}/captcha/?{urlencode(params)}" -def wait_result(task_id): - start = time.time() +def normalize_result(result): + if isinstance(result, dict): + return result - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster timeout") + if hasattr(result, "model_dump"): + return result.model_dump() - time.sleep(2) + if hasattr(result, "dict"): + return result.dict() - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id - }) - - resp = r.json() - - if resp.get("status") == "processing": - print("... solving") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# MAIN SOLVER -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver started\n") - - proxy_dict, proxy_data = build_proxy(PROXY_URL) + return result - session = requests.Session() +def extract_datadome_cookies(result): + result = normalize_result(result) - session.headers.update(build_headers(first_request=True)) + print("Solution result:") + print(json.dumps(result, indent=2, default=str)) - if proxy_dict: - session.proxies.update(proxy_dict) + # ===================================== + # EXTRACT COOKIES FROM THE + # CAPMONSTER CLOUD RESPONSE + # ===================================== - # -------------------------------------------------- - # 1. First request - # -------------------------------------------------- + solution = result.get("solution", result) if isinstance(result, dict) else result - print("Opening page...") + domains = {} - r = session.get(PAGE_URL) + if isinstance(solution, dict): + domains = solution.get("domains") or {} - log("FIRST STATUS", r.status_code) + all_cookies = [] - dd = extract_dd(r.text) + # Convert cookies from the CapMonster Cloud response + # into the format accepted by Playwright. + for domain, data in domains.items(): + cookies = data.get("cookies", {}) if isinstance(data, dict) else {} - if not dd: - print("No DataDome detected") - return - - log("DD OBJECT", dd) - - if dd.get("t") == "bv": - print("Proxy banned (t=bv). Change proxy or headers.") - return - - # -------------------------------------------------- - # 2. Build captcha URL - # -------------------------------------------------- - - captcha_url = build_captcha_url(dd) - - log("CAPTCHA URL", captcha_url) - - # -------------------------------------------------- - # 3. Create task in CapMonster Cloud - # -------------------------------------------------- - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } + for name, value in cookies.items(): + all_cookies.append({ + "name": name, + "value": value, + "domain": ".example.com", # Replace with the required domain + "path": "/", + "secure": True, + "sameSite": "Lax", + }) - if proxy_data: - task.update(proxy_data) + return all_cookies - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task +async def main(): + # Configure the browser proxy. + # The browser and the CapMonster Cloud task must use the same proxy. + proxy_config = { + "server": f"http://{PROXY['proxyAddress']}:{PROXY['proxyPort']}", + "username": PROXY["proxyLogin"], + "password": PROXY["proxyPassword"], } - task_id = create_task(payload) - - if not task_id: - print("Failed to create task") - return - - # -------------------------------------------------- - # 4. Waiting for solution - # -------------------------------------------------- - - solution = wait_result(task_id) - - log("SOLUTION", solution) - -if __name__ == "__main__": - solve_datadome() -``` -
- -
- Show code (Python + Playwright) -```python -# pip install requests beautifulsoup4 playwright - -import time -import json -import requests -import urllib.parse # For encoding URL parameters (captcha URL) -from bs4 import BeautifulSoup # For parsing HTML and extracting the var dd object -from urllib.parse import urlparse -from playwright.sync_api import sync_playwright # For launching the browser and working with the page via Playwright - - -# ====================================================== -# SETTINGS -# ====================================================== - -# Enables/disables detailed logging output -# Used only for development convenience and debugging -DEBUG = True - -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Specify your CapMonster Cloud API key - -PAGE_URL = "https://www.example.com/" # Specify the URL of the page where DataDome is triggered - -USER_AGENT = ( - "userAgentPlaceholder" -) - -PROXY_URL = "http://login:pass@address:port" # Specify your proxy - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# DEBUG LOGGER -# ====================================================== + async with async_playwright() as p: + # Launch Chromium with the specified proxy. + browser = await p.chromium.launch( + headless=False, + proxy=proxy_config, + ) -def log(title, data=None): - if not DEBUG: - return + # Create a browser context with the specified User-Agent and HTTP headers. + context = await browser.new_context( + user_agent=USER_AGENT, + extra_http_headers=BASE_HEADERS, + ) - print(f"\n{'='*25} {title} {'='*25}") + page = await context.new_page() - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) + # Open the protected page. + await page.goto( + PAGE_URL, + wait_until="domcontentloaded", + ) - print("=" * 70) + # Get the page HTML and extract DataDome parameters. + html = await page.content() + dd = extract_dd(html) -# ====================================================== -# DD OBJECT EXTRACTION -# ====================================================== + if not dd: + raise Exception("DataDome parameters were not found.") -def extract_dd(html): - soup = BeautifulSoup(html, "html.parser") + # Check whether the proxy has been blocked by DataDome. + if dd.get("t") == "bv": + raise Exception("Proxy blocked by DataDome.") - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None + # Build the complete CAPTCHA URL for the task. + captcha_url = build_captcha_url(dd) - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') + # Create the CapMonster Cloud client. + client = CapMonsterClient( + options=ClientOptions( + api_key=API_KEY, + ) + ) - return json.loads(raw) + # Check the current account balance. + balance = await client.get_balance() + print("Balance:", balance) -# ====================================================== -# CAPTCHA URL BUILDING -# ====================================================== + # Create the DataDome task for CapMonster Cloud. + request = DataDomeCustomTaskRequest( + _class="DataDome", + websiteUrl=PAGE_URL, + userAgent=USER_AGENT, + proxy=PROXY, + metadata={ + "captchaUrl": captcha_url, + "datadomeCookie": f"datadome={dd.get('cookie')}", + "datadomeVersion": "new", + }, + ) -def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" + print("Sending DataDome task for solving...") - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + # Send the task to CapMonster Cloud and wait for the result. + result = await client.solve_captcha(request) - if dd.get("e"): - parts.append(("e", dd["e"])) + all_cookies = extract_datadome_cookies(result) - parts.append(("dm", "cd")) + if not all_cookies: + raise Exception("CapMonster Cloud did not return any cookies.") - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) + # =============================== + # APPLY COOKIES IN PLAYWRIGHT + # =============================== - return base + "?" + query + # Get cookies from the current browser context. + existing_cookies = await context.cookies() + # Remove existing DataDome cookies + # to prevent conflicts with the new solution. + filtered = [ + c for c in existing_cookies + if "datadome" not in c.get("name", "").lower() + ] -# ====================================================== -# WORKING WITH CAPMONSTER CLOUD -# ====================================================== + await context.clear_cookies() -def create_task(payload): - log("CREATE TASK REQUEST", payload) - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - log("CREATE TASK RESPONSE", resp) - return resp.get("taskId") + # Restore the remaining cookies from the current session. + if filtered: + await context.add_cookies(filtered) + print("Old DataDome cookies removed.") -def wait_result(task_id): - start = time.time() + # Add cookies received from CapMonster Cloud. + await context.add_cookies(all_cookies) - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster timeout") + print("CapMonster Cloud cookies applied:", all_cookies) - time.sleep(2) + # =============================== + # RELOAD THE PAGE + # WITH THE NEW COOKIES + # =============================== - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id + # Send the received cookies along with the original HTTP headers. + await context.set_extra_http_headers({ + **BASE_HEADERS, + "cookie": "; ".join( + f"{cookie['name']}={cookie['value']}" for cookie in all_cookies + ), }) - resp = r.json() - - if resp.get("status") == "processing": - print("... solving") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# MAIN SOLVER (PLAYWRIGHT) -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver (Playwright) started\n") - - proxy = None - if PROXY_URL: - parsed = urlparse(PROXY_URL) - proxy = { - "server": f"http://{parsed.hostname}:{parsed.port}", - "username": parsed.username, - "password": parsed.password - } - - with sync_playwright() as p: - browser = p.chromium.launch(headless=False, proxy=proxy) - context = browser.new_context(user_agent=USER_AGENT) - page = context.new_page() - - print("Opening page in real browser...") - page.goto(PAGE_URL, wait_until="domcontentloaded") - - html = page.content() - - log("FIRST PAGE LOADED") - - dd = extract_dd(html) - - if not dd: - print("No DataDome detected") - browser.close() - return - - log("DD OBJECT", dd) - - if dd.get("t") == "bv": - print("Proxy banned (t=bv). Change proxy.") - browser.close() - return - - captcha_url = build_captcha_url(dd) - log("CAPTCHA URL", captcha_url) - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } - - if PROXY_URL: - task.update({ - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username, - "proxyPassword": parsed.password - }) - - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task - } - - task_id = create_task(payload) - - if not task_id: - print("Failed to create task") - browser.close() - return + # Reload the page with the solved DataDome cookies. + await page.reload( + wait_until="domcontentloaded", + ) - solution = wait_result(task_id) - log("SOLUTION", solution) + print("Page reloaded with the received DataDome cookies.") - browser.close() + await page.wait_for_timeout(10000) + await browser.close() -if __name__ == "__main__": - solve_datadome() +asyncio.run(main()) ```
diff --git a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/datadome.mdx b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/datadome.mdx index bd12412f..c83b3c25 100644 --- a/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/datadome.mdx +++ b/i18n/pt-br/docusaurus-plugin-content-docs/current/captchas/datadome.mdx @@ -295,66 +295,68 @@ Como os sites diferem em seus mecanismos de proteção, estrutura de requisiçõ
- Mostrar código + Mostrar código (Node.js + Playwright) ```js -// npm install axios cheerio https-proxy-agent - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { URL } from "url"; -import { HttpsProxyAgent } from "https-proxy-agent"; - -// ====================================================== -// CONFIGURAÇÕES -// ====================================================== - -// Ativa/desativa logs detalhados -// Usado apenas para conveniência durante o desenvolvimento e depuração -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY"; // Especifique sua chave de API do CapMonster Cloud -const PAGE_URL = "https://www.example.com/"; // Especifique a URL da página onde o DataDome é acionado - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port"; - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// LOGGER DE DEPURAÇÃO -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// EXTRAÇÃO DO OBJETO DD -// ====================================================== - +// npm install cheerio playwright @zennolab_com/capmonstercloud-client +// npx playwright install chromium + +const cheerio = require("cheerio"); +const { chromium } = require("playwright"); + +const { + CapMonsterCloudClientFactory, + ClientOptions, + DataDomeRequest, +} = require("@zennolab_com/capmonstercloud-client"); + +const API_KEY = "YOUR_API_KEY"; // Insira sua chave da API do CapMonster Cloud + +const PAGE_URL = "https://example.com/"; // Insira a URL da página protegida pelo DataDome + +const USER_AGENT = "userAgentPlaceholder"; + +const BASE_HEADERS = { + accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + pragma: "no-cache", + "sec-ch-ua": + '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +}; + +const PROXY = { + proxyType: "http", + proxyAddress: "127.0.0.1", + proxyPort: 8080, + proxyLogin: "proxy_login", + proxyPassword: "proxy_password", +}; + +/** + * Extrai os parâmetros do DataDome do HTML da página + * + * @param {string} html + */ function extractDD(html) { const $ = cheerio.load(html); - const scripts = $("script").toArray(); - for (const s of scripts) { - const text = $(s).html(); + for (const script of $("script").toArray()) { + const text = $(script).html(); + if (text && text.includes("var dd=")) { try { const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); + return JSON.parse(raw); - } catch (e) { + } catch { return null; } } @@ -363,13 +365,13 @@ function extractDD(html) { return null; } -// ====================================================== -// MONTAGEM DA CAPTCHA URL -// ====================================================== - +/** + * Gera a URL do CAPTCHA do DataDome usando os parâmetros + * extraídos da página + * + * @param {any} dd + */ function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - const params = new URLSearchParams({ initialCid: dd.cid, hash: dd.hsh, @@ -380,886 +382,447 @@ function buildCaptchaUrl(dd) { dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} - -// ====================================================== -// TRABALHANDO COM CAPMONSTER CLOUD -// ====================================================== - -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); - - const { data } = await axios.post(CREATE_TASK, payload); - - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} - -async function waitResult(taskId) { - const start = Date.now(); - - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); - - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... solving"); - continue; - } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); + if (dd.e) { + params.append("e", dd.e); } + + return `https://${dd.host}/captcha/?${params.toString()}`; } -// ====================================================== -// SOLVER PRINCIPAL -// ====================================================== +(async () => { + // Configura o proxy para o navegador + // O navegador e a tarefa do CapMonster Cloud devem usar o mesmo proxy + const proxyConfig = { + server: `http://${PROXY.proxyAddress}:${PROXY.proxyPort}`, + username: PROXY.proxyLogin, + password: PROXY.proxyPassword, + }; -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver started (HTTP mode)\n"); + // Inicia o Chromium com o proxy especificado + const browser = await chromium.launch({ + headless: false, + proxy: proxyConfig, + }); - let agent = null; - let parsedProxy = null; + // Cria um contexto do navegador com o User-Agent e os cabeçalhos HTTP definidos + const context = await browser.newContext({ + userAgent: USER_AGENT, + extraHTTPHeaders: BASE_HEADERS, + }); - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - agent = new HttpsProxyAgent(PROXY_URL); - } + const page = await context.newPage(); - // 1. Primeira requisição - console.log("Opening page..."); - - const response = await axios.get(PAGE_URL, { - headers: { - "User-Agent": USER_AGENT, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Cache-Control": "no-cache", - Pragma: "no-cache", - "Upgrade-Insecure-Requests": "1", - }, - httpsAgent: agent, - proxy: false, // importante ao usar httpsAgent - validateStatus: () => true, + // Abre a página protegida + await page.goto(PAGE_URL, { + waitUntil: "domcontentloaded", }); - const html = response.data; - - log("STATUS", response.status); + // Obtém o HTML da página e extrai os parâmetros do DataDome + const html = await page.content(); const dd = extractDD(html); if (!dd) { - console.log("No DataDome detected."); - return; + throw new Error("Parâmetros do DataDome não encontrados."); } - log("DD OBJECT", dd); - + // Verifica se o proxy foi bloqueado pelo DataDome if (dd.t === "bv") { - console.log("Proxy banned. Change proxy."); - return; + throw new Error("Proxy bloqueado pelo DataDome."); } - // 2. Montagem da captcha URL + // Gera a URL completa do CAPTCHA para enviar na tarefa const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); - // 3. Criação da tarefa no CapMonster Cloud - const task = { - type: "CustomTask", - class: "DataDome", + // Cria o cliente do CapMonster Cloud + const client = CapMonsterCloudClientFactory.Create( + new ClientOptions({ + clientKey: API_KEY, + }), + ); + + // Verifica o saldo atual da conta + const balance = await client.getBalance(); + + console.log("Saldo:", balance); + + // Cria a tarefa do DataDome para o CapMonster Cloud + const request = new DataDomeRequest({ + _class: "DataDome", websiteURL: PAGE_URL, userAgent: USER_AGENT, + proxy: PROXY, metadata: { captchaUrl, datadomeCookie: `datadome=${dd.cookie}`, datadomeVersion: "new", }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } - - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; - - const taskId = await createTask(payload); - - if (!taskId) { - console.log("Failed to create task."); - return; - } - - const solution = await waitResult(taskId); - - log("SOLUTION", solution); - - console.log("\nDataDome solved successfully.\n"); -} - -solveDataDome().catch(console.error); -``` - -
- -
- Mostrar código (Node.js + Playwright) -```js -// npm install axios cheerio playwright - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { chromium } from "playwright"; -import { URL } from "url"; - -// ====================================================== -// CONFIGURAÇÕES -// ====================================================== - -// Ativa/desativa saída detalhada de logs -// Usado apenas para conveniência no desenvolvimento e depuração -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY" // Informe sua chave de API do CapMonster Cloud -const PAGE_URL = "https://www.example.com/" // Informe a URL da página onde o DataDome é acionado - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port" // Informe seu proxy - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// LOGGER DE DEPURAÇÃO -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// EXTRAÇÃO DO OBJETO DD -// ====================================================== - -function extractDD(html) { - const $ = cheerio.load(html); - const scripts = $("script").toArray(); - - for (const s of scripts) { - const text = $(s).html(); - if (text && text.includes("var dd=")) { - try { - const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); - return JSON.parse(raw); - } catch (e) { - return null; - } - } - } - - return null; -} - -// ====================================================== -// MONTAGEM DA URL DA CAPTCHA -// ====================================================== - -function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - - const params = new URLSearchParams({ - initialCid: dd.cid, - hash: dd.hsh, - cid: dd.cookie, - t: dd.t, - referer: PAGE_URL, - s: dd.s, - dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} + console.log("Enviando a tarefa do DataDome para resolução..."); -// ====================================================== -// TRABALHANDO COM CAPMONSTER CLOUD -// ====================================================== + // Envia a tarefa para o CapMonster Cloud e aguarda o resultado + const result = await client.Solve(request); -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); + console.dir(result, { depth: null }); - const { data } = await axios.post(CREATE_TASK, payload); + // ===================================== + // EXTRAÇÃO DOS COOKIES DA RESPOSTA + // DO CAPMONSTER CLOUD + // ===================================== - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} + const domains = result?.solution?.domains ?? {}; -async function waitResult(taskId) { - const start = Date.now(); + const allCookies = []; - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); + // Converte os cookies da resposta do CapMonster Cloud + // para o formato aceito pelo Playwright + for (const [domain, data] of Object.entries(domains)) { + const cookies = data?.cookies ?? {}; - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... resolvendo"); - continue; + for (const [name, value] of Object.entries(cookies)) { + allCookies.push({ + name, + value, + domain: ".example.com", // Substitua pelo domínio necessário + path: "/", + secure: true, + sameSite: "Lax", + }); } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); } -} - -// ====================================================== -// SOLVER PRINCIPAL (PLAYWRIGHT) -// ====================================================== - -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver iniciado\n"); - let proxyConfig = null; - let parsedProxy = null; - - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - - proxyConfig = { - server: `http://${parsedProxy.hostname}:${parsedProxy.port}`, - username: parsedProxy.username, - password: parsedProxy.password, - }; + if (!allCookies.length) { + throw new Error("O CapMonster Cloud não retornou cookies."); } - const browser = await chromium.launch({ - headless: false, - proxy: proxyConfig, - }); + // =============================== + // APLICA OS COOKIES NO PLAYWRIGHT + // =============================== - const context = await browser.newContext({ - userAgent: USER_AGENT, - }); + // Obtém os cookies do contexto atual do navegador + const existingCookies = await context.cookies(); - const page = await context.newPage(); + // Remove os cookies antigos do DataDome + // para evitar conflitos com a nova solução + const filtered = existingCookies.filter((c) => { + const name = c.name.toLowerCase(); - console.log("Abrindo página..."); - await page.goto(PAGE_URL, { waitUntil: "domcontentloaded" }); + return !name.includes("datadome"); + }); - const html = await page.content(); - const dd = extractDD(html); + await context.clearCookies(); - if (!dd) { - console.log("DataDome não detectado."); - await browser.close(); - return; + // Restaura os demais cookies da sessão atual + if (filtered.length) { + await context.addCookies(filtered); } - log("DD OBJECT", dd); + console.log("Cookies antigos do DataDome removidos."); - if (dd.t === "bv") { - console.log("Proxy banido. Troque o proxy."); - await browser.close(); - return; - } + // Adiciona os cookies recebidos do CapMonster Cloud + await context.addCookies(allCookies); - const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); + console.log("Cookies do CapMonster Cloud aplicados:", allCookies); - const task = { - type: "CustomTask", - class: "DataDome", - websiteURL: PAGE_URL, - userAgent: USER_AGENT, - metadata: { - captchaUrl, - datadomeCookie: `datadome=${dd.cookie}`, - datadomeVersion: "new", - }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } + // =============================== + // RECARREGA A PÁGINA + // COM OS NOVOS COOKIES + // =============================== - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; + // Envia os cookies recebidos junto com os cabeçalhos HTTP originais + await context.setExtraHTTPHeaders({ + ...BASE_HEADERS, + cookie: allCookies.map((c) => `${c.name}=${c.value}`).join("; "), + }); - const taskId = await createTask(payload); + // Recarrega a página com os cookies resolvidos do DataDome + await page.reload({ + waitUntil: "domcontentloaded", + }); - if (!taskId) { - console.log("Falha ao criar tarefa."); - await browser.close(); - return; - } + console.log("Página recarregada com os cookies do DataDome."); - const solution = await waitResult(taskId); - log("SOLUTION", solution); + await page.waitForTimeout(10000); await browser.close(); -} - -solveDataDome().catch(console.error); - +})().catch(console.error); ```
+
- Mostrar código + Mostrar código (Python + Playwright) ```python -# pip install requests beautifulsoup4 +# pip install playwright beautifulsoup4 capmonstercloudclient +# playwright install chromium -import time import json -import requests -import urllib.parse # Para analisar e codificar URLs (proxy, parâmetros da captcha) -from bs4 import BeautifulSoup # Para fazer parsing do HTML e extrair o objeto DataDome (var dd) -from urllib.parse import urlparse - - -# ====================================================== -# CONFIGURAÇÕES -# ====================================================== +import asyncio +from urllib.parse import urlencode -# Ativa/desativa saída detalhada de logs -# Usado apenas para conveniência no desenvolvimento e depuração -DEBUG = True +from bs4 import BeautifulSoup +from playwright.async_api import async_playwright -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Informe sua chave de API do CapMonster Cloud - -PAGE_URL = "https://www.example.com/" # Informe a URL da página onde o DataDome é acionado +from capmonstercloudclient import CapMonsterClient, ClientOptions +from capmonstercloudclient.requests import DataDomeCustomTaskRequest +API_KEY = "YOUR_CAPMONSTER_API_KEY" # Insira sua chave da API do CapMonster Cloud +PAGE_URL = "https://example.com/" # Insira a URL da página com DataDome USER_AGENT = ( "userAgentPlaceholder" ) -PROXY_URL = "http://login:pass@address:port" # Informe seu proxy - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# LOGGER DE DEPURAÇÃO -# ====================================================== - -def log(title, data=None): - if not DEBUG: - return - - print(f"\n{'='*25} {title} {'='*25}") - - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) - - print("=" * 70) - - -# ====================================================== -# CABEÇALHOS (VOCÊ PODE DEFINIR OS SEUS) -# ====================================================== - -def build_headers(first_request=True): - return { - "User-Agent": USER_AGENT, - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate, br", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Cache-Control": "max-age=0", - "DNT": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "none" if first_request else "same-origin", - "Sec-Fetch-User": "?1", - } - - -# ====================================================== -# PROXY -# ====================================================== - -def build_proxy(proxy_url): - if not proxy_url: - return None, None - - parsed = urlparse(proxy_url) - - proxy_dict = { - "http": proxy_url, - "https": proxy_url - } - - proxy_data = { - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username or "", - "proxyPassword": parsed.password or "" - } - - return proxy_dict, proxy_data +BASE_HEADERS = { + "accept": ( + "text/html,application/xhtml+xml,application/xml;q=0.9," + "image/avif,image/webp,image/apng,*/*;q=0.8" + ), + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + "pragma": "no-cache", + "sec-ch-ua": '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +} +PROXY = { + "proxyType": "http", + "proxyAddress": "YOUR_PROXY_ADDRESS", + "proxyPort": 12345, + "proxyLogin": "YOUR_PROXY_LOGIN", + "proxyPassword": "YOUR_PROXY_PASSWORD", +} -# ====================================================== -# EXTRAÇÃO DO OBJETO DD -# ====================================================== +def extract_dd(html: str): + """ + Extração dos parâmetros do DataDome do código HTML da página -def extract_dd(html): + :param html: código HTML da página + """ soup = BeautifulSoup(html, "html.parser") - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None - - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') - - return json.loads(raw) + for script in soup.find_all("script"): + text = script.string or script.get_text() + if text and "var dd=" in text: + try: + raw = text.split("var dd=")[1].split(";")[0].replace("'", '"') + return json.loads(raw) + except Exception: + return None -# ====================================================== -# MONTAGEM DA CAPTCHA URL -# ====================================================== + return None def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" - - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + """ + Formação da URL do CAPTCHA DataDome com base nos parâmetros + obtidos da página + + :param dd: parâmetros do DataDome + """ + params = { + "initialCid": dd.get("cid"), + "hash": dd.get("hsh"), + "cid": dd.get("cookie"), + "t": dd.get("t"), + "referer": PAGE_URL, + "s": dd.get("s"), + "dm": "cd", + } if dd.get("e"): - parts.append(("e", dd["e"])) - - parts.append(("dm", "cd")) - - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) - - return base + "?" + query - - -# ====================================================== -# RESOLUÇÃO VIA CAPMONSTER CLOUD -# ====================================================== - -def create_task(payload): - log("CREATE TASK REQUEST", payload) - - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - - log("CREATE TASK RESPONSE", resp) - - return resp.get("taskId") - - -def wait_result(task_id): - start = time.time() - - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("Tempo de espera do CapMonster excedido") - - time.sleep(2) - - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id - }) - - resp = r.json() - - if resp.get("status") == "processing": - print("... resolvendo") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# SOLVER PRINCIPAL -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver iniciado\n") - - proxy_dict, proxy_data = build_proxy(PROXY_URL) - - session = requests.Session() + params["e"] = dd.get("e") - session.headers.update(build_headers(first_request=True)) + return f"https://{dd.get('host')}/captcha/?{urlencode(params)}" - if proxy_dict: - session.proxies.update(proxy_dict) +def normalize_result(result): + if isinstance(result, dict): + return result - # -------------------------------------------------- - # 1. Primeira requisição - # -------------------------------------------------- + if hasattr(result, "model_dump"): + return result.model_dump() - print("Abrindo página...") + if hasattr(result, "dict"): + return result.dict() - r = session.get(PAGE_URL) + return result - log("FIRST STATUS", r.status_code) +def extract_datadome_cookies(result): + result = normalize_result(result) - dd = extract_dd(r.text) + print("Resultado da resolução:") + print(json.dumps(result, indent=2, default=str)) - if not dd: - print("DataDome não detectado") - return + # ===================================== + # EXTRAÇÃO DE COOKIES DA RESPOSTA + # DO CAPMONSTER CLOUD + # ===================================== - log("DD OBJECT", dd) + solution = result.get("solution", result) if isinstance(result, dict) else result - if dd.get("t") == "bv": - print("Proxy banido (t=bv). Troque o proxy ou os headers.") - return + domains = {} - # -------------------------------------------------- - # 2. Montagem da captcha URL - # -------------------------------------------------- + if isinstance(solution, dict): + domains = solution.get("domains") or {} - captcha_url = build_captcha_url(dd) + all_cookies = [] - log("CAPTCHA URL", captcha_url) + # Conversão dos cookies da resposta do CapMonster Cloud + # para o formato aceito pelo Playwright + for domain, data in domains.items(): + cookies = data.get("cookies", {}) if isinstance(data, dict) else {} - # -------------------------------------------------- - # 3. Criação da tarefa no CapMonster Cloud - # -------------------------------------------------- - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } + for name, value in cookies.items(): + all_cookies.append({ + "name": name, + "value": value, + "domain": ".example.com", # Substitua pelo domínio necessário + "path": "/", + "secure": True, + "sameSite": "Lax", + }) - if proxy_data: - task.update(proxy_data) + return all_cookies - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task +async def main(): + # Configuração do proxy para o navegador + # O mesmo proxy deve ser usado para o navegador e para a tarefa do CapMonster Cloud + proxy_config = { + "server": f"http://{PROXY['proxyAddress']}:{PROXY['proxyPort']}", + "username": PROXY["proxyLogin"], + "password": PROXY["proxyPassword"], } - task_id = create_task(payload) - - if not task_id: - print("Falha ao criar tarefa") - return - - # -------------------------------------------------- - # 4. Aguardando solução - # -------------------------------------------------- - - solution = wait_result(task_id) - - log("SOLUTION", solution) - -if __name__ == "__main__": - solve_datadome() -``` - -
- -
- Mostrar código (Python + Playwright) -```python -# pip install requests beautifulsoup4 playwright - -import time -import json -import requests -import urllib.parse # Para codificar parâmetros de URL (captcha URL) -from bs4 import BeautifulSoup # Para fazer parsing do HTML e extrair o objeto var dd -from urllib.parse import urlparse -from playwright.sync_api import sync_playwright # Para iniciar o navegador e trabalhar com a página via Playwright - + async with async_playwright() as p: + # Inicialização do Chromium com o proxy especificado + browser = await p.chromium.launch( + headless=False, + proxy=proxy_config, + ) -# ====================================================== -# CONFIGURAÇÕES -# ====================================================== + # Criação do contexto do navegador com User-Agent e cabeçalhos HTTP especificados + context = await browser.new_context( + user_agent=USER_AGENT, + extra_http_headers=BASE_HEADERS, + ) -# Ativa/desativa saída detalhada de logs -# Usado apenas para conveniência no desenvolvimento e depuração -DEBUG = True + page = await context.new_page() -CAPMONSTER_API_KEY = "YOUR_API_KEY" # Informe sua chave de API do CapMonster Cloud + # Abertura da página protegida + await page.goto( + PAGE_URL, + wait_until="domcontentloaded", + ) -PAGE_URL = "https://www.example.com/" # Informe a URL da página onde o DataDome é acionado + # Obtenção do código HTML da página e extração dos parâmetros do DataDome + html = await page.content() -USER_AGENT = ( - "userAgentPlaceholder" -) - -PROXY_URL = "http://login:pass@address:port" # Informe seu proxy - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# LOGGER DE DEPURAÇÃO -# ====================================================== - -def log(title, data=None): - if not DEBUG: - return - - print(f"\n{'='*25} {title} {'='*25}") - - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) - - print("=" * 70) - - -# ====================================================== -# EXTRAÇÃO DO OBJETO DD -# ====================================================== - -def extract_dd(html): - soup = BeautifulSoup(html, "html.parser") - - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None + dd = extract_dd(html) - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') + if not dd: + raise Exception("Parâmetros do DataDome não encontrados.") - return json.loads(raw) + # Verificação de bloqueio do proxy pelo DataDome + if dd.get("t") == "bv": + raise Exception("O proxy foi bloqueado pelo DataDome.") + # Formação da URL completa do CAPTCHA para envio na tarefa + captcha_url = build_captcha_url(dd) -# ====================================================== -# MONTAGEM DA CAPTCHA URL -# ====================================================== + # Criação do cliente do CapMonster Cloud + client = CapMonsterClient( + options=ClientOptions( + api_key=API_KEY, + ) + ) + + # Verificação do saldo atual da conta + balance = await client.get_balance() + + print("Saldo:", balance) + + # Formação da tarefa DataDome para o CapMonster Cloud + request = DataDomeCustomTaskRequest( + _class="DataDome", + websiteUrl=PAGE_URL, + userAgent=USER_AGENT, + proxy=PROXY, + metadata={ + "captchaUrl": captcha_url, + "datadomeCookie": f"datadome={dd.get('cookie')}", + "datadomeVersion": "new", + }, + ) -def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" + print("Enviando DataDome para resolução...") - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + # Envio da tarefa ao CapMonster Cloud e espera pelo resultado + result = await client.solve_captcha(request) - if dd.get("e"): - parts.append(("e", dd["e"])) + all_cookies = extract_datadome_cookies(result) - parts.append(("dm", "cd")) + if not all_cookies: + raise Exception("O CapMonster Cloud não retornou cookies.") - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) + # =============================== + # APLICAÇÃO DOS COOKIES NO PLAYWRIGHT + # =============================== - return base + "?" + query + # Obtenção dos cookies do contexto atual do navegador + existing_cookies = await context.cookies() + # Remoção dos cookies antigos do DataDome + # para evitar conflito com a nova solução + filtered = [ + c for c in existing_cookies + if "datadome" not in c.get("name", "").lower() + ] -# ====================================================== -# TRABALHANDO COM CAPMONSTER CLOUD -# ====================================================== + await context.clear_cookies() -def create_task(payload): - log("CREATE TASK REQUEST", payload) - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - log("CREATE TASK RESPONSE", resp) - return resp.get("taskId") + # Restauração dos demais cookies da sessão atual + if filtered: + await context.add_cookies(filtered) + print("Cookies antigos do DataDome removidos.") -def wait_result(task_id): - start = time.time() + # Adição dos cookies obtidos do CapMonster Cloud + await context.add_cookies(all_cookies) - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("Tempo de espera do CapMonster excedido") + print("Cookies do CapMonster Cloud aplicados:", all_cookies) - time.sleep(2) + # =============================== + # RECARREGAMENTO DA PÁGINA + # COM OS NOVOS COOKIES + # =============================== - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id + # Envio dos cookies obtidos junto com os cabeçalhos HTTP originais + await context.set_extra_http_headers({ + **BASE_HEADERS, + "cookie": "; ".join( + f"{cookie['name']}={cookie['value']}" for cookie in all_cookies + ), }) - resp = r.json() - - if resp.get("status") == "processing": - print("... resolvendo") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# SOLVER PRINCIPAL (PLAYWRIGHT) -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver (Playwright) iniciado\n") - - proxy = None - if PROXY_URL: - parsed = urlparse(PROXY_URL) - proxy = { - "server": f"http://{parsed.hostname}:{parsed.port}", - "username": parsed.username, - "password": parsed.password - } - - with sync_playwright() as p: - browser = p.chromium.launch(headless=False, proxy=proxy) - context = browser.new_context(user_agent=USER_AGENT) - page = context.new_page() - - print("Abrindo página no navegador real...") - page.goto(PAGE_URL, wait_until="domcontentloaded") - - html = page.content() - - log("FIRST PAGE LOADED") - - dd = extract_dd(html) - - if not dd: - print("DataDome não detectado") - browser.close() - return - - log("DD OBJECT", dd) - - if dd.get("t") == "bv": - print("Proxy banido (t=bv). Troque o proxy.") - browser.close() - return - - captcha_url = build_captcha_url(dd) - log("CAPTCHA URL", captcha_url) - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } - - if PROXY_URL: - task.update({ - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username, - "proxyPassword": parsed.password - }) - - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task - } - - task_id = create_task(payload) - - if not task_id: - print("Falha ao criar tarefa") - browser.close() - return + # Recarregamento da página com a verificação do DataDome resolvida + await page.reload( + wait_until="domcontentloaded", + ) - solution = wait_result(task_id) - log("SOLUTION", solution) + print("Página recarregada com os cookies do DataDome obtidos.") - browser.close() + await page.wait_for_timeout(10000) + await browser.close() -if __name__ == "__main__": - solve_datadome() +asyncio.run(main()) ```
diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/datadome.mdx b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/datadome.mdx index 2e1e1f37..487b7855 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/captchas/datadome.mdx +++ b/i18n/zh/docusaurus-plugin-content-docs/current/captchas/datadome.mdx @@ -293,67 +293,68 @@ https://geo.captcha-delivery.com/captcha/?initialCid=...&hash=...&cid=...&t=fe&r -
- 显示代码 +
+ 显示代码 (Node.js + Playwright) ```js -// npm install axios cheerio https-proxy-agent - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { URL } from "url"; -import { HttpsProxyAgent } from "https-proxy-agent"; - -// ====================================================== -// 配置 -// ====================================================== - -// 启用/禁用详细日志输出 -// 仅用于开发和排错 -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY"; // 填写您的 CapMonster Cloud API 密钥 -const PAGE_URL = "https://www.example.com/"; // 填写触发 DataDome 的页面 URL - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port"; - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; - -// ====================================================== -// 调试日志记录器 -// ====================================================== - -function log(title, data = null) { - if (!DEBUG) return; - - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); - - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); - - console.log("=".repeat(70)); -} - -// ====================================================== -// 提取 DD 对象 -// ====================================================== - +// npm install cheerio playwright @zennolab_com/capmonstercloud-client +// npx playwright install chromium + +const cheerio = require("cheerio"); +const { chromium } = require("playwright"); + +const { + CapMonsterCloudClientFactory, + ClientOptions, + DataDomeRequest, +} = require("@zennolab_com/capmonstercloud-client"); + +const API_KEY = "YOUR_API_KEY"; // 请填写您的 CapMonster Cloud API 密钥 + +const PAGE_URL = "https://example.com/"; // 请填写带有 DataDome 保护的页面 URL + +const USER_AGENT = "userAgentPlaceholder"; + +const BASE_HEADERS = { + accept: + "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + pragma: "no-cache", + "sec-ch-ua": + '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +}; + +const PROXY = { + proxyType: "http", + proxyAddress: "127.0.0.1", + proxyPort: 8080, + proxyLogin: "proxy_login", + proxyPassword: "proxy_password", +}; + +/** + * 从页面 HTML 中提取 DataDome 参数 + * + * @param {string} html + */ function extractDD(html) { const $ = cheerio.load(html); - const scripts = $("script").toArray(); - for (const s of scripts) { - const text = $(s).html(); + for (const script of $("script").toArray()) { + const text = $(script).html(); + if (text && text.includes("var dd=")) { try { const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); return JSON.parse(raw); - } catch (e) { + } catch { return null; } } @@ -362,13 +363,12 @@ function extractDD(html) { return null; } -// ====================================================== -// 构建 CAPTCHA URL -// ====================================================== - +/** + * 根据从页面获取的参数构建 DataDome 验证码 URL + * + * @param {any} dd + */ function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; - const params = new URLSearchParams({ initialCid: dd.cid, hash: dd.hsh, @@ -379,883 +379,442 @@ function buildCaptchaUrl(dd) { dm: "cd", }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} - -// ====================================================== -// 使用 CAPMONSTER CLOUD -// ====================================================== - -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); - - const { data } = await axios.post(CREATE_TASK, payload); - - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} - -async function waitResult(taskId) { - const start = Date.now(); - - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster timeout"); - - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... 正在解决"); - continue; - } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); + if (dd.e) { + params.append("e", dd.e); } + + return `https://${dd.host}/captcha/?${params.toString()}`; } -// ====================================================== -// 主 SOLVER -// ====================================================== +(async () => { + // 为浏览器配置代理 + // 浏览器和 CapMonster Cloud 任务必须使用相同的代理 + const proxyConfig = { + server: `http://${PROXY.proxyAddress}:${PROXY.proxyPort}`, + username: PROXY.proxyLogin, + password: PROXY.proxyPassword, + }; -async function solveDataDome() { - console.log("\nDataDome → CapMonster solver 已启动(HTTP 模式)\n"); + // 使用指定代理启动 Chromium + const browser = await chromium.launch({ + headless: false, + proxy: proxyConfig, + }); - let agent = null; - let parsedProxy = null; + // 创建浏览器上下文,设置 User-Agent 和 HTTP 头 + const context = await browser.newContext({ + userAgent: USER_AGENT, + extraHTTPHeaders: BASE_HEADERS, + }); - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); - agent = new HttpsProxyAgent(PROXY_URL); - } + const page = await context.newPage(); - // 1. 第一次请求 - console.log("正在打开页面..."); - - const response = await axios.get(PAGE_URL, { - headers: { - "User-Agent": USER_AGENT, - Accept: - "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Cache-Control": "no-cache", - Pragma: "no-cache", - "Upgrade-Insecure-Requests": "1", - }, - httpsAgent: agent, - proxy: false, // 使用 httpsAgent 时很重要 - validateStatus: () => true, + // 打开受保护的页面 + await page.goto(PAGE_URL, { + waitUntil: "domcontentloaded", }); - const html = response.data; - - log("STATUS", response.status); + // 获取页面 HTML 并提取 DataDome 参数 + const html = await page.content(); const dd = extractDD(html); if (!dd) { - console.log("未检测到 DataDome。"); - return; + throw new Error("未找到 DataDome 参数。"); } - log("DD OBJECT", dd); - + // 检查代理是否被 DataDome 屏蔽 if (dd.t === "bv") { - console.log("代理已被封禁。请更换代理。"); - return; + throw new Error("代理已被 DataDome 屏蔽。"); } - // 2. 构建 captcha URL + // 构建完整的验证码 URL,用于提交任务 const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); - // 3. 在 CapMonster Cloud 中创建任务 - const task = { - type: "CustomTask", - class: "DataDome", + // 创建 CapMonster Cloud 客户端 + const client = CapMonsterCloudClientFactory.Create( + new ClientOptions({ + clientKey: API_KEY, + }), + ); + + // 检查账户余额 + const balance = await client.getBalance(); + + console.log("余额:", balance); + + // 构建 CapMonster Cloud 的 DataDome 任务 + const request = new DataDomeRequest({ + _class: "DataDome", websiteURL: PAGE_URL, userAgent: USER_AGENT, + proxy: PROXY, metadata: { captchaUrl, datadomeCookie: `datadome=${dd.cookie}`, datadomeVersion: "new", }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } - - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; - - const taskId = await createTask(payload); - - if (!taskId) { - console.log("创建任务失败。"); - return; - } - - const solution = await waitResult(taskId); - - log("SOLUTION", solution); - - console.log("\nDataDome 已成功解决。\n"); -} - -solveDataDome().catch(console.error); -``` -
- -
- 显示代码 (Node.js + Playwright) -```js -// npm install axios cheerio playwright - -import axios from "axios"; -import * as cheerio from "cheerio"; -import { chromium } from "playwright"; -import { URL } from "url"; - -// ====================================================== -// 配置 -// ====================================================== - -// 启用/禁用详细日志输出 -// 仅用于开发和排错 -const DEBUG = true; - -const CAPMONSTER_API_KEY = "YOUR_API_KEY" // 填写您的 CapMonster Cloud API 密钥 -const PAGE_URL = "https://www.example.com/" // 填写触发 DataDome 的页面 URL - -const USER_AGENT = - "userAgentPlaceholder"; - -const PROXY_URL = "http://login:pass@address:port" // 填写您的代理 - -const CREATE_TASK = "https://api.capmonster.cloud/createTask"; -const GET_RESULT = "https://api.capmonster.cloud/getTaskResult"; - -const MAX_WAIT = 120000; + }); -// ====================================================== -// 调试日志记录器 -// ====================================================== + console.log("正在提交 DataDome 任务进行识别..."); -function log(title, data = null) { - if (!DEBUG) return; + // 提交任务到 CapMonster Cloud 并等待结果 + const result = await client.Solve(request); - console.log(`\n${"=".repeat(25)} ${title} ${"=".repeat(25)}`); + console.dir(result, { depth: null }); - if (typeof data === "object") console.log(JSON.stringify(data, null, 2)); - else if (data) console.log(data); + // ===================================== + // 从 CapMonster Cloud 响应中提取 Cookies + // ===================================== - console.log("=".repeat(70)); -} + const domains = result?.solution?.domains ?? {}; -// ====================================================== -// 提取 DD 对象 -// ====================================================== + const allCookies = []; -function extractDD(html) { - const $ = cheerio.load(html); - const scripts = $("script").toArray(); + // 将 CapMonster Cloud 返回的 cookies 转换为 Playwright 接受的格式 + for (const [domain, data] of Object.entries(domains)) { + const cookies = data?.cookies ?? {}; - for (const s of scripts) { - const text = $(s).html(); - if (text && text.includes("var dd=")) { - try { - const raw = text.split("var dd=")[1].split(";")[0].replace(/'/g, '"'); - return JSON.parse(raw); - } catch (e) { - return null; - } + for (const [name, value] of Object.entries(cookies)) { + allCookies.push({ + name, + value, + domain: ".example.com", // 请替换为实际域名 + path: "/", + secure: true, + sameSite: "Lax", + }); } } - return null; -} + if (!allCookies.length) { + throw new Error("CapMonster Cloud 未返回 cookies。"); + } -// ====================================================== -// 构建 CAPTCHA URL -// ====================================================== + // =============================== + // 在 Playwright 中应用 Cookies + // =============================== -function buildCaptchaUrl(dd) { - const base = `https://${dd.host}/captcha/`; + // 获取当前浏览器上下文的 cookies + const existingCookies = await context.cookies(); - const params = new URLSearchParams({ - initialCid: dd.cid, - hash: dd.hsh, - cid: dd.cookie, - t: dd.t, - referer: PAGE_URL, - s: dd.s, - dm: "cd", + // 移除旧的 DataDome cookies,避免与新解决方案冲突 + const filtered = existingCookies.filter((c) => { + const name = c.name.toLowerCase(); + return !name.includes("datadome"); }); - if (dd.e) params.append("e", dd.e); - - return base + "?" + params.toString(); -} - -// ====================================================== -// 使用 CAPMONSTER CLOUD -// ====================================================== - -async function createTask(payload) { - log("CREATE TASK REQUEST", payload); + await context.clearCookies(); - const { data } = await axios.post(CREATE_TASK, payload); - - log("CREATE TASK RESPONSE", data); - - return data.taskId; -} - -async function waitResult(taskId) { - const start = Date.now(); - - while (true) { - if (Date.now() - start > MAX_WAIT) throw new Error("CapMonster 超时"); - - await new Promise((r) => setTimeout(r, 3000)); - - const { data } = await axios.post(GET_RESULT, { - clientKey: CAPMONSTER_API_KEY, - taskId, - }); - - if (data.status === "processing") { - console.log("... 正在解决"); - continue; - } - - if (data.status === "ready") return data.solution; - - if (data.errorId) throw new Error(JSON.stringify(data)); + // 还原当前会话中其他 cookies + if (filtered.length) { + await context.addCookies(filtered); } -} -// ====================================================== -// 主 SOLVER(PLAYWRIGHT) -// ====================================================== + console.log("已移除旧的 DataDome cookies。"); -async function solveDataDome() { - console.log("\nDataDome → CapMonster Cloud solver 已启动\n"); + // 添加 CapMonster Cloud 返回的 cookies + await context.addCookies(allCookies); - let proxyConfig = null; - let parsedProxy = null; + console.log("已应用 CapMonster Cloud 的 cookies:", allCookies); - if (PROXY_URL) { - parsedProxy = new URL(PROXY_URL); + // =============================== + // 使用新 cookies 重新加载页面 + // =============================== - proxyConfig = { - server: `http://${parsedProxy.hostname}:${parsedProxy.port}`, - username: parsedProxy.username, - password: parsedProxy.password, - }; - } - - const browser = await chromium.launch({ - headless: false, - proxy: proxyConfig, + // 将获取的 cookies 一并设置到 HTTP 头中 + await context.setExtraHTTPHeaders({ + ...BASE_HEADERS, + cookie: allCookies.map((c) => `${c.name}=${c.value}`).join("; "), }); - const context = await browser.newContext({ - userAgent: USER_AGENT, + // 重新加载页面,此时 DataDome 验证应已通过 + await page.reload({ + waitUntil: "domcontentloaded", }); - const page = await context.newPage(); - - console.log("正在打开页面..."); - await page.goto(PAGE_URL, { waitUntil: "domcontentloaded" }); - - const html = await page.content(); - const dd = extractDD(html); - - if (!dd) { - console.log("未检测到 DataDome。"); - await browser.close(); - return; - } - - log("DD OBJECT", dd); + console.log("已使用获取的 DataDome cookies 重新加载页面。"); - if (dd.t === "bv") { - console.log("代理已被封禁。请更换代理。"); - await browser.close(); - return; - } - - const captchaUrl = buildCaptchaUrl(dd); - log("CAPTCHA URL", captchaUrl); - - const task = { - type: "CustomTask", - class: "DataDome", - websiteURL: PAGE_URL, - userAgent: USER_AGENT, - metadata: { - captchaUrl, - datadomeCookie: `datadome=${dd.cookie}`, - datadomeVersion: "new", - }, - }; - - if (PROXY_URL) { - task.proxyType = "http"; - task.proxyAddress = parsedProxy.hostname; - task.proxyPort = parseInt(parsedProxy.port); - task.proxyLogin = parsedProxy.username; - task.proxyPassword = parsedProxy.password; - } - - const payload = { - clientKey: CAPMONSTER_API_KEY, - task, - }; - - const taskId = await createTask(payload); - - if (!taskId) { - console.log("创建任务失败。"); - await browser.close(); - return; - } - - const solution = await waitResult(taskId); - log("SOLUTION", solution); + await page.waitForTimeout(10000); await browser.close(); -} - -solveDataDome().catch(console.error); +})().catch(console.error); ```
+
- 显示代码 + 显示代码 (Python + Playwright) ```python -# pip install requests beautifulsoup4 +# pip install playwright beautifulsoup4 capmonstercloudclient +# playwright install chromium -import time import json -import requests -import urllib.parse # 用于解析和编码 URL(代理、captcha 参数) -from bs4 import BeautifulSoup # 用于解析 HTML 并提取 DataDome 对象(var dd) -from urllib.parse import urlparse - - -# ====================================================== -# 配置 -# ====================================================== - -# 启用/禁用详细日志输出 -# 仅用于开发和排错 -DEBUG = True +import asyncio +from urllib.parse import urlencode -CAPMONSTER_API_KEY = "YOUR_API_KEY" # 填写您的 CapMonster Cloud API 密钥 +from bs4 import BeautifulSoup +from playwright.async_api import async_playwright -PAGE_URL = "https://www.example.com/" # 填写触发 DataDome 的页面 URL +from capmonstercloudclient import CapMonsterClient, ClientOptions +from capmonstercloudclient.requests import DataDomeCustomTaskRequest +API_KEY = "YOUR_CAPMONSTER_API_KEY" # 请填写您的 CapMonster Cloud API 密钥 +PAGE_URL = "https://example.com/" # 请填写带有 DataDome 保护的页面 URL USER_AGENT = ( "userAgentPlaceholder" ) -PROXY_URL = "http://login:pass@address:port" # 填写您的代理 - -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" - -MAX_WAIT = 120 - - -# ====================================================== -# 调试日志记录器 -# ====================================================== - -def log(title, data=None): - if not DEBUG: - return - - print(f"\n{'='*25} {title} {'='*25}") - - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) - - print("=" * 70) - - -# ====================================================== -# 请求头(您可以自定义) -# ====================================================== - -def build_headers(first_request=True): - return { - "User-Agent": USER_AGENT, - "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", - "Accept-Language": "en-US,en;q=0.9", - "Accept-Encoding": "gzip, deflate, br", - "Connection": "keep-alive", - "Upgrade-Insecure-Requests": "1", - "Cache-Control": "max-age=0", - "DNT": "1", - "Sec-Fetch-Dest": "document", - "Sec-Fetch-Mode": "navigate", - "Sec-Fetch-Site": "none" if first_request else "same-origin", - "Sec-Fetch-User": "?1", - } - - -# ====================================================== -# 代理 -# ====================================================== - -def build_proxy(proxy_url): - if not proxy_url: - return None, None - - parsed = urlparse(proxy_url) - - proxy_dict = { - "http": proxy_url, - "https": proxy_url - } - - proxy_data = { - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username or "", - "proxyPassword": parsed.password or "" - } +BASE_HEADERS = { + "accept": ( + "text/html,application/xhtml+xml,application/xml;q=0.9," + "image/avif,image/webp,image/apng,*/*;q=0.8" + ), + "accept-language": "en-US,en;q=0.9", + "cache-control": "no-cache", + "pragma": "no-cache", + "sec-ch-ua": '"Chromium";v="150", "Google Chrome";v="150", ";Not A Brand";v="99"', + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": '"Windows"', + "sec-fetch-dest": "document", + "sec-fetch-mode": "navigate", + "sec-fetch-site": "none", + "sec-fetch-user": "?1", + "upgrade-insecure-requests": "1", +} - return proxy_dict, proxy_data +PROXY = { + "proxyType": "http", + "proxyAddress": "YOUR_PROXY_ADDRESS", + "proxyPort": 12345, + "proxyLogin": "YOUR_PROXY_LOGIN", + "proxyPassword": "YOUR_PROXY_PASSWORD", +} -# ====================================================== -# 提取 DD 对象 -# ====================================================== +def extract_dd(html: str): + """ + 从页面 HTML 中提取 DataDome 参数 -def extract_dd(html): + :param html: 页面 HTML 代码 + """ soup = BeautifulSoup(html, "html.parser") - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None - - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') + for script in soup.find_all("script"): + text = script.string or script.get_text() - return json.loads(raw) + if text and "var dd=" in text: + try: + raw = text.split("var dd=")[1].split(";")[0].replace("'", '"') + return json.loads(raw) + except Exception: + return None - -# ====================================================== -# 构建 CAPTCHA URL -# ====================================================== + return None def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" - - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + """ + 根据从页面获取的参数构建 DataDome 验证码 URL + + :param dd: DataDome 参数 + """ + params = { + "initialCid": dd.get("cid"), + "hash": dd.get("hsh"), + "cid": dd.get("cookie"), + "t": dd.get("t"), + "referer": PAGE_URL, + "s": dd.get("s"), + "dm": "cd", + } if dd.get("e"): - parts.append(("e", dd["e"])) - - parts.append(("dm", "cd")) - - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) - - return base + "?" + query - - -# ====================================================== -# 通过 CAPMONSTER CLOUD 进行解决 -# ====================================================== - -def create_task(payload): - log("CREATE TASK REQUEST", payload) - - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - - log("CREATE TASK RESPONSE", resp) - - return resp.get("taskId") - - -def wait_result(task_id): - start = time.time() - - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster Cloud 超时") - - time.sleep(2) - - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id - }) - - resp = r.json() - - if resp.get("status") == "processing": - print("... 正在解决") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# 主 SOLVER -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster solver 已启动\n") - - proxy_dict, proxy_data = build_proxy(PROXY_URL) + params["e"] = dd.get("e") - session = requests.Session() + return f"https://{dd.get('host')}/captcha/?{urlencode(params)}" - session.headers.update(build_headers(first_request=True)) +def normalize_result(result): + if isinstance(result, dict): + return result - if proxy_dict: - session.proxies.update(proxy_dict) + if hasattr(result, "model_dump"): + return result.model_dump() - # -------------------------------------------------- - # 1. 第一次请求 - # -------------------------------------------------- + if hasattr(result, "dict"): + return result.dict() - print("正在打开页面...") + return result - r = session.get(PAGE_URL) +def extract_datadome_cookies(result): + result = normalize_result(result) - log("FIRST STATUS", r.status_code) + print("识别结果:") + print(json.dumps(result, indent=2, default=str)) - dd = extract_dd(r.text) + # ===================================== + # 从 CapMonster Cloud 响应中提取 Cookies + # ===================================== - if not dd: - print("未检测到 DataDome") - return + solution = result.get("solution", result) if isinstance(result, dict) else result - log("DD OBJECT", dd) + domains = {} - if dd.get("t") == "bv": - print("代理被封禁 (t=bv)。请更换代理或请求头。") - return + if isinstance(solution, dict): + domains = solution.get("domains") or {} - # -------------------------------------------------- - # 2. 构建 captcha URL - # -------------------------------------------------- + all_cookies = [] - captcha_url = build_captcha_url(dd) + # 将 CapMonster Cloud 返回的 cookies 转换为 Playwright 接受的格式 + for domain, data in domains.items(): + cookies = data.get("cookies", {}) if isinstance(data, dict) else {} - log("CAPTCHA URL", captcha_url) - - # -------------------------------------------------- - # 3. 在 CapMonster Cloud 中创建任务 - # -------------------------------------------------- - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } + for name, value in cookies.items(): + all_cookies.append({ + "name": name, + "value": value, + "domain": ".example.com", # 请替换为实际域名 + "path": "/", + "secure": True, + "sameSite": "Lax", + }) - if proxy_data: - task.update(proxy_data) + return all_cookies - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task +async def main(): + # 为浏览器配置代理 + # 浏览器和 CapMonster Cloud 任务必须使用相同的代理 + proxy_config = { + "server": f"http://{PROXY['proxyAddress']}:{PROXY['proxyPort']}", + "username": PROXY["proxyLogin"], + "password": PROXY["proxyPassword"], } - task_id = create_task(payload) - - if not task_id: - print("创建任务失败") - return - - # -------------------------------------------------- - # 4. 等待解决结果 - # -------------------------------------------------- - - solution = wait_result(task_id) - - log("SOLUTION", solution) - -if __name__ == "__main__": - solve_datadome() -``` -
- -
- 显示代码 (Python + Playwright) -```python -# pip install requests beautifulsoup4 playwright - -import time -import json -import requests -import urllib.parse # 用于编码 URL 参数(captcha URL) -from bs4 import BeautifulSoup # 用于解析 HTML 并提取 var dd 对象 -from urllib.parse import urlparse -from playwright.sync_api import sync_playwright # 用于启动浏览器并通过 Playwright 操作页面 - - -# ====================================================== -# 配置 -# ====================================================== - -# 启用/禁用详细日志输出 -# 仅用于开发和排错 -DEBUG = True - -CAPMONSTER_API_KEY = "YOUR_API_KEY" # 填写您的 CapMonster Cloud API 密钥 - -PAGE_URL = "https://www.example.com/" # 填写触发 DataDome 的页面 URL - -USER_AGENT = ( - "userAgentPlaceholder" -) - -PROXY_URL = "http://login:pass@address:port" # 填写您的代理 + async with async_playwright() as p: + # 使用指定代理启动 Chromium + browser = await p.chromium.launch( + headless=False, + proxy=proxy_config, + ) -CREATE_TASK = "https://api.capmonster.cloud/createTask" -GET_RESULT = "https://api.capmonster.cloud/getTaskResult" + # 创建浏览器上下文,设置 User-Agent 和 HTTP 头 + context = await browser.new_context( + user_agent=USER_AGENT, + extra_http_headers=BASE_HEADERS, + ) -MAX_WAIT = 120 + page = await context.new_page() + # 打开受保护的页面 + await page.goto( + PAGE_URL, + wait_until="domcontentloaded", + ) -# ====================================================== -# 调试日志记录器 -# ====================================================== + # 获取页面 HTML 并提取 DataDome 参数 + html = await page.content() -def log(title, data=None): - if not DEBUG: - return + dd = extract_dd(html) - print(f"\n{'='*25} {title} {'='*25}") + if not dd: + raise Exception("未找到 DataDome 参数。") - if isinstance(data, (dict, list)): - print(json.dumps(data, indent=2, ensure_ascii=False)) - elif data: - print(data) + # 检查代理是否被 DataDome 屏蔽 + if dd.get("t") == "bv": + raise Exception("代理已被 DataDome 屏蔽。") - print("=" * 70) + # 构建完整的验证码 URL,用于提交任务 + captcha_url = build_captcha_url(dd) + # 创建 CapMonster Cloud 客户端 + client = CapMonsterClient( + options=ClientOptions( + api_key=API_KEY, + ) + ) -# ====================================================== -# 提取 DD 对象 -# ====================================================== + # 检查账户余额 + balance = await client.get_balance() -def extract_dd(html): - soup = BeautifulSoup(html, "html.parser") + print("余额:", balance) - script = soup.find("script", string=lambda t: t and "var dd=" in t) - if not script: - return None + # 构建 CapMonster Cloud 的 DataDome 任务 + request = DataDomeCustomTaskRequest( + _class="DataDome", - raw = script.text.split("var dd=")[1].split(";")[0] - raw = raw.replace("'", '"') + websiteUrl=PAGE_URL, - return json.loads(raw) + userAgent=USER_AGENT, + proxy=PROXY, -# ====================================================== -# 构建 CAPTCHA URL -# ====================================================== + metadata={ + "captchaUrl": captcha_url, + "datadomeCookie": f"datadome={dd.get('cookie')}", + "datadomeVersion": "new", + }, + ) -def build_captcha_url(dd): - base = f"https://{dd['host']}/captcha/" + print("正在提交 DataDome 任务进行识别...") - parts = [ - ("initialCid", dd["cid"]), - ("hash", dd["hsh"]), - ("cid", dd["cookie"]), - ("t", dd["t"]), - ("referer", PAGE_URL), - ("s", dd["s"]), - ] + # 提交任务到 CapMonster Cloud 并等待结果 + result = await client.solve_captcha(request) - if dd.get("e"): - parts.append(("e", dd["e"])) + all_cookies = extract_datadome_cookies(result) - parts.append(("dm", "cd")) + if not all_cookies: + raise Exception("CapMonster Cloud 未返回 cookies。") - query = "&".join( - f"{k}={urllib.parse.quote(str(v), safe='')}" - for k, v in parts - ) + # =============================== + # 在 Playwright 中应用 Cookies + # =============================== - return base + "?" + query + # 获取当前浏览器上下文的 cookies + existing_cookies = await context.cookies() + # 移除旧的 DataDome cookies,避免与新解决方案冲突 + filtered = [ + c for c in existing_cookies + if "datadome" not in c.get("name", "").lower() + ] -# ====================================================== -# 使用 CAPMONSTER CLOUD -# ====================================================== + await context.clear_cookies() -def create_task(payload): - log("CREATE TASK REQUEST", payload) - r = requests.post(CREATE_TASK, json=payload) - resp = r.json() - log("CREATE TASK RESPONSE", resp) - return resp.get("taskId") + # 还原当前会话中其他 cookies + if filtered: + await context.add_cookies(filtered) + print("已移除旧的 DataDome cookies。") -def wait_result(task_id): - start = time.time() + # 添加 CapMonster Cloud 返回的 cookies + await context.add_cookies(all_cookies) - while True: - if time.time() - start > MAX_WAIT: - raise TimeoutError("CapMonster Cloud timeout") + print("已应用 CapMonster Cloud 的 cookies:", all_cookies) - time.sleep(2) + # =============================== + # 使用新 cookies 重新加载页面 + # =============================== - r = requests.post(GET_RESULT, json={ - "clientKey": CAPMONSTER_API_KEY, - "taskId": task_id + # 将获取的 cookies 一并设置到 HTTP 头中 + await context.set_extra_http_headers({ + **BASE_HEADERS, + "cookie": "; ".join( + f"{cookie['name']}={cookie['value']}" for cookie in all_cookies + ), }) - resp = r.json() - - if resp.get("status") == "processing": - print("... 正在解决") - continue - - if resp.get("status") == "ready": - return resp["solution"] - - if resp.get("errorId"): - raise Exception(resp) - - -# ====================================================== -# 主 SOLVER(PLAYWRIGHT) -# ====================================================== - -def solve_datadome(): - - print("\n DataDome → CapMonster Cloud solver (Playwright) 已启动\n") - - proxy = None - if PROXY_URL: - parsed = urlparse(PROXY_URL) - proxy = { - "server": f"http://{parsed.hostname}:{parsed.port}", - "username": parsed.username, - "password": parsed.password - } - - with sync_playwright() as p: - browser = p.chromium.launch(headless=False, proxy=proxy) - context = browser.new_context(user_agent=USER_AGENT) - page = context.new_page() - - print("正在真实浏览器中打开页面...") - page.goto(PAGE_URL, wait_until="domcontentloaded") - - html = page.content() - - log("FIRST PAGE LOADED") - - dd = extract_dd(html) - - if not dd: - print("未检测到 DataDome") - browser.close() - return - - log("DD OBJECT", dd) - - if dd.get("t") == "bv": - print("代理被封禁 (t=bv)。请更换代理。") - browser.close() - return - - captcha_url = build_captcha_url(dd) - log("CAPTCHA URL", captcha_url) - - task = { - "type": "CustomTask", - "class": "DataDome", - "websiteURL": PAGE_URL, - "userAgent": USER_AGENT, - "metadata": { - "captchaUrl": captcha_url, - "datadomeCookie": f"datadome={dd['cookie']}", - "datadomeVersion": "new" - } - } - - if PROXY_URL: - task.update({ - "proxyType": "http", - "proxyAddress": parsed.hostname, - "proxyPort": parsed.port, - "proxyLogin": parsed.username, - "proxyPassword": parsed.password - }) - - payload = { - "clientKey": CAPMONSTER_API_KEY, - "task": task - } - - task_id = create_task(payload) - - if not task_id: - print("创建任务失败") - browser.close() - return + # 重新加载页面,此时 DataDome 验证应已通过 + await page.reload( + wait_until="domcontentloaded", + ) - solution = wait_result(task_id) - log("SOLUTION", solution) + print("已使用获取的 DataDome cookies 重新加载页面。") - browser.close() + await page.wait_for_timeout(10000) + await browser.close() -if __name__ == "__main__": - solve_datadome() +asyncio.run(main()) ```