Code Monkey home page Code Monkey logo

captchaparser's People

Contributors

aneesh-neelam avatar frdmn avatar karthikb351 avatar poonai avatar shubhodeep9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

captchaparser's Issues

Captcha not parsed

Tried to parse following captcha, doesn't return any result
captcha

Is it too complex for algo?

Reduce run time of the code

I've made a few changes to the python script, and the run time has been reduced to an average of 0.13 seconds, almost half of the earlier. Is it okay if I put up a pull request?

Document Python dependencies

Include the requirements.txt and dev-requirements.txt files to make installing the Python dependencies like BeautifulSoup and mechanize easier.

The core script shouldn't need any dependencies other than pillow.

captcha.getCaptcha Blank Response

Im trying to use with http://www.detran.rj.gov.br/captcha/captcha.asp?montaCaptcha=1&x=1540240788840 this captcha. Everything looks good but the:
console.log(captcha.getCaptcha(pixMap));
is blank a blank response. Inside pixMap everything looks right.

There is something there Im doing wrong?

Full code:

`
const unirest = require('unirest');
const captcha = require('./CaptchaParser');

let captchaUri = await page.$eval(CAPTCHA, e => e.getAttribute('src'));
console.log('captcha uri', captchaUri);

var onRequest = function(response) {
  if (response.error) {
    console.log('VIT Academics connection failed');
  } else {
    let pixMap = captcha.getPixelMapFromBuffer(response.body); //Working Here
    fs.writeFileSync('captcha.bmp', response.body);
    console.log("Blank Here", captcha.getCaptcha(pixMap));
  }
};
unirest
  .get(captchaUri)
  .encoding(null)
  .set('Content-Type', 'image/bmp')
  .end(onRequest);

`
CaptchaUri is the link above

Error SSL in examples/online.py!

hello,

examples$ python2.7 online.py

Fetching Captcha
Traceback (most recent call last):
  File "online.py", line 18, in <module>
    r=br.open('https://academics.vit.ac.in/parent/parent_login.asp')
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 254, in open
    return self._mech_open(url_or_request, data, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 284, in _mech_open
    response = UserAgentBase.open(self, request, data)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_opener.py", line 195, in open
    response = urlopen(self, req, data)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 352, in _open
    '_open', req)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 340, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1212, in https_open
    return self.do_open(conn_factory, req)
  File "/usr/local/lib/python2.7/dist-packages/mechanize/_urllib2_fork.py", line 1157, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>

how fix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.