gotlium / antigate

Wrapper for online service which provides real-time captcha-to-text decodings. http://anti-captcha.com/
http://antigate.com/
GNU General Public License v3.0
91 stars 21 forks source link

Issue with send_config #3

Closed fft24 closed 10 years ago

fft24 commented 10 years ago

I just tried to add an additional config:

config = {'numeric': 1}
gate = AntiGate(XXXXXX, filename, send_config=config)

and suddenly I got the following exception:

    gate = AntiGate('46765a23a3247474b07e629fb3e026ec', filename, send_config=config)
  File "/Library/Python/2.7/site-packages/antigate-1.2.1-py2.7.egg/antigate/__init__.py", line 41, in __init__
    self.run(filename)
  File "/Library/Python/2.7/site-packages/antigate-1.2.1-py2.7.egg/antigate/__init__.py", line 156, in run
    self.send(filename)
  File "/Library/Python/2.7/site-packages/antigate-1.2.1-py2.7.egg/antigate/__init__.py", line 100, in send
    return self._send(filename)
  File "/Library/Python/2.7/site-packages/antigate-1.2.1-py2.7.egg/antigate/__init__.py", line 93, in _send
    self._go(self._get_input_url(), 'Can not send captcha')
  File "/Library/Python/2.7/site-packages/antigate-1.2.1-py2.7.egg/antigate/__init__.py", line 84, in _go
    self.g.go(url)
  File "/Library/Python/2.7/site-packages/grab-0.4.13-py2.7.egg/grab/base.py", line 356, in go
    return self.request(url=url, **kwargs)
  File "/Library/Python/2.7/site-packages/grab-0.4.13-py2.7.egg/grab/base.py", line 431, in request
    self.prepare_request(**kwargs)
  File "/Library/Python/2.7/site-packages/grab-0.4.13-py2.7.egg/grab/base.py", line 384, in prepare_request
    self.transport.process_config(self)
  File "/Library/Python/2.7/site-packages/grab-0.4.13-py2.7.egg/grab/transport/curl.py", line 240, in process_config
    self.curl.setopt(pycurl.HTTPPOST, post_items)

By the way it works like a charm without any additional configuration. Hope u fix it!

Thnx in advance!

fft24 commented 10 years ago

Actually,I encourage you to stop using pycurl and start using 'requests' package.

gotlium commented 10 years ago

I use grab-lib and you can configure transport. What about pull request?