{"id":501305,"date":"2026-11-02T12:13:52","date_gmt":"2026-11-02T09:13:52","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=501305"},"modified":"2026-11-02T12:13:52","modified_gmt":"2026-11-02T09:13:52","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=501305","title":{"rendered":"\u041a\u0430\u043a\u00a0\u044f \u0437\u0430\u0431\u0438\u0440\u0430\u044e \u0447\u0435\u043a\u0438 \u0438\u0437\u00a0\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u041e\u0424\u0414: Selenium, \u0438\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0440\u0430\u0437\u0431\u043e\u0440 JSON"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0415\u0441\u0442\u044c \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u00ab\u043d\u0430\u0436\u043c\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0441\u043a\u0430\u0447\u0430\u0439 \u0444\u0430\u0439\u043b\u00bb, \u0430\u00a0\u043d\u0430\u00a0\u0434\u0435\u043b\u0435 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0442\u0440\u0438 \u0432\u0435\u0449\u0438: \u043a\u0430\u0431\u0438\u043d\u0435\u0442 \u043d\u0435\u00a0\u043e\u0442\u0434\u0430\u0451\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u00a0\u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0435\u043a\u043e\u0432 \u043b\u0435\u0436\u0430\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u00a0\u0448\u0430\u043f\u043e\u043a, \u0430\u00a0\u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u043d\u0435\u00a0\u0440\u0430\u0437\u043e\u0432\u043e, \u0430\u00a0\u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u0412\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0\u2014 \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0443\u00a0\u043c\u0435\u043d\u044f \u0438\u0437\u043d\u0443\u0442\u0440\u0438, \u0441\u00a0\u043a\u043e\u0434\u043e\u043c \u0438 \u0441\u00a0\u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c.<\/p>\n<h3>\u0427\u0442\u043e\u00a0\u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0441\u0442\u044c \u0432\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430<\/h3>\n<p>\u041e\u043d\u043b\u0430\u0439\u043d\u2011\u043a\u0430\u0441\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u041e\u0424\u0414 \u0432\u0438\u0434\u043d\u043e \u0442\u043e, \u0447\u0442\u043e\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b: \u043d\u043e\u043c\u0435\u0440 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u043d\u043e\u043c\u0435\u0440 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f, \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0441\u0441\u044b, \u0441\u0443\u043c\u043c\u0443, \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0438\u00a0\u2014 \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u043e\u0432\u00a0\u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438.<\/p>\n<p>\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e \u00ab\u043f\u0440\u043e\u0441\u0442\u043e\u0439\u00bb \u043e\u0442\u0447\u0451\u0442 \u043f\u043e\u00a0\u043a\u043d\u043e\u043f\u043a\u0435 \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u043f\u043a\u0438. \u041f\u043e\u0437\u0438\u0446\u0438\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432\u00a0\u0442\u0435\u043b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0438 \u0434\u043e\u00a0\u043d\u0438\u0445 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0431\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u0447\u0451\u0442\u043e\u043c, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 API, \u043b\u0438\u0431\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u043e\u00a0\u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0447\u0435\u043a\u0443. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0440\u0443\u0447\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u00a0\u0447\u0430\u0441\u044b: \u0442\u044b\u0441\u044f\u0447\u0430 \u0447\u0435\u043a\u043e\u0432\u00a0\u2014 \u0442\u044b\u0441\u044f\u0447\u0430 \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u0442\u044b \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0435: CSV \u0441\u00a0\u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u00a0\u0437\u0430\u043f\u044f\u0442\u043e\u0439, XLSX, JSON, \u0438\u043d\u043e\u0433\u0434\u0430 PDF \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043a. \u0423\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443, \u0443\u00a0\u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0442\u0447\u0451\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u0444\u043e\u043d\u0435 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442\u00a0\u2014 \u0438 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u043c\u0435\u0442\u044c \u0436\u0434\u0430\u0442\u044c \u043a\u043e\u0434\u043e\u043c, \u0430\u00a0\u043d\u0435\u00a0\u0433\u043b\u0430\u0437\u0430\u043c\u0438.<\/p>\n<h3>\u041f\u043e\u0447\u0435\u043c\u0443 Selenium, \u0430\u00a0\u043d\u0435\u00a0requests<\/h3>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u00ab\u043a\u0430\u043a \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430\u00bb\u00a0\u2014 API. \u0423\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u043d \u0435\u0441\u0442\u044c, \u043d\u043e\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0435: \u0433\u0434\u0435\u2011\u0442\u043e \u0437\u0430\u044f\u0432\u043a\u0430 \u0432\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u0433\u0434\u0435\u2011\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0433\u043e\u0432\u043e\u0440 \u0438 \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u00a0\u043e\u0431\u044a\u0451\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043d\u0443\u0436\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430, \u0430\u00a0\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0API \u043d\u0435\u0442, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u0431\u0438\u043d\u0435\u0442.<\/p>\n<p>\u041a\u0430\u0431\u0438\u043d\u0435\u0442\u00a0\u2014 \u044d\u0442\u043e SPA \u0441\u00a0\u0444\u043e\u0440\u043c\u043e\u0439 \u043b\u043e\u0433\u0438\u043d\u0430, CSRF\u2011\u0442\u043e\u043a\u0435\u043d\u043e\u043c, \u0438\u043d\u043e\u0433\u0434\u0430 \u043a\u0430\u043f\u0447\u0435\u0439 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u00a0SMS. \u041f\u0440\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e, \u043d\u043e\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0434 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c. \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0434\u00a0\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Selenium \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0430\u043a\u00a0\u0436\u0435, \u043a\u0430\u043a\u00a0\u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0438 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043c\u0435\u043d\u0443 \u0432\u0451\u0440\u0441\u0442\u043a\u0438 \u043b\u043e\u0433\u0438\u043d\u0430. \u0414\u0430\u043b\u044c\u0448\u0435\u00a0\u2014 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c: \u043f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u044f \u043d\u0435\u00a0\u043f\u0430\u0440\u0441\u044e HTML, \u0430\u00a0\u0441\u043c\u043e\u0442\u0440\u044e, \u043a\u0430\u043a\u0438\u0435 XHR\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e \u0438\u0445 \u0438\u0437\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<pre><code class=\"python\"># \u043f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435: \u0434\u0435\u0440\u0433\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044bimport jsondef fetch_receipts(driver, period_from, period_to, page=1):    js = \"\"\"    const done = arguments[arguments.length - 1];    fetch('\/api\/v1\/documents?dateFrom=' + arguments[0] +          '&amp;dateTo=' + arguments[1] + '&amp;page=' + arguments[2], {        credentials: 'include',        headers: {'Accept': 'application\/json'}    }).then(r =&gt; r.text()).then(t =&gt; done(t))      .catch(e =&gt; done('ERROR: ' + e));    \"\"\"    driver.set_script_timeout(60)    raw = driver.execute_async_script(js, period_from, period_to, page)    if raw.startswith('ERROR: '):        raise RuntimeError(raw)    return json.loads(raw)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper\"><\/span><\/a><\/div><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0451\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u043e\u00a0\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043b\u043e\u0436\u043d\u0438\u043a\u043e\u043c \u0447\u0443\u0436\u043e\u0433\u043e API: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0430\u00a0\u043b\u0438\u043c\u0438\u0442 \u043d\u0430\u00a0\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432\u00a0\u2014 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u00a0\u043c\u0435\u043d\u044f \u0432\u00a0\u043a\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c\u00a0\u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.<\/p>\n<h3>\u0421\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0436\u0438\u043b\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438<\/h3>\n<p>\u041f\u044f\u0442\u044c \u0448\u0430\u0433\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u00a0\u0442\u044f\u043d\u0443\u043b\u043e \u0437\u0430\u00a0\u0441\u043e\u0431\u043e\u0439 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435:<\/p>\n<ol>\n<li>\n<p>\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 (\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a);<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u00a0\u043a\u0443\u0441\u043a\u0438 \u043f\u043e 7\u201314\u00a0\u0434\u043d\u0435\u0439\u00a0\u2014 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u044b \u043d\u0435\u00a0\u043b\u044e\u0431\u044f\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u0431\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (API \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u0438\u043b\u0438\u00a0\u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441);<\/p>\n<\/li>\n<li>\n<p>\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f: \u0435\u0434\u0438\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u0440\u0443\u0431\u043b\u044f\u0445, \u0432\u0440\u0435\u043c\u044f \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0437\u0430\u043f\u0438\u0441\u044c \u0432\u00a0\u0431\u0430\u0437\u0443 \u043f\u043e\u00a0\u043a\u043b\u044e\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u00a0\u0434\u0430\u0451\u0442 \u0437\u0430\u0434\u0432\u043e\u0438\u0442\u044c \u0447\u0435\u043a \u043f\u0440\u0438\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435.<\/p>\n<\/li>\n<\/ol>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u2011\u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442 \u0445\u0440\u0430\u043d\u0438\u0442, \u0434\u043e\u00a0\u043a\u0430\u043a\u043e\u0439 \u0434\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0437\u0430\u0431\u0440\u0430\u043d\u044b. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u043f\u0430\u043b \u043d\u0430\u00a0\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0441\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0434\u0430\u0442\u044b, \u0430\u00a0\u043d\u0435\u00a0\u043d\u0430\u0447\u043d\u0451\u0442 \u0437\u0430\u043d\u043e\u0432\u043e.<\/p>\n<h3>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430: \u0436\u0434\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0430\u00a0\u043d\u0435\u00a0\u0441\u043f\u0430\u0442\u044c<\/h3>\n<p>\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u00a0\u2014 <code>time.sleep(30)<\/code> \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430. \u041d\u0430\u00a0\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u0430\u043d\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0438\u0442, \u043d\u0430\u00a0\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u00a0\u2014 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0441\u0441\u0435. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u00a0\u2014 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u00a0\u043f\u0430\u043f\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0438 \u0436\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b <code>.crdownload<\/code>.<\/p>\n<pre><code class=\"python\">import globimport osimport timedef download_report(driver, download_dir, click_export, timeout=120):    \"\"\"\u0416\u043c\u0451\u0442 \u00ab\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u00bb \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.\"\"\"    before = set(glob.glob(os.path.join(download_dir, '*')))    click_export()    deadline = time.time() + timeout    while time.time() &lt; deadline:        fresh = set(glob.glob(os.path.join(download_dir, '*'))) - before        ready = [f for f in fresh if not f.endswith('.crdownload')]        if ready:            return ready[0]        time.sleep(1)    raise TimeoutError('\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0437\u0430 %s \u0441' % timeout)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u041f\u0430\u043f\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0437\u0430\u0434\u0430\u044e \u0432\u00a0\u043e\u043f\u0446\u0438\u044f\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438 \u0434\u0435\u043b\u0430\u044e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u00a0\u0437\u0430\u043f\u0443\u0441\u043a, \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0443\u0442\u0430\u044e\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u00ab\u0447\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u043e\u0432\u043e\u0433\u043e\u00bb.<\/p>\n<h3>\u0420\u0430\u0437\u0431\u043e\u0440: \u0448\u0430\u043f\u043a\u0438, \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u043a\u043e\u043f\u0435\u0439\u043a\u0430\u0445<\/h3>\n<p>\u0412\u043d\u0443\u0442\u0440\u0438 JSON \u0441\u0443\u043c\u043c\u044b \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u00a0\u043a\u043e\u043f\u0435\u0439\u043a\u0430\u0445, \u0430\u00a0\u0434\u0430\u0442\u0430\u00a0\u2014 \u043b\u0438\u0431\u043e ISO\u2011\u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u00a0\u0442\u0430\u0439\u043c\u0437\u043e\u043d\u043e\u0439, \u043b\u0438\u0431\u043e \u00ab\u043d\u0430\u0438\u0432\u043d\u043e\u0435\u00bb \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0443\u0447\u0435\u0441\u0442\u044c, \u0432\u00a0\u043e\u0442\u0447\u0451\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u0441\u0442\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0447\u0435\u043a\u0438, \u0443\u0435\u0445\u0430\u0432\u0448\u0438\u0435 \u043d\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432.<\/p>\n<pre><code class=\"python\">import pandas as pddef receipts_to_frame(payload):    rows = []    for doc in payload.get('documents', []):        head = doc['header']        rows.append({            'fn': doc['fn'],            'fd': int(doc['fiscalDocumentNumber']),            'fpd': doc['fiscalDocumentSign'],            'dt': pd.to_datetime(head['dateTime'], utc=True)                    .tz_convert('Europe\/Moscow'),            'kkt': head['kktRegNumber'],            'operation': int(head['operationType']),            'total': int(head['totalSum']) \/ 100,            'cash': int(head.get('cashSum', 0)) \/ 100,            'card': int(head.get('ecashSum', 0)) \/ 100,        })    return pd.DataFrame(rows)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p><code>operationType<\/code>\u00a0\u2014 \u0442\u043e, \u0438\u0437\u2011\u0437\u0430 \u0447\u0435\u0433\u043e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u00ab\u043d\u0435 \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u00a0\u0431\u0430\u043d\u043a\u043e\u043c\u00bb: \u043f\u0440\u0438\u0445\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0430, \u0440\u0430\u0441\u0445\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0442\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u00a0\u043e\u0431\u0449\u0443\u044e \u0432\u044b\u0440\u0443\u0447\u043a\u0443, \u0438\u0445 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043e\u0442\u0447\u0451\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u0432\u0435\u0440\u043a\u0430 \u0441\u00a0\u044d\u043a\u0432\u0430\u0439\u0440\u0438\u043d\u0433\u043e\u043c \u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430.<\/p>\n<h3>\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c: \u043f\u043e\u0447\u0435\u043c\u0443 \u043a\u043b\u044e\u0447\u00a0\u2014 \u043d\u0435 \u00ab\u0434\u0430\u0442\u0430 + \u0441\u0443\u043c\u043c\u0430\u00bb<\/h3>\n<p>\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u043f\u0440\u0438\u0448\u043b\u043e, \u0430\u00a0\u0434\u0443\u0431\u043b\u0438 \u0432\u044b\u0447\u0438\u0449\u0430\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u00ab\u0443\u0434\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u00a0\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0441\u0443\u043c\u043c\u043e\u0439\u00bb. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u043e\u00a0\u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0434\u043d\u044f \u0441\u00a0\u0434\u0432\u0443\u043c\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0447\u0435\u043a\u0430\u043c\u0438 \u043d\u0430 350\u00a0\u0440\u0443\u0431\u043b\u0435\u0439 \u0432\u00a0\u043e\u0434\u043d\u0443 \u043c\u0438\u043d\u0443\u0442\u0443\u00a0\u2014 \u0438 \u0443\u0434\u0430\u043b\u044f\u043b\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0447\u0435\u043a.<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447\u00a0\u2014 \u0441\u0432\u044f\u0437\u043a\u0430 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b \u0432\u00a0\u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0435\u00a0\u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u043d.<\/p>\n<pre><code class=\"sql\">create table if not exists ofd_receipt (    fn          text          not null,    fd          bigint        not null,    fpd         text          not null,    dt          timestamptz   not null,    kkt         text          not null,    operation   smallint      not null,    total       numeric(12,2) not null,    cash        numeric(12,2) not null default 0,    card        numeric(12,2) not null default 0,    loaded_at   timestamptz   not null default now(),    primary key (fn, fd));<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<p>\u0417\u0430\u043f\u0438\u0441\u044c\u00a0\u2014 \u043e\u0434\u043d\u0438\u043c <code>insert ... on conflict do update<\/code>: \u0435\u0441\u043b\u0438 \u0447\u0435\u043a \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0443\u043c\u043c\u044b \u0438 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u043e\u0433\u0434\u0430 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u0430 \u00ab\u043f\u0435\u0440\u0435\u0437\u0430\u043b\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u00bb \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439.<\/p>\n<pre><code class=\"python\">import psycopg2.extrasSQL = \"\"\"insert into ofd_receipt (fn, fd, fpd, dt, kkt, operation, total, cash, card)values %son conflict (fn, fd) do update set    total = excluded.total,    cash = excluded.cash,    card = excluded.card,    loaded_at = now()\"\"\"def save(conn, frame):    rows = [tuple(r) for r in frame[[        'fn', 'fd', 'fpd', 'dt', 'kkt', 'operation', 'total', 'cash', 'card'    ]].itertuples(index=False, name=None)]    with conn.cursor() as cur:        psycopg2.extras.execute_values(cur, SQL, rows, page_size=500)    conn.commit()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><span class=\"sc-logo-wrapper icon-only\"><\/span><\/a><\/div><\/pre>\n<h3>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0437\u043d\u0430\u0451\u0448\u044c \u043d\u0430\u00a0\u0432\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435<\/h3>\n<p><strong>\u041b\u0438\u043c\u0438\u0442 \u043d\u0430\u00a0\u043e\u0442\u0447\u0451\u0442\u044b.<\/strong> \u041a\u0430\u0431\u0438\u043d\u0435\u0442\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0430: \u0433\u0434\u0435\u2011\u0442\u043e \u043d\u0435\u00a0\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0437\u0430\u00a0\u0440\u0430\u0437, \u0433\u0434\u0435\u2011\u0442\u043e\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0415\u0441\u043b\u0438 \u0434\u043e\u043b\u0431\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u00a0\u0446\u0438\u043a\u043b\u0435, \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442 \u043b\u0438\u0431\u043e \u043a\u0430\u043f\u0447\u0430, \u043b\u0438\u0431\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u043f\u0430\u0443\u0437\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0430.<\/p>\n<p><strong>\u0414\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043a\u0430.<\/strong> \u0412\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u00a0SMS \u043b\u043e\u043c\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0445\u043e\u0434. \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u0441\u00a0\u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440, \u0431\u0435\u0437 2FA, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0441\u0441\u0438\u044f \u0436\u0438\u043b\u0430 \u043d\u0435\u0434\u0435\u043b\u044f\u043c\u0438.<\/p>\n<p><strong>\u0412\u0451\u0440\u0441\u0442\u043a\u0430.<\/strong> \u0421\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u043e\u00a0CSS\u2011\u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0436\u0438\u0432\u0443\u0442 \u0434\u043e\u00a0\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0440\u0435\u0434\u0438\u0437\u0430\u0439\u043d\u0430. \u042f \u0434\u0435\u0440\u0436\u0443 \u0432\u00a0\u043a\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u00a0\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u043e <code>data-testid<\/code>, \u0430\u00a0\u043d\u0435\u00a0\u043f\u043e\u00a0\u0446\u0435\u043f\u043e\u0447\u043a\u0435 <code>div &gt; div &gt; span<\/code>.<\/p>\n<p><strong>\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441.<\/strong> \u041a\u0430\u0431\u0438\u043d\u0435\u0442 \u043e\u0442\u0434\u0430\u0451\u0442 \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u0441\u0441\u044b, \u0430\u00a0\u043d\u0435\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u0443\u00a0\u0442\u043e\u0447\u0435\u043a \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b, \u00ab\u0432\u0447\u0435\u0440\u0430\u00bb \u0443\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0432\u043e\u0451\u00a0\u2014 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u0434\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0441\u0441\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 \u043d\u0430\u00a0\u0441\u0442\u044b\u043a\u0435 \u0441\u0443\u0442\u043e\u043a \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u043a\u0438.<\/p>\n<p><strong>\u0420\u0430\u0437\u043d\u044b\u0435 \u041e\u0424\u0414 \u0432\u00a0\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438.<\/strong> \u0423\u00a0\u0441\u0435\u0442\u0438 \u0438\u0437\u00a0\u0434\u0435\u0441\u044f\u0442\u0438 \u0442\u043e\u0447\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438: \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u2011\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0441\u0441 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u00a0\u0435\u0434\u0438\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u00a0\u0432\u0445\u043e\u0434\u0435, \u0434\u043e\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0431\u0430\u0437\u0443, \u0438\u043d\u0430\u0447\u0435 \u0441\u043a\u043b\u0435\u0439\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0440\u0443\u0447\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<h3>\u0427\u0442\u043e\u00a0\u0432 \u0438\u0442\u043e\u0433\u0435<\/h3>\n<p>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u00a0\u043e\u0434\u043d\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0435\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u043e\u043a\u043e\u043b\u043e 400\u00a0\u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430: \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0434\u0432\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0431\u0430\u0437\u0430 \u0438 cron. \u0420\u0430\u0437 \u0432\u00a0\u0441\u0443\u0442\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0447\u0435\u043a\u0438, \u043f\u0438\u0448\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u00a0\u0431\u0430\u0437\u0443 \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 CSV \u0432\u00a0\u043f\u0430\u043f\u043a\u0443; \u0435\u0441\u043b\u0438 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u0430\u0434\u0430\u0435\u0442\u00a0\u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432\u00a0\u0442\u043e\u0442\u00a0\u0436\u0435 \u0434\u0435\u043d\u044c, \u0430\u00a0\u043d\u0435\u00a0\u0432\u00a0\u0434\u0435\u043d\u044c \u0441\u0434\u0430\u0447\u0438 \u043e\u0442\u0447\u0451\u0442\u0430.<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u00a0\u043d\u0430\u0434\u043e: \u0435\u0441\u043b\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0437 \u0432\u00a0\u043a\u0432\u0430\u0440\u0442\u0430\u043b\u00a0\u2014 \u0445\u0432\u0430\u0442\u0438\u0442 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0438\u0437\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430, \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u0440\u0430\u0431\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u0443\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 API \u0438 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e\u00a0\u0437\u0430\u044f\u0432\u043a\u0435\u00a0\u2014 \u0438\u0434\u0438\u0442\u0435 \u0432\u00a0API, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0443\u0442 \u043b\u0438\u0448\u043d\u0438\u0439 \u0441\u043b\u043e\u0439. Selenium \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d \u0440\u043e\u0432\u043d\u043e \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435: \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e, \u0430\u00a0\u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u0440\u043e\u043c\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043d\u0435\u0442.<\/p>\n<p>\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u00a0\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0435\u043a\u043e\u0432: \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u0430 \u043d\u043e\u043c\u0435\u043d\u043a\u043b\u0430\u0442\u0443\u0440\u0430, \u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c \u043a\u00a0\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u00a0\u0440\u0430\u0437\u044b \u0431\u043e\u043b\u044c\u0448\u0435\u00a0\u2014 \u043f\u043e\u00a0\u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430\u00a0\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438\u043b\u0438\u00a0\u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u0441\u00a0\u043b\u0438\u043c\u0438\u0442\u043e\u043c. \u042d\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443: \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0439, \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043d\u0435\u00a0\u043c\u0438\u043d\u0443\u0442\u0430\u043c\u0438, \u0430\u00a0\u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u043c\u0438\u043d\u0443\u0442.<\/p>\n<\/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\/articles\/1102590\/\">https:\/\/habr.com\/ru\/articles\/1102590\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0415\u0441\u0442\u044c \u0442\u0438\u043f \u0437\u0430\u0434\u0430\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u00ab\u043d\u0430\u0436\u043c\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u0438 \u0441\u043a\u0430\u0447\u0430\u0439 \u0444\u0430\u0439\u043b\u00bb, \u0430\u00a0\u043d\u0430\u00a0\u0434\u0435\u043b\u0435 \u0443\u043f\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0442\u0440\u0438 \u0432\u0435\u0449\u0438: \u043a\u0430\u0431\u0438\u043d\u0435\u0442 \u043d\u0435\u00a0\u043e\u0442\u0434\u0430\u0451\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430\u00a0\u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0435\u043a\u043e\u0432 \u043b\u0435\u0436\u0430\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u00a0\u0448\u0430\u043f\u043e\u043a, \u0430\u00a0\u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u043d\u0435\u00a0\u0440\u0430\u0437\u043e\u0432\u043e, \u0430\u00a0\u043a\u0430\u0436\u0434\u0443\u044e \u043d\u0435\u0434\u0435\u043b\u044e. \u0412\u00a0\u0441\u0442\u0430\u0442\u044c\u0435\u00a0\u2014 \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0443\u00a0\u043c\u0435\u043d\u044f \u0438\u0437\u043d\u0443\u0442\u0440\u0438, \u0441\u00a0\u043a\u043e\u0434\u043e\u043c \u0438 \u0441\u00a0\u0442\u0435\u043c, \u0447\u0442\u043e\u00a0\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c.\u0427\u0442\u043e\u00a0\u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0441\u0442\u044c \u0432\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u041e\u043d\u043b\u0430\u0439\u043d\u2011\u043a\u0430\u0441\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0443 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u041e\u0424\u0414 \u0432\u0438\u0434\u043d\u043e \u0442\u043e, \u0447\u0442\u043e\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b: \u043d\u043e\u043c\u0435\u0440 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u043d\u043e\u043c\u0435\u0440 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u0437\u043d\u0430\u043a, \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043c\u044f, \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0441\u0441\u044b, \u0441\u0443\u043c\u043c\u0443, \u043f\u0440\u0438\u0437\u043d\u0430\u043a \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0438\u00a0\u2014 \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u043e\u0432\u00a0\u2014 \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043f\u043e\u0437\u0438\u0446\u0438\u0438.\u0418\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e \u00ab\u043f\u0440\u043e\u0441\u0442\u043e\u0439\u00bb \u043e\u0442\u0447\u0451\u0442 \u043f\u043e\u00a0\u043a\u043d\u043e\u043f\u043a\u0435 \u043e\u0442\u0434\u0430\u0451\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0448\u0430\u043f\u043a\u0438. \u041f\u043e\u0437\u0438\u0446\u0438\u0438 \u043b\u0435\u0436\u0430\u0442 \u0432\u00a0\u0442\u0435\u043b\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0438 \u0434\u043e\u00a0\u043d\u0438\u0445 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043b\u0438\u0431\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u043e\u0442\u0447\u0451\u0442\u043e\u043c, \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 API, \u043b\u0438\u0431\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u043e\u0439 \u043f\u043e\u00a0\u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0447\u0435\u043a\u0443. \u042d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0433\u0434\u0435 \u0440\u0443\u0447\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u0440\u0430\u0441\u0442\u0430\u0435\u0442 \u0432\u00a0\u0447\u0430\u0441\u044b: \u0442\u044b\u0441\u044f\u0447\u0430 \u0447\u0435\u043a\u043e\u0432\u00a0\u2014 \u0442\u044b\u0441\u044f\u0447\u0430 \u043a\u0430\u0440\u0442\u043e\u0447\u0435\u043a.\u0424\u043e\u0440\u043c\u0430\u0442\u044b \u0442\u043e\u0436\u0435 \u0440\u0430\u0437\u043d\u044b\u0435: CSV \u0441\u00a0\u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u00a0\u0437\u0430\u043f\u044f\u0442\u043e\u0439, XLSX, JSON, \u0438\u043d\u043e\u0433\u0434\u0430 PDF \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0447\u0435\u043a. \u0423\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0440\u0430\u0437\u0443, \u0443\u00a0\u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0442\u0447\u0451\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u00a0\u0444\u043e\u043d\u0435 \u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442\u00a0\u2014 \u0438 \u044d\u0442\u043e \u043d\u0430\u0434\u043e \u0443\u043c\u0435\u0442\u044c \u0436\u0434\u0430\u0442\u044c \u043a\u043e\u0434\u043e\u043c, \u0430\u00a0\u043d\u0435\u00a0\u0433\u043b\u0430\u0437\u0430\u043c\u0438.\u041f\u043e\u0447\u0435\u043c\u0443 Selenium, \u0430\u00a0\u043d\u0435\u00a0requests\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u00ab\u043a\u0430\u043a \u0437\u0430\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430\u00bb\u00a0\u2014 API. \u0423\u00a0\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u043d \u0435\u0441\u0442\u044c, \u043d\u043e\u00a0\u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0440\u0430\u0437\u043d\u044b\u0435: \u0433\u0434\u0435\u2011\u0442\u043e \u0437\u0430\u044f\u0432\u043a\u0430 \u0432\u00a0\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443, \u0433\u0434\u0435\u2011\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0433\u043e\u0432\u043e\u0440 \u0438 \u043e\u043f\u043b\u0430\u0442\u0430 \u0437\u0430\u00a0\u043e\u0431\u044a\u0451\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043d\u0443\u0436\u043d\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430, \u0430\u00a0\u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a\u00a0API \u043d\u0435\u0442, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043a\u0430\u0431\u0438\u043d\u0435\u0442.\u041a\u0430\u0431\u0438\u043d\u0435\u0442\u00a0\u2014 \u044d\u0442\u043e SPA \u0441\u00a0\u0444\u043e\u0440\u043c\u043e\u0439 \u043b\u043e\u0433\u0438\u043d\u0430, CSRF\u2011\u0442\u043e\u043a\u0435\u043d\u043e\u043c, \u0438\u043d\u043e\u0433\u0434\u0430 \u043a\u0430\u043f\u0447\u0435\u0439 \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u043e\u00a0SMS. \u041f\u0440\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043c\u043e\u0436\u043d\u043e, \u043d\u043e\u00a0\u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u0445\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u043e\u0434 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c. \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0434\u00a0\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c Selenium \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e \u0442\u0430\u043a\u00a0\u0436\u0435, \u043a\u0430\u043a\u00a0\u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u0438 \u043f\u0435\u0440\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u043c\u0435\u043d\u0443 \u0432\u0451\u0440\u0441\u0442\u043a\u0438 \u043b\u043e\u0433\u0438\u043d\u0430. \u0414\u0430\u043b\u044c\u0448\u0435\u00a0\u2014 \u0432\u0430\u0436\u043d\u044b\u0439 \u043f\u0440\u0438\u0451\u043c: \u043f\u043e\u0441\u043b\u0435 \u043b\u043e\u0433\u0438\u043d\u0430 \u044f \u043d\u0435\u00a0\u043f\u0430\u0440\u0441\u044e HTML, \u0430\u00a0\u0441\u043c\u043e\u0442\u0440\u044e, \u043a\u0430\u043a\u0438\u0435 XHR\u2011\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e \u0438\u0445 \u0438\u0437\u00a0\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.# \u043f\u043e\u0441\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435: \u0434\u0435\u0440\u0433\u0430\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0438\u0437 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044bimport jsondef fetch_receipts(driver, period_from, period_to, page=1):    js = &#171;&#187;&#187;    const done = arguments[arguments.length &#8212; 1];    fetch(&#8216;\/api\/v1\/documents?dateFrom=&#8217; + arguments[0] +          &#8216;&amp;dateTo=&#8217; + arguments[1] + &#8216;&amp;page=&#8217; + arguments[2], {        credentials: &#8216;include&#8217;,        headers: {&#8216;Accept&#8217;: &#8216;application\/json&#8217;}    }).then(r =&gt; r.text()).then(t =&gt; done(t))      .catch(e =&gt; done(&#8216;ERROR: &#8216; + e));    &#171;&#187;&#187;    driver.set_script_timeout(60)    raw = driver.execute_async_script(js, period_from, period_to, page)    if raw.startswith(&#8216;ERROR: &#8216;):        raise RuntimeError(raw)    return json.loads(raw)\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u0430\u0451\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043d\u043e\u00a0\u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0437\u0430\u043b\u043e\u0436\u043d\u0438\u043a\u043e\u043c \u0447\u0443\u0436\u043e\u0433\u043e API: \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f, \u0430\u00a0\u043b\u0438\u043c\u0438\u0442 \u043d\u0430\u00a0\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432\u00a0\u2014 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u00a0\u043c\u0435\u043d\u044f \u0432\u00a0\u043a\u043e\u0434\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c\u00a0\u2014 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c \u043c\u0435\u0436\u0434\u0443 \u043d\u0438\u043c\u0438.\u0421\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0435\u0440\u0435\u0436\u0438\u043b\u0430 \u043f\u043e\u043b\u0433\u043e\u0434\u0430 \u044d\u043a\u0441\u043f\u043b\u0443\u0430\u0442\u0430\u0446\u0438\u0438\u041f\u044f\u0442\u044c \u0448\u0430\u0433\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043d\u0435\u00a0\u0442\u044f\u043d\u0443\u043b\u043e \u0437\u0430\u00a0\u0441\u043e\u0431\u043e\u0439 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435:\u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 (\u0441 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u00a0\u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a);\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u00a0\u043a\u0443\u0441\u043a\u0438 \u043f\u043e 7\u201314\u00a0\u0434\u043d\u0435\u0439\u00a0\u2014 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u044b \u043d\u0435\u00a0\u043b\u044e\u0431\u044f\u0442 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b;\u0437\u0430\u0431\u043e\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (API \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u0438\u043b\u0438\u00a0\u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441);\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f: \u0435\u0434\u0438\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u0440\u0443\u0431\u043b\u044f\u0445, \u0432\u0440\u0435\u043c\u044f \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0447\u0430\u0441\u043e\u0432\u043e\u043c \u043f\u043e\u044f\u0441\u0435;\u0437\u0430\u043f\u0438\u0441\u044c \u0432\u00a0\u0431\u0430\u0437\u0443 \u043f\u043e\u00a0\u043a\u043b\u044e\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u00a0\u0434\u0430\u0451\u0442 \u0437\u0430\u0434\u0432\u043e\u0438\u0442\u044c \u0447\u0435\u043a \u043f\u0440\u0438\u00a0\u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0435.\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u2011\u0447\u0435\u043a\u043f\u043e\u0438\u043d\u0442 \u0445\u0440\u0430\u043d\u0438\u0442, \u0434\u043e\u00a0\u043a\u0430\u043a\u043e\u0439 \u0434\u0430\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0436\u0435 \u0437\u0430\u0431\u0440\u0430\u043d\u044b. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0443\u043f\u0430\u043b \u043d\u0430\u00a0\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0441\u00a0\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u0434\u0430\u0442\u044b, \u0430\u00a0\u043d\u0435\u00a0\u043d\u0430\u0447\u043d\u0451\u0442 \u0437\u0430\u043d\u043e\u0432\u043e.\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430: \u0436\u0434\u0430\u0442\u044c \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u044f, \u0430\u00a0\u043d\u0435\u00a0\u0441\u043f\u0430\u0442\u044c\u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430\u00a0\u2014 time.sleep(30) \u043f\u043e\u0441\u043b\u0435 \u043a\u043b\u0438\u043a\u0430. \u041d\u0430\u00a0\u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u043c \u043a\u0430\u043d\u0430\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0445\u0432\u0430\u0442\u0438\u0442, \u043d\u0430\u00a0\u0431\u044b\u0441\u0442\u0440\u043e\u043c\u00a0\u2014 \u043f\u043e\u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043c\u0438\u043d\u0443\u0442\u044b \u043d\u0430\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0441\u0441\u0435. \u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u00a0\u2014 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432\u00a0\u043f\u0430\u043f\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0438 \u0436\u0434\u0430\u0442\u044c, \u043f\u043e\u043a\u0430 \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b .crdownload.import globimport osimport timedef download_report(driver, download_dir, click_export, timeout=120):    &#171;&#187;&#187;\u0416\u043c\u0451\u0442 \u00ab\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u00bb \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0443\u0442\u044c \u043a \u0433\u043e\u0442\u043e\u0432\u043e\u043c\u0443 \u0444\u0430\u0439\u043b\u0443.&#187;&#187;&#187;    before = set(glob.glob(os.path.join(download_dir, &#8216;*&#8217;)))    click_export()    deadline = time.time() + timeout    while time.time() &lt; deadline:        fresh = set(glob.glob(os.path.join(download_dir, &#8216;*&#8217;))) &#8212; before        ready = [f for f in fresh if not f.endswith(&#8216;.crdownload&#8217;)]        if ready:            return ready[0]        time.sleep(1)    raise TimeoutError(&#8216;\u044d\u043a\u0441\u043f\u043e\u0440\u0442 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0441\u044f \u0437\u0430 %s \u0441&#8217; % timeout)\u041f\u0430\u043f\u043a\u0443 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u043a \u0437\u0430\u0434\u0430\u044e \u0432\u00a0\u043e\u043f\u0446\u0438\u044f\u0445 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u0438 \u0434\u0435\u043b\u0430\u044e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u00a0\u0437\u0430\u043f\u0443\u0441\u043a, \u0438\u043d\u0430\u0447\u0435 \u0441\u0442\u0430\u0440\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0443\u0442\u0430\u044e\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u00ab\u0447\u0435\u0433\u043e \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u043d\u043e\u0432\u043e\u0433\u043e\u00bb.\u0420\u0430\u0437\u0431\u043e\u0440: \u0448\u0430\u043f\u043a\u0438, \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0438 \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u043a\u043e\u043f\u0435\u0439\u043a\u0430\u0445\u0412\u043d\u0443\u0442\u0440\u0438 JSON \u0441\u0443\u043c\u043c\u044b \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u00a0\u043a\u043e\u043f\u0435\u0439\u043a\u0430\u0445, \u0430\u00a0\u0434\u0430\u0442\u0430\u00a0\u2014 \u043b\u0438\u0431\u043e ISO\u2011\u0441\u0442\u0440\u043e\u043a\u0430 \u0441\u00a0\u0442\u0430\u0439\u043c\u0437\u043e\u043d\u043e\u0439, \u043b\u0438\u0431\u043e \u00ab\u043d\u0430\u0438\u0432\u043d\u043e\u0435\u00bb \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0443\u0447\u0435\u0441\u0442\u044c, \u0432\u00a0\u043e\u0442\u0447\u0451\u0442\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0443\u043c\u043c\u044b \u0432\u00a0\u0441\u0442\u043e \u0440\u0430\u0437 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0447\u0435\u043a\u0438, \u0443\u0435\u0445\u0430\u0432\u0448\u0438\u0435 \u043d\u0430\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432.import pandas as pddef receipts_to_frame(payload):    rows = []    for doc in payload.get(&#8216;documents&#8217;, []):        head = doc[&#8216;header&#8217;]        rows.append({            &#8216;fn&#8217;: doc[&#8216;fn&#8217;],            &#8216;fd&#8217;: int(doc[&#8216;fiscalDocumentNumber&#8217;]),            &#8216;fpd&#8217;: doc[&#8216;fiscalDocumentSign&#8217;],            &#8216;dt&#8217;: pd.to_datetime(head[&#8216;dateTime&#8217;], utc=True)                    .tz_convert(&#8216;Europe\/Moscow&#8217;),            &#8216;kkt&#8217;: head[&#8216;kktRegNumber&#8217;],            &#8216;operation&#8217;: int(head[&#8216;operationType&#8217;]),            &#8216;total&#8217;: int(head[&#8216;totalSum&#8217;]) \/ 100,            &#8216;cash&#8217;: int(head.get(&#8216;cashSum&#8217;, 0)) \/ 100,            &#8216;card&#8217;: int(head.get(&#8216;ecashSum&#8217;, 0)) \/ 100,        })    return pd.DataFrame(rows)operationType\u00a0\u2014 \u0442\u043e, \u0438\u0437\u2011\u0437\u0430 \u0447\u0435\u0433\u043e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u00ab\u043d\u0435 \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u00a0\u0431\u0430\u043d\u043a\u043e\u043c\u00bb: \u043f\u0440\u0438\u0445\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0430, \u0440\u0430\u0441\u0445\u043e\u0434, \u0432\u043e\u0437\u0432\u0440\u0430\u0442 \u0440\u0430\u0441\u0445\u043e\u0434\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0442\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432\u00a0\u043e\u0431\u0449\u0443\u044e \u0432\u044b\u0440\u0443\u0447\u043a\u0443, \u0438\u0445 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u043e\u0442\u0447\u0451\u0442\u0430. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u00a0\u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u0432\u0435\u0440\u043a\u0430 \u0441\u00a0\u044d\u043a\u0432\u0430\u0439\u0440\u0438\u043d\u0433\u043e\u043c \u043d\u0435\u00a0\u0437\u0430\u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430.\u0418\u0434\u0435\u043c\u043f\u043e\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u044c: \u043f\u043e\u0447\u0435\u043c\u0443 \u043a\u043b\u044e\u0447\u00a0\u2014 \u043d\u0435 \u00ab\u0434\u0430\u0442\u0430 + \u0441\u0443\u043c\u043c\u0430\u00bb\u041f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432\u0441\u0451, \u0447\u0442\u043e\u00a0\u043f\u0440\u0438\u0448\u043b\u043e, \u0430\u00a0\u0434\u0443\u0431\u043b\u0438 \u0432\u044b\u0447\u0438\u0449\u0430\u043b\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u00ab\u0443\u0434\u0430\u043b\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u00a0\u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0434\u0430\u0442\u043e\u0439 \u0438 \u0441\u0443\u043c\u043c\u043e\u0439\u00bb. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0434\u043e\u00a0\u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0434\u043d\u044f \u0441\u00a0\u0434\u0432\u0443\u043c\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438 \u0447\u0435\u043a\u0430\u043c\u0438 \u043d\u0430 350\u00a0\u0440\u0443\u0431\u043b\u0435\u0439 \u0432\u00a0\u043e\u0434\u043d\u0443 \u043c\u0438\u043d\u0443\u0442\u0443\u00a0\u2014 \u0438 \u0443\u0434\u0430\u043b\u044f\u043b\u043e \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0447\u0435\u043a.\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447\u00a0\u2014 \u0441\u0432\u044f\u0437\u043a\u0430 \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u043d\u043e\u043c\u0435\u0440\u0430 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438 \u0444\u0438\u0441\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b \u0432\u00a0\u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044f, \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e\u00a0\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043d\u0435\u00a0\u043f\u0435\u0440\u0435\u043f\u0435\u0447\u0430\u0442\u0430\u043d.create table if not exists ofd_receipt (    fn          text          not null,    fd          bigint        not null,    fpd         text          not null,    dt          timestamptz   not null,    kkt         text          not null,    operation   smallint      not null,    total       numeric(12,2) not null,    cash        numeric(12,2) not null default 0,    card        numeric(12,2) not null default 0,    loaded_at   timestamptz   not null default now(),    primary key (fn, fd));\u0417\u0430\u043f\u0438\u0441\u044c\u00a0\u2014 \u043e\u0434\u043d\u0438\u043c insert &#8230; on conflict do update: \u0435\u0441\u043b\u0438 \u0447\u0435\u043a \u0443\u0436\u0435 \u0435\u0441\u0442\u044c, \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u0443\u043c\u043c\u044b \u0438 \u0432\u0440\u0435\u043c\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438. \u0422\u043e\u0433\u0434\u0430 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0433\u043e\u043d \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0433\u043e\u0434\u043d\u043e, \u0430 \u00ab\u043f\u0435\u0440\u0435\u0437\u0430\u043b\u0438\u0442\u044c \u043f\u0435\u0440\u0438\u043e\u0434\u00bb \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u0451\u0442 \u0431\u044b\u0442\u044c \u043e\u043f\u0430\u0441\u043d\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439.import psycopg2.extrasSQL = &#171;&#187;&#187;insert into ofd_receipt (fn, fd, fpd, dt, kkt, operation, total, cash, card)values %son conflict (fn, fd) do update set    total = excluded.total,    cash = excluded.cash,    card = excluded.card,    loaded_at = now()&#187;&#187;&#187;def save(conn, frame):    rows = [tuple(r) for r in frame[[        &#8216;fn&#8217;, &#8216;fd&#8217;, &#8216;fpd&#8217;, &#8216;dt&#8217;, &#8216;kkt&#8217;, &#8216;operation&#8217;, &#8216;total&#8217;, &#8216;cash&#8217;, &#8216;card&#8217;    ]].itertuples(index=False, name=None)]    with conn.cursor() as cur:        psycopg2.extras.execute_values(cur, SQL, rows, page_size=500)    conn.commit()\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f, \u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0437\u043d\u0430\u0451\u0448\u044c \u043d\u0430\u00a0\u0432\u0442\u043e\u0440\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435\u041b\u0438\u043c\u0438\u0442 \u043d\u0430\u00a0\u043e\u0442\u0447\u0451\u0442\u044b. \u041a\u0430\u0431\u0438\u043d\u0435\u0442\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0447\u0438\u0441\u043b\u043e \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a \u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u043f\u0435\u0440\u0438\u043e\u0434\u0430: \u0433\u0434\u0435\u2011\u0442\u043e \u043d\u0435\u00a0\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043c\u0435\u0441\u044f\u0446\u0430 \u0437\u0430\u00a0\u0440\u0430\u0437, \u0433\u0434\u0435\u2011\u0442\u043e\u00a0\u2014 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0439 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043d\u0443\u0442. \u0415\u0441\u043b\u0438 \u0434\u043e\u043b\u0431\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432\u00a0\u0446\u0438\u043a\u043b\u0435, \u043f\u0440\u0438\u043b\u0435\u0442\u0438\u0442 \u043b\u0438\u0431\u043e \u043a\u0430\u043f\u0447\u0430, \u043b\u0438\u0431\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430. \u041b\u0435\u0447\u0438\u0442\u0441\u044f \u043f\u0430\u0443\u0437\u0430\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0430.\u0414\u0432\u0443\u0445\u0444\u0430\u043a\u0442\u043e\u0440\u043a\u0430. \u0412\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u00a0SMS \u043b\u043e\u043c\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0432\u0445\u043e\u0434. \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u00a0\u2014 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430 \u0441\u00a0\u043f\u0440\u0430\u0432\u0430\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u00a0\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440, \u0431\u0435\u0437 2FA, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u0435\u0441\u0441\u0438\u044f \u0436\u0438\u043b\u0430 \u043d\u0435\u0434\u0435\u043b\u044f\u043c\u0438.\u0412\u0451\u0440\u0441\u0442\u043a\u0430. \u0421\u0435\u043b\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u043e\u00a0CSS\u2011\u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0436\u0438\u0432\u0443\u0442 \u0434\u043e\u00a0\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043e \u0440\u0435\u0434\u0438\u0437\u0430\u0439\u043d\u0430. \u042f \u0434\u0435\u0440\u0436\u0443 \u0432\u00a0\u043a\u043e\u0434\u0435 \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u00a0\u0432\u0438\u0434\u0438\u043c\u043e\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u043f\u043e data-testid, \u0430\u00a0\u043d\u0435\u00a0\u043f\u043e\u00a0\u0446\u0435\u043f\u043e\u0447\u043a\u0435 div &gt; div &gt; span.\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441. \u041a\u0430\u0431\u0438\u043d\u0435\u0442 \u043e\u0442\u0434\u0430\u0451\u0442 \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u0441\u0441\u044b, \u0430\u00a0\u043d\u0435\u00a0\u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0415\u0441\u043b\u0438 \u0443\u00a0\u0442\u043e\u0447\u0435\u043a \u0440\u0430\u0437\u043d\u044b\u0435 \u0440\u0435\u0433\u0438\u043e\u043d\u044b, \u00ab\u0432\u0447\u0435\u0440\u0430\u00bb \u0443\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0432\u043e\u0451\u00a0\u2014 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u0430 \u043d\u0430\u0434\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0441\u0441\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0438\u043d\u0430\u0447\u0435 \u043d\u0430\u00a0\u0441\u0442\u044b\u043a\u0435 \u0441\u0443\u0442\u043e\u043a \u0442\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0447\u0435\u043a\u0438.\u0420\u0430\u0437\u043d\u044b\u0435 \u041e\u0424\u0414 \u0432\u00a0\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438. \u0423\u00a0\u0441\u0435\u0442\u0438 \u0438\u0437\u00a0\u0434\u0435\u0441\u044f\u0442\u0438 \u0442\u043e\u0447\u0435\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c\u0438: \u043a\u043e\u043b\u043e\u043d\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u2011\u0440\u0430\u0437\u043d\u043e\u043c\u0443, \u043d\u043e\u043c\u0435\u0440\u0430 \u043a\u0430\u0441\u0441 \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u00a0\u0435\u0434\u0438\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u00a0\u0432\u0445\u043e\u0434\u0435, \u0434\u043e\u00a0\u0437\u0430\u043f\u0438\u0441\u0438 \u0432\u00a0\u0431\u0430\u0437\u0443, \u0438\u043d\u0430\u0447\u0435 \u0441\u043a\u043b\u0435\u0439\u043a\u0430 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0440\u0443\u0447\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443.\u0427\u0442\u043e\u00a0\u0432 \u0438\u0442\u043e\u0433\u0435\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430\u00a0\u043e\u0434\u043d\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0441\u0435\u0442\u044c\u00a0\u2014 \u044d\u0442\u043e \u043e\u043a\u043e\u043b\u043e 400\u00a0\u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430: \u0431\u0440\u0430\u0443\u0437\u0435\u0440, \u0434\u0432\u0430 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0431\u0430\u0437\u0430 \u0438 cron. \u0420\u0430\u0437 \u0432\u00a0\u0441\u0443\u0442\u043a\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0447\u0435\u043a\u0438, \u043f\u0438\u0448\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432\u00a0\u0431\u0430\u0437\u0443 \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 CSV \u0432\u00a0\u043f\u0430\u043f\u043a\u0443; \u0435\u0441\u043b\u0438 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u0430\u0434\u0430\u0435\u0442\u00a0\u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0432\u00a0\u0442\u043e\u0442\u00a0\u0436\u0435 \u0434\u0435\u043d\u044c, \u0430\u00a0\u043d\u0435\u00a0\u0432\u00a0\u0434\u0435\u043d\u044c \u0441\u0434\u0430\u0447\u0438 \u043e\u0442\u0447\u0451\u0442\u0430.\u041a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u00a0\u043d\u0430\u0434\u043e: \u0435\u0441\u043b\u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0443\u0436\u043d\u0430 \u0440\u0430\u0437 \u0432\u00a0\u043a\u0432\u0430\u0440\u0442\u0430\u043b\u00a0\u2014 \u0445\u0432\u0430\u0442\u0438\u0442 \u0440\u0443\u0447\u043d\u043e\u0433\u043e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 \u0438\u0437\u00a0\u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0430, \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u0440\u0430\u0431\u043e\u0442\u044b. \u0415\u0441\u043b\u0438 \u0443\u00a0\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u0435\u0441\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 API \u0438 \u043e\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e\u00a0\u0437\u0430\u044f\u0432\u043a\u0435\u00a0\u2014 \u0438\u0434\u0438\u0442\u0435 \u0432\u00a0API, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0442\u0443\u0442 \u043b\u0438\u0448\u043d\u0438\u0439 \u0441\u043b\u043e\u0439. Selenium \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u043d \u0440\u043e\u0432\u043d\u043e \u0432\u00a0\u043e\u0434\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435: \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u044b \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e, \u0430\u00a0\u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u043a\u0440\u043e\u043c\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u043d\u0435\u0442.\u041e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u00a0\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0447\u0435\u043a\u043e\u0432: \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u0430 \u043d\u043e\u043c\u0435\u043d\u043a\u043b\u0430\u0442\u0443\u0440\u0430, \u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c \u043a\u00a0\u0442\u043e\u043c\u0443, \u0447\u0442\u043e\u00a0\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0432\u00a0\u0440\u0430\u0437\u044b \u0431\u043e\u043b\u044c\u0448\u0435\u00a0\u2014 \u043f\u043e\u00a0\u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430\u00a0\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438\u043b\u0438\u00a0\u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u0441\u00a0\u043b\u0438\u043c\u0438\u0442\u043e\u043c. \u042d\u0442\u043e \u043c\u0435\u043d\u044f\u0435\u0442 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443: \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0437\u0430\u0434\u0430\u043d\u0438\u0439, \u0438 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043d\u0435\u00a0\u043c\u0438\u043d\u0443\u0442\u0430\u043c\u0438, \u0430\u00a0\u0434\u0435\u0441\u044f\u0442\u043a\u0430\u043c\u0438 \u043c\u0438\u043d\u0443\u0442.\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1102590\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-501305","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/501305","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=501305"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/501305\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=501305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=501305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=501305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}