TypeError: Object of type 'WebDriver' is not JSON serializable
See original GitHub issueI am not sure how can I combine you reCaptcha solver and selenium session. Fro example simple selenium code:
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://www.hzzo-net.hr/statos_OIB.htm')
driver.find_element_by_id('upoib').send_keys('93335620125')
Now, I would like to execute reCaptcha part, but not sure how to do it. Itried for example:
api_key = xxxxx'
site_key = '6Lc3SAgUAAAAALFnYxUbXlcJ8I9grvAPC6LFTKQs' # grab from site
client = AnticaptchaClient(api_key)
task = NoCaptchaTaskProxylessTask(driver, site_key)
job = client.createTask(task)
job.join()
print(job.get_solution_response())
But it returns an error in the title. Not sure how to pass selenium session as input?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Python Object of type WebElement is not JSON serializable
dumps but i have problem with WebElement. I got TypeError: Object of type WebElement is not JSON serializable. This my example code :...
Read more >Object of type Series is not JSON serializable - Python Help
TypeError : Object of type Series is not JSON serializable. I'm having trouble looping through a list and visiting urls (with selenium) -...
Read more >TypeError: Object of type function is not JSON serializable
The Python "TypeError: Object of type function is not JSON serializable" occurs when we try to serialize a function to JSON. To solve...
Read more >Python - TypeError: object of type 'Cell' has no len()
I am working on Selenium with Python. I am writing a code which will fetch the data from an excel file and punch...
Read more >Python - TypeError Object of type int64 is not JSON serializable
Python - TypeError Object of type int64 is not JSON serializable · Your comment on this question: · No answer to this question....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Extract the site-key from the source code and only pass it and URL. The session does not matter.
It will be something like that (I did not test it exactly). In case of any problems - it remains available. I am glad if you can integrate my library and use it.
Edit: Fixed pass to script url and driver.
@MislavSag , I do not understand what communication with the Anti-captcha service you are talking about?
To proxy communication:
Example mentioned above:
I would like to point out that proxy communication of you <> anti-captcha makes no sense. Anti-captcha has information about your payment and is an entity in whose interest is not to reveal the identity of customers, so simply share such information will not. The VPN should work for you<>anti-captcha without additional configuration.