Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Imagetyperz captcha API test
- # ------------------------------
- from imagetypersapi import ImageTypersAPI
- from time import sleep
- # solve captcha
- def test_api():
- username = ''
- password = ''
- ita = ImageTypersAPI(username, password) # init imagetyperz api obj
- # check account balance
- # ---------------------------
- balance = ita.account_balance() # get account balance
- print 'Balance: {}'.format(balance) # print balance
- # solve normal captcha
- print 'Waiting for captcha to be solved ...'
- # -----------------------------------------------------------------------------------------------
- captcha_text = ita.solve_captcha('captcha.jpg', case_sensitive = True) # solve captcha, with case sensitive arg True
- print 'Captcha text: {}'.format(captcha_text) # print captcha solved text
- # -----------------------------------------------------------------------------------------------
- # main method
- def main():
- try:
- test_api() # test captcha API
- except Exception, ex:
- print '[!] Error occured: {}'.format(ex)
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement