🔒캡챠

Mora Api 캡챠 입니다.

Templates

  • API는 모두 GET 메서드를 사용합니다

  • GET URL : https://mora-bot.kr/api/v1/captcha

// 응답 내용
{
    "message":"captcha image and code was returned",
    "status":200,
    "url":"https://dummyimage.com/2000x500/ffffff/33363c&text=snZojQ",
    "code":"snZojQ",
    "success":true
}

NodeJS

// node-fetch
const fetch = require('node-fetch')
fetch('https://mora-bot.kr/api/v1/captcha')
    .then(res => res.json())
    .then(json => {
        let imgurl = json.url;
        let code = json.code;
        console.log(json)
    });

// request
let api_url = 'https://mora-bot.kr/api/v1/captcha'
const request = require('request');
let options = {
    url: api_url
}
request.get(options, function (error, response, body) {
    if (!error && response.status == 200) {
        let imgurl = JSON.parse(body).url;
        let code = JSON.parse(body).code;
        console.log(imgurl, code)
    } else {
        console.log('error = ' + response.errorcode);
    }
});

Python

import requests

response = requests.get("https://mora-bot.kr/api/v1/captcha")
result = response.json()

if response.status == 200:
  print(result)
else:
  print(f"Error Code: {response.errorcode}")

Last updated