How solve clickable captcha like recaptcha v2 on signup page with python and selenium?

I am creating selenium code with python to solve captcha that requires clicking on images "ReCaptcha V2" with 2captcha API .

please check :

my first problem is get screen shot in random name and compress it to below 100Kb and send it with my http post request .
my second problem is how to simulate clicks on "OK|coordinate:x=39,y=59;x=252,y=72"
and how remove image after captcha solved ?

my code:
from selenium import webdriver
from time import sleep, time
from PIL import Image
import requests
import time

# open signup page
browser = webdriver.Chrome('D:\chromedriver')

# click on checkbox
recaptcha = browser.find_element_by_xpath("//*[@role='presentation']"); time.sleep(3); time.sleep(3)

#get screenshot

#send http request 'post'
url = ''
files = {'file': open('iamcaptchaimage.jpg', 'rb')}
url = ''
files = {'file': open('iamcaptchaimage.jpg', 'rb')}
data = {'key': '***', 'method': 'post','coordinatescaptcha':'1','textinstructions':'click on fire hydrant'}
resp =, files=files, data=data)

if resp.ok:
    captcha_id = resp.text[3:]
# send http request 'get'
fetch_url = "****&action=get&id=" + captcha_id
for i in range(1, 10):
    sleep(5)  # wait 5 sec.
    resp = requests.get(fetch_url)
    if resp.text[0:2] == 'OK':