{"id":300242,"date":"2020-03-17T09:00:22","date_gmt":"2020-03-17T09:00:22","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=300242"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=300242","title":{"rendered":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0420\u043e\u0441\u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d \u0438 python. \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/492568\/\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u043f\u0438\u0441\u043a\u0438 \u0438\u0437 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e python (selenium) \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0435\u0448\u0438\u043c \u043a\u0430\u043f\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 anticaptcha, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e api. \u041f\u0440\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0441 \u043a\u0430\u043f\u0447\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u00ab\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0440\u0430\u0437\u0433\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0439\u00bb \u043a\u0430\u043f\u0447 \u0441 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043a\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 1-\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438:<a href=\"https:\/\/habr.com\/ru\/post\/461045\/\">\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0420\u043e\u0441\u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d \u0438 python. \u0427\u0430\u0441\u0442\u044c 1<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a3\/w1\/-v\/a3w1-vlh35t2eof4mjjwodbxsww.png\"><\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u0447\u0430\u043b\u043e \u043d\u0430\u0448\u0435\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0431\u0443\u0434\u0435\u0442 \u0441\u0445\u043e\u0434\u043d\u043e \u0441 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u0441\u0442\u0430.\u0421\u043f\u0435\u0440\u0432\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d, \u0432\u0432\u043e\u0434 \u043a\u043b\u044e\u0447\u0430 \u0432\u0445\u043e\u0434\u0430:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">import webbrowser,time from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.action_chains import ActionChains import openpyxl import pyautogui import os from python3_anticaptcha import ImageToTextTask  wb = openpyxl.load_workbook('rosreestr-objects.xlsx') sheet=wb.get_active_sheet()  browser = webdriver.Firefox() browser.implicitly_wait(40) browser.get ('https:\/\/rosreestr.ru\/wps\/portal\/p\/cc_present\/ir_egrn')  act = browser.find_element_by_css_selector('.v-panel-content &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; input:nth-child(1)') for i in '---------': \tact.send_keys(i) time.sleep(2) act = browser.find_element_by_css_selector('.v-panel-content &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(3) &gt; div:nth-child(1) &gt; input:nth-child(1)') for i in '----': \tact.send_keys(i) time.sleep(2) act = browser.find_element_by_css_selector('.v-panel-content &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(5) &gt; div:nth-child(1) &gt; input:nth-child(1)')\t for i in '----': \tact.send_keys(i) time.sleep(2) act = browser.find_element_by_css_selector('.v-panel-content &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(7) &gt; div:nth-child(1) &gt; input:nth-child(1)')                                          for i in '----': \tact.send_keys(i) time.sleep(2) act = browser.find_element_by_css_selector('.v-panel-content &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(9) &gt; div:nth-child(1) &gt; input:nth-child(1)')                                            for i in '-----------': \tact.send_keys(i) time.sleep(2) act = browser.find_element_by_css_selector('.v-button-normalButton &gt; span:nth-child(1) &gt; span:nth-child(1)') act.click() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e &quot;&#8212;&quot; \u043d\u0430\u0434\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0447\u0430\u0441\u0442\u0438 \u043a\u043e\u0434\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c &quot;-&quot;.<br \/>  \u00abrosreestr-objects.xlsx\u00bb \u2014 \u0444\u0430\u0439\u043b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u0439\u0434\u0443\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 20, \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0438\u0436\u0435.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0437\u0430\u0431\u0438\u0440\u0430\u044f \u0438\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b excel \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443, \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043f\u043e\u0438\u0441\u043a:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">n=1 while n&lt;11: #\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 excel         i=sheet['C'+str(n)].value         test.append(i+';')         n+=1 # \u043f\u043e\u0438\u0441\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438 act = browser.find_element_by_css_selector('.v-gridlayout-margin &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; span:nth-child(1) &gt; span:nth-child(2)') act.click()         time.sleep(1) act = browser.find_element_by_css_selector('.v-verticallayout-searchFormOuter &gt; div:nth-child(1) &gt; div:nth-child(2) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; input:nth-child(1)') act.click()         act.clear()         for i in test:         act.send_keys(i)         time.sleep(3) act = browser.find_element_by_css_selector('.v-filterselect-error &gt; input:nth-child(1)') act.click()         act.clear()         for i in '\u0421\u0432\u0435\u0440\u0434\u043b\u043e\u0432\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c':         act.send_keys(i) time.sleep(5) act.send_keys(Keys.ENTER) act = browser.find_element_by_css_selector('.v-horizontallayout-borderTop &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; div:nth-child(1) &gt; span:nth-child(1) &gt; span:nth-child(1)') act.click() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 \u0441\u0430\u0439\u0442 \u0443\u043b\u0435\u0442\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430, \u0447\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442 \u0432\u0440\u0435\u043c\u044f. <\/p>\n<h3>\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 anti-captcha.com<\/h3>\n<p>  \u041d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c \u0441\u0430\u0439\u0442\u043e\u043c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0435\u0433\u043e \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443.<br \/>  \u0420\u0435\u0441\u0443\u0440\u0441, \u043a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043f\u0447. \u0422\u0430\u043a\u0430\u044f \u0432\u043e\u0442 \u0442\u0430\u0432\u0442\u043e\u043b\u043e\u0433\u0438\u044f. \u041f\u043b\u0430\u0442\u043d\u043e. 1 \u0434\u043e\u043b\u043b\u0430\u0440 \u0437\u0430 1000 \u043a\u0430\u043f\u0447. \u0414\u043e\u043b\u0436\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0421\u0443\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u2014 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u0430\u0439\u0442 (\u0438\u043b\u0438 \u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441) \u043a\u0430\u043f\u0447\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0436\u0438\u0432\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438 (\u0438\u043b\u0438 \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0436\u0438\u0432\u044b\u043c\u0438) \u043f\u043e \u0442\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u044d\u043a\u0440\u0430\u043d\u0430. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e\u0435, \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0435 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043f\u043e\u0441\u043e\u043f\u0435\u0440\u043d\u0438\u0447\u0430\u0442\u044c \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u043c\u0438. \u0422\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043d\u0430\u044f.<br \/>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0430\u043a\u043e\u0439: \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0444\u043e\u0442\u043e \u043a\u0430\u043f\u0447\u0438 \u0441 \u044d\u043a\u0440\u0430\u043d\u0430, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u0444\u043e\u0442\u043e \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e api, \u0437\u0430\u0431\u0440\u0430\u043b\u0438 \u043e\u0442\u0432\u0435\u0442. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u0443\u044e \u043a\u0430\u043f\u0447\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437 \u0446\u0438\u0444\u0440, \u0431\u0443\u043a\u0432 \u0438 \u0442.\u0434.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u0438 \u043e\u043f\u043b\u0430\u0442\u0435 1 \u0434\u043e\u043b\u043b\u0430\u0440\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 api \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u044e\u0447:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pr\/-c\/24\/pr-c24ncewnce-_-7-fc6m7ymw0.png\">  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u0430\u0440\u0442\u0438\u043d\u043a\u04302<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xq\/en\/cg\/xqencgljziyjixver4jtfsrholw.png\">  <\/div>\n<\/div>\n<p>  \u0412\u0441\u0435, \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0430\u0439\u0442 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d.<\/p>\n<h3>\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0441\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435.<\/h3>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043a\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e \u043d\u0435\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441, \u0440\u0435\u0448\u0430\u044f \u043a\u0430\u043f\u0447\u0443:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">x=1 ActionChains(browser).move_to_element(browser.find_element_by_xpath('\/html\/body\/div[1]\/div[6]\/div[4]\/div\/div\/section\/div[2]\/div[2]\/div\/div\/div[2]\/div\/div[2]\/div\/div\/div\/div[1]\/div\/div\/div\/div[5]\/div\/div\/div[2]\/div[1]\/table\/tbody\/tr['+str(x)+']')).click().perform()         time.sleep(2)                 act = browser.find_element_by_css_selector('.v-textfield')         act.click()         time.sleep(1)         act = browser.find_element_by_tag_name('html')         act.send_keys(Keys.PAGE_DOWN)#\u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043f\u0447\u0443         time.sleep(2)         a=0         os.chdir('C:\\\\1')         im=pyautogui.screenshot(imageFilename=str(a)+'.jpg',region=(238,394,220,70))#\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 1280\u04451024         #im=pyautogui.screenshot(imageFilename=str(a)+'.jpg',region=(317,404,160,200))#\u0434\u0435\u043b\u0430\u0435\u043c \u0444\u043e\u0442\u043e \u043a\u0430\u043f\u0447\u0438 \u043d\u0430 \u043f\u0430\u043c\u044f\u0442\u044c         time.sleep(1)         captcha_file = 'C:\\\/1\\\/0.jpg' <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043f\u0447\u0430 \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0441\u0440\u0430\u0437\u0443 \u043d\u0435 \u0432\u0438\u0434\u043d\u0430 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043d\u0430\u0436\u0430\u0442\u0438\u0435 page_down, \u0437\u0430\u0442\u0435\u043c \u0444\u043e\u0442\u043e \u043a\u0430\u043f\u0447\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0435\u0435 \u043d\u0430 \u0434\u0438\u0441\u043a. \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0443 \u0432\u0441\u0435\u0445 \u0440\u0430\u0437\u043d\u043e\u0435, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0438\u0441\u0430\u043b\u0430\u0441\u044c \u043f\u043e\u0434 \u044d\u043a\u0440\u0430\u043d 1280\u04451024. <br \/>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043c\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0433\u0440\u0430\u043d\u0438\u0446 \u043a\u0430\u043f\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0441\u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043c\u044b\u0448\u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">#! python3 # mouseNow.py - Displays the mouse cursor's current position. import pyautogui print('Press Ctrl-C to quit.') try:     while True:         # Get and print the mouse coordinates.         x, y = pyautogui.position()         positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)         pixelColor = pyautogui.screenshot().getpixel((x, y))         positionStr += ' RGB: (' + str(pixelColor[0]).rjust(3)         positionStr += ', ' + str(pixelColor[1]).rjust(3)         positionStr += ', ' + str(pixelColor[2]).rjust(3) + ')'         print(positionStr, end='')         print('\\b' * len(positionStr), end='', flush=True)  except KeyboardInterrupt:     print('\\nDone.') <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f api anticaptcha \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u0435\u0440\u0432\u0438\u0441, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u0432\u0435\u0434\u0435\u0442 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043e\u043a\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u0420\u043e\u0441\u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0441\u0430\u043c\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">ANTICAPTCHA_KEY = &quot;-------------------------------&quot;         result = ImageToTextTask.ImageToTextTask(anticaptcha_key=ANTICAPTCHA_KEY).captcha_handler(captcha_file=captcha_file)                 b=result.get('solution').get('text')#\u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u043a\u0430\u043f\u0447\u0443 \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430         print(b)         act = browser.find_element_by_css_selector('.v-textfield')         act.click()         for a in b:                 act.send_keys(a)                 time.sleep(0.1)         act.send_keys(Keys.ENTER)         time.sleep(1) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  *\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u0432\u0435\u0441\u0442\u0438 \u0432\u043c\u0435\u0441\u0442\u043e &quot;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&quot; \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c api \u043a\u043b\u044e\u0447.<\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0446\u0438\u043a\u043b \u043f\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">act.click()         time.sleep(3)                 act = browser.find_element_by_css_selector('.v-table-body-wrapper')         act.send_keys(Keys.DOWN)         act.send_keys(Keys.DOWN)         time.sleep(3)                 x+=1 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e (50 \u0438 \u0431\u043e\u043b\u0435\u0435). \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441\u043e \u0441\u0434\u0438\u0433\u043e\u043c \u043e\u043a\u043d\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0438 \u0447\u0430\u0441\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u043e\u043a\u043d\u043e, \u0432\u0438\u0434\u0438\u043c\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439. \u041a\u0430\u043a \u0441 \u044d\u0442\u0438\u043c \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f? \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0443 act.send_keys(Keys.DOWN) \u0432 \u043a\u043e\u0434 \u0432\u044b\u0448\u0435.<br \/>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u043b\u044e\u0434\u0438 \u043f\u043e \u0442\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u044d\u043a\u0440\u0430\u043d\u0430 \u0440\u0435\u0448\u0438\u043b\u0438 \u043a\u0430\u043f\u0447\u0443 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e (\u043a\u0441\u0442\u0430\u0442\u0438, \u043a\u0430\u043f\u0447\u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438 \u0434\u0430\u0436\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0435 \u0441\u043f\u0430\u0441\u0430\u0435\u0442)? \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434. \u041d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f.<\/p>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u2014 <a href=\"https:\/\/yadi.sk\/d\/0egolem7NXiXaQ\" rel=\"nofollow\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a>.<br \/>  \u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438 \u2014 <a href=\"https:\/\/yadi.sk\/i\/JpM7m4KIg80hZg\" rel=\"nofollow\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c<\/a>.<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/492568\/\"> https:\/\/habr.com\/ru\/post\/492568\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/492568\/\">\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u043f\u0438\u0441\u043a\u0438 \u0438\u0437 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e python (selenium) \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0435\u0448\u0438\u043c \u043a\u0430\u043f\u0447\u0443 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 anticaptcha, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e api. \u041f\u0440\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0435 \u0441 \u043a\u0430\u043f\u0447\u0435\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0434\u0430 \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u00ab\u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0445 \u0440\u0430\u0437\u0433\u0430\u0434\u044b\u0432\u0430\u043d\u0438\u0439\u00bb \u043a\u0430\u043f\u0447 \u0441 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043e\u043a\u0430 \u043d\u0438\u0436\u0435.<\/p>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 1-\u044e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438:<a href=\"https:\/\/habr.com\/ru\/post\/461045\/\">\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u044b\u043f\u0438\u0441\u043a\u0443 \u0438\u0437 \u0420\u043e\u0441\u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0424\u0413\u0418\u0421 \u0415\u0413\u0420\u041d \u0438 python. \u0427\u0430\u0441\u0442\u044c 1<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a3\/w1\/-v\/a3w1-vlh35t2eof4mjjwodbxsww.png\"><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-300242","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300242"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/300242\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}