Answer the question
In order to leave comments, you need to log in
How to extract specific text from an element?
For example, they write to me the word "Send "captcha 3333""
How can I send exactly this interval without quotes?
while True:
t = browser.find_elements_by_xpath('//*[@id="content"]/div/div[1]/div[3]/div[2]/div[3]/div/div/div/div/div[1]/div')
e = browser.find_element_by_xpath('//*[@id="content"]/div/div[1]/div[3]/div[2]/div[3]/div/div/div/div/div[1]/div[' + str(len(t)) + ']').text
elif 'Отправьте' in e:
print(Fore.LIGHTCYAN_EX + 'КАПЧА!')
browser.find_element_by_xpath('//*[@id="im_editable2000000175"]').send_keys('') + e.split(' «')[-1]
browser.find_element_by_xpath('//*[@id="content"]/div/div[1]/div[3]/div[2]/div[4]/div[2]/div[4]/div[1]/button').click()
break
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question