I am not really sure how can I use the HTTP Requests 's response to show the widget.
The problem is that when I am requesting GET in http link and it returns a html response; but when I try to render the html part of where the widget is, the pywebview throws off error like
A Server error occurred. Please contact the administrator.
Or it shows the values of the html's tag not the html webview itself
Code for reference:
def handle_captcha(sess, request, ua):
http_response = sess.get(request, headers=ua)
http_show_captcha = BeautifulSoup(http_response.text, 'html.parser')
print("hellos")
window = webview.create_window('Captcha', http_show_captcha.find('div' , attrs={"class" : "checkpoint__wrapper content"}).text)
webview.start()
The flow of this program is to access website through http request -> manually solve the captcha -> get the captcha's response -> target page
My question here is, is there any python framework that renders HTTP response especially the reCaptcha Widget? Or what is the best way to handle this problem? And how can I store the session inside the webview's response, or how can I access the previous session that was generated from http request?