{"id":347288,"date":"2023-03-26T03:00:27","date_gmt":"2023-03-26T03:00:27","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=347288"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=347288","title":{"rendered":"<span>\u041a\u0430\u043a \u044f \u0443\u0441\u043a\u043e\u0440\u0438\u043b \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0432 Python<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u043f\u043e\u043b\u043d\u043e, \u043a\u0430\u043a \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0438 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044f \u043a\u0430\u043c\u043d\u044f\u043c\u0438, \u0441\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0432\u0451\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u0444\u0444\u0438\u043a\u0430 Android-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f endpoints, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u043d\u0435\u0436\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 HTML-\u0434\u0435\u0440\u0435\u0432\u0430.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/7f8\/297\/376\/7f829737604a8762a41b4592c15ddde9.jpg\" alt=\"\" title=\"\" width=\"687\" height=\"500\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7f8\/297\/376\/7f829737604a8762a41b4592c15ddde9.jpg\" data-blurred=\"true\"\/><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0432\u0435\u043b\u0438\u043a\u043e\u0433\u043e \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430 \u0441 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u043e\u043c. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432 \u043c\u043e\u0435\u0439 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 <code>Selenium<\/code> \u0438 <code>X-Path<\/code> \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <code>lxml<\/code> \u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <code>Selenium<\/code>.<\/p>\n<p>\u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043f\u0440\u044f\u043c\u043e-\u0442\u0430\u043a\u0438 \u043f\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u0435 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0443 \u0441\u0435\u0431\u044f <code>Selenium Grid<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/SeleniumHQ\/docker-selenium\/blob\/trunk\/docker-compose-v3.yml\" rel=\"noopener noreferrer nofollow\">docker-compose \u0444\u0430\u0439\u043b<\/a>, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043a\u0440\u043e\u043c\u0435 <code>Chrome<\/code> \u0438 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044f instance&#8217;\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0435. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0440\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0443 \u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u043e\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c-\u0442\u043e \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0435\u0439 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f. \u0415\u0449\u0451 \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0432 100 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438\u0437 100. \u041d\u043e \u0432\u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u0432\u0440\u0435\u043c\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0430 10-17 \u0441\u0435\u043a\u0443\u043d\u0434, \u0447\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>\u041d\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0441\u0435\u0431\u044f \u0434\u043e\u043b\u0433\u043e \u0436\u0434\u0430\u0442\u044c \u0438 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0447\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 SSR \u0438 \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c JSON \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0432\u043e\u0435\u0433\u043e html.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6c6\/022\/fae\/6c6022fae9187f835a0f2b470c2078f5.png\" width=\"1004\" height=\"382\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6c6\/022\/fae\/6c6022fae9187f835a0f2b470c2078f5.png\"\/><\/figure>\n<p>&#171;\u0412\u043e\u0442 \u043e\u043d\u043e, \u0440\u0435\u0448\u0435\u043d\u0438\u0435&#187; &#8212; \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0442\u043e\u0433\u0434\u0430. \u0418 \u043f\u043e\u0431\u0435\u0436\u0430\u043b \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c <code>Selenium<\/code>, \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 <code>requests<\/code>, \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u044f \u0438\u0437 \u0433\u043e\u043b\u043e\u0432\u044b \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043e\u043a\u043d\u043e \u043a\u0430\u043f\u0447\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u044f \u0434\u0430\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u043e\u0441\u044c \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u044d\u0442\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u042f \u0434\u0430\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import re   class DictSearch:     def __init__(self, data: dict):         self.input_item = data      # \u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0441 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u043d\u0435\u0442     def search(                self,                 search_value: str,                 search_by_key: bool = False,                 partial: bool = False     ):         results = []          def process(data, path: str):             if not isinstance(data, dict):                 return None             for key, value in data.items():                 if search_by_key:                     if key == search_value:                         results.append(f'{path}.{key}')                 prefix = '.' if path != '' else ''                 if isinstance(value, dict):                     process(data.get(key), f'{path}{prefix}{key}')                 if isinstance(value, list):                     for index, i in enumerate(value):                         process(i, f'{path}{prefix}{key}[{index}]')                 else:                     if partial and isinstance(value, str):                         if search_value in value:                             results.append(f'{path}{prefix}{key}')                     if search_value == value:                         results.append(f'{path}{prefix}{key}')          process(self.input_item, '')          return results[0] if len(results) == 1 else results      # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0443\u0442\u0438 \u0432\u0438\u0434\u0430 value.items[0].name     def get_value(self, path: str):         path_iter = path.split('.')          def process(current, item):             lists = re.findall(r'[\\d+]+', current)             key = re.findall('[a-zA-Z]+', current)[0]             if len(lists):                 return item.get(key)[int(lists[0])]             else:                 return item.get(current)          res = self.input_item          for i in path_iter:             res = process(i, res)         return res      # \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0435\u0437\u0430\u0442\u044c count \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0441 \u043a\u043e\u043d\u0446\u0430 \u043f\u0443\u0442\u0438     @staticmethod     def cut_path(path: str, count: int):         process = path.split('.')[:-count]         return '.'.join(process) <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ac\/32a\/f2d\/7ac32af2daefef90f1c42ef6f20acf17.png\" width=\"875\" height=\"195\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/7ac\/32a\/f2d\/7ac32af2daefef90f1c42ef6f20acf17.png\"\/><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u041f\u043b\u044e\u0441\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/h2>\n<ul>\n<li>\n<p>\u043e\u0431\u044a\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 <code>Chrome<\/code> \u0438 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e <code>Selenium\/Hub<\/code><\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0430\u0441\u044c \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432 5 \u0440\u0430\u0437<\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u0438\u043d\u0443\u0441\u044b:<\/h2>\n<ul>\n<li>\n<p>\u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0434\u0435\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u043e\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c. \u041e \u043d\u0435\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u043e\u0444\u0442\u0438\u043d\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/www.charlesproxy.com\/\" rel=\"noopener noreferrer nofollow\">Charles Proxy<\/a>. \u041a\u043e\u0440\u043e\u0442\u043a\u043e, \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c <code>HTTP<\/code> \u0442\u0440\u0430\u0444\u0438\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 proxy-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0435\u0442\u0438). \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043b\u0443\u0448\u0430\u0442\u044c <code>HTTPS<\/code> \u0442\u0440\u0430\u0444\u0438\u043a. \u0418 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u0435\u0440\u044a\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 <a href=\"https:\/\/github.com\/NVISOsecurity\/MagiskTrustUserCerts\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 Magisk-\u043c\u043e\u0434\u0443\u043b\u044c<\/a> \u043d\u0430 \u0441\u0432\u043e\u0439 Android-\u0434\u0435\u0432\u0430\u0439\u0441. \u0418 \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0437\u0430\u0432\u0435\u043b\u043e\u0441\u044c (\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0443 \u043c\u0435\u043d\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0435 <code>HTTPS<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u044b), \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c &#171;\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442&#187;. \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <code>HTTP Toolkit<\/code>. \u041f\u0440\u0438\u0446\u0438\u043f \u0435\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043a \u043d\u0435\u0439 \u043f\u043e-\u043b\u0443\u0447\u0448\u0435. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443 \u043c\u0435\u043d\u044f-\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0440\u043b\u044b \u0438 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, <code>root<\/code> \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442. <a href=\"https:\/\/httptoolkit.com\/docs\/guides\/android\/\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f Android-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/a>. <\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0430\u043c URL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u044c:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd5\/af7\/ded\/bd5af7dedffb8ee7e2ebf766224bab54.png\" width=\"505\" height=\"38\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bd5\/af7\/ded\/bd5af7dedffb8ee7e2ebf766224bab54.png\"\/><\/figure>\n<p>\u0410 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"python\">headers = {     'User-Agent': 'ali-android-13-567-8.20.341.823566',     'x-aer-client-type': 'android',     'x-aer-lang': 'en_RU',     'x-aer-currency': 'RUB',     'x-aer-ship-to-country': 'RU',     'x-appkey': 'XXXXXXXX',     'accept': 'application\/json',     'x-aer-device-id': 'X0XXxX+Xxx0XXX0XxxXXxx0X' }<\/code><\/pre>\n<p>\u0422.\u043a. \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u043e \u0432 \u0442\u0435\u043b\u0435 \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<pre><code class=\"python\"># \u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0446\u0438\u0444\u0435\u0440\u043a\u0438 \u0438\u0437 URL \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u043e\u0432\u0430\u0440\u0430  body = {     'productId': re.findall(r'\\d+.html', url)[0].split('.')[0] }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u043f\u043e\u0441\u043b\u0443\u0448\u043d\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 <code>JSON<\/code> \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0451 \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u0432\u0430\u0440\u0435.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u043e\u0440\u044f \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043f\u0447\u0438 \u0431\u044b\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u043b\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0438\u0445 \u043a\u043e\u043b-\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>lxml<\/code> \u044f \u0432\u044b\u043a\u0438\u043d\u0443\u043b, \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0432 \u0437\u0430\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0443 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \ud83d\ude42<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u043b \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u043b \u0432 <code>asyncio.gather([...])<\/code>, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0432 \u0435\u0449\u0451 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u0441\u043e\u0442\u0435\u043d \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e \u0432\u044b\u0448\u0435, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>aiohttp<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>requests<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0435\u0435.<\/p>\n<p>\u042d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0438\u0434\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438 \u0431\u043e\u0440\u043e\u0442\u044c \u0441\u0435\u0431\u044f \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/724780\/\"> https:\/\/habr.com\/ru\/post\/724780\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041c\u0430\u043d\u0443\u0430\u043b\u043e\u0432 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 Python \u043f\u043e\u043b\u043d\u043e, \u043a\u0430\u043a \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0443, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435, \u0438 \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0437\u0430\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044f \u043a\u0430\u043c\u043d\u044f\u043c\u0438, \u0441\u0440\u0430\u0437\u0443 \u043e\u0433\u043e\u0432\u043e\u0440\u044e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0442\u0435\u043c\u0435 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0440\u0435\u0432\u0451\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u0444\u0444\u0438\u043a\u0430 Android-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f endpoints, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0442\u043e, \u0447\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u043d\u0435\u0436\u0435\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u043e\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0441\u0438\u043d\u0433 HTML-\u0434\u0435\u0440\u0435\u0432\u0430.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f: \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0432\u0435\u043b\u0438\u043a\u043e\u0433\u043e \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0438\u0442\u0430\u0439\u0441\u043a\u043e\u0433\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441\u0430 \u0441 \u043a\u0440\u0430\u0441\u043d\u044b\u043c \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u043e\u043c. \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0432 \u043c\u043e\u0435\u0439 \u0433\u043e\u043b\u043e\u0432\u0435 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0440\u043e\u043c\u0435 <code>Selenium<\/code> \u0438 <code>X-Path<\/code> \u043d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <code>lxml<\/code> \u0438 \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 <code>Selenium<\/code>.<\/p>\n<p>\u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0441\u0451 \u043f\u0440\u044f\u043c\u043e-\u0442\u0430\u043a\u0438 \u043f\u043e \u043a\u0440\u0430\u0441\u043e\u0442\u0435 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0443 \u0441\u0435\u0431\u044f <code>Selenium Grid<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/SeleniumHQ\/docker-selenium\/blob\/trunk\/docker-compose-v3.yml\" rel=\"noopener noreferrer nofollow\">docker-compose \u0444\u0430\u0439\u043b<\/a>, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u043a\u0438\u043d\u0443\u0432 \u0438\u0437 \u043d\u0435\u0433\u043e \u0432\u0441\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043a\u0440\u043e\u043c\u0435 <code>Chrome<\/code> \u0438 \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u044f instance&#8217;\u044b, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u043b\u0443\u0447\u0448\u0435. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e, \u0447\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0435\u0440\u0443\u044e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u0443 \u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u0435\u0442 \u0432\u0430\u0448 \u0441\u043a\u0440\u0438\u043f\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u043e\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u0441\u043e\u0432\u0441\u0435\u043c-\u0442\u043e \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0439 \u043a\u043e\u043f\u0438\u0435\u0439 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u044f. \u0415\u0449\u0451 \u043f\u043e\u043b\u0447\u0430\u0441\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0432 100 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438\u0437 100. \u041d\u043e \u0432\u043e\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 &#8212; \u0432\u0440\u0435\u043c\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0430 10-17 \u0441\u0435\u043a\u0443\u043d\u0434, \u0447\u0442\u043e \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0433\u0440\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<p>\u041d\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043d\u0435 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0441\u0435\u0431\u044f \u0434\u043e\u043b\u0433\u043e \u0436\u0434\u0430\u0442\u044c \u0438 \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0447\u0442\u043e \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 SSR \u0438 \u0432\u044b\u0432\u0430\u043b\u0438\u0432\u0430\u0435\u0442 \u0432\u0435\u0441\u044c JSON \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0432\u043e\u0435\u0433\u043e html.<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>&#171;\u0412\u043e\u0442 \u043e\u043d\u043e, \u0440\u0435\u0448\u0435\u043d\u0438\u0435&#187; &#8212; \u043f\u043e\u0434\u0443\u043c\u0430\u043b \u044f \u0442\u043e\u0433\u0434\u0430. \u0418 \u043f\u043e\u0431\u0435\u0436\u0430\u043b \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c <code>Selenium<\/code>, \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u043d\u0430 <code>requests<\/code>, \u043d\u0435 \u0443\u0431\u0438\u0440\u0430\u044f \u0438\u0437 \u0433\u043e\u043b\u043e\u0432\u044b \u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u044f \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u043e\u043a\u043d\u043e \u043a\u0430\u043f\u0447\u0438, \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u044f \u0434\u0430\u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0430\u0440\u0441\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u043b \u043f\u0440\u043e\u043a\u0441\u0438 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u042f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0433\u043e \u043d\u0435 \u043f\u0440\u043e\u0434\u0435\u0440\u0436\u0430\u043b\u043e\u0441\u044c \u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u044d\u0442\u0438 \u043f\u0440\u043e\u043a\u0441\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u043d\u044b \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u042f \u0434\u0430\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0446\u0438\u044e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u043c\u0438 \u0434\u0435\u0440\u0435\u0432\u044c\u044f\u043c\u0438:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"python\">import re   class DictSearch:     def __init__(self, data: dict):         self.input_item = data      # \u0414\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u0430 \u0442\u0430\u043a \u0436\u0435 \u0441 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u043c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435\u043c \u0438\u043b\u0438 \u043d\u0435\u0442     def search(                self,                 search_value: str,                 search_by_key: bool = False,                 partial: bool = False     ):         results = []          def process(data, path: str):             if not isinstance(data, dict):                 return None             for key, value in data.items():                 if search_by_key:                     if key == search_value:                         results.append(f'{path}.{key}')                 prefix = '.' if path != '' else ''                 if isinstance(value, dict):                     process(data.get(key), f'{path}{prefix}{key}')                 if isinstance(value, list):                     for index, i in enumerate(value):                         process(i, f'{path}{prefix}{key}[{index}]')                 else:                     if partial and isinstance(value, str):                         if search_value in value:                             results.append(f'{path}{prefix}{key}')                     if search_value == value:                         results.append(f'{path}{prefix}{key}')          process(self.input_item, '')          return results[0] if len(results) == 1 else results      # \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0443\u0442\u0438 \u0432\u0438\u0434\u0430 value.items[0].name     def get_value(self, path: str):         path_iter = path.split('.')          def process(current, item):             lists = re.findall(r'[\\d+]+', current)             key = re.findall('[a-zA-Z]+', current)[0]             if len(lists):                 return item.get(key)[int(lists[0])]             else:                 return item.get(current)          res = self.input_item          for i in path_iter:             res = process(i, res)         return res      # \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0440\u0435\u0437\u0430\u0442\u044c count \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0441 \u043a\u043e\u043d\u0446\u0430 \u043f\u0443\u0442\u0438     @staticmethod     def cut_path(path: str, count: int):         process = path.split('.')[:-count]         return '.'.join(process) <\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"full-width\"><\/figure>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u041f\u043b\u044e\u0441\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/h2>\n<ul>\n<li>\n<p>\u043e\u0431\u044a\u0435\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043b\u0441\u044f \u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u0437\u0430 \u0441\u0447\u0451\u0442 \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 <code>Chrome<\/code> \u0438 \u0435\u0449\u0451 \u043e\u0434\u043d\u043e\u0433\u043e <code>Selenium\/Hub<\/code><\/p>\n<\/li>\n<li>\n<p>\u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0430\u0441\u044c \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c \u0432 5 \u0440\u0430\u0437<\/p>\n<\/li>\n<\/ul>\n<h2>\u041c\u0438\u043d\u0443\u0441\u044b:<\/h2>\n<ul>\n<li>\n<p>\u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435\u0434\u0435\u043b\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u0430 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043d\u043e\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c. \u041e \u043d\u0435\u0439 \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0443.<\/p>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u043e\u0444\u0442\u0438\u043d\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/www.charlesproxy.com\/\" rel=\"noopener noreferrer nofollow\">Charles Proxy<\/a>. \u041a\u043e\u0440\u043e\u0442\u043a\u043e, \u0441\u0443\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c <code>HTTP<\/code> \u0442\u0440\u0430\u0444\u0438\u043a \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 proxy-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 IP-\u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430 (\u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0441\u0435\u0442\u0438). \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442, \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043b\u0443\u0448\u0430\u0442\u044c <code>HTTPS<\/code> \u0442\u0440\u0430\u0444\u0438\u043a. \u0418 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u043f\u0443\u043d\u043a\u0442\u043e\u043c \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0441\u0435\u0440\u044a\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u0431\u043b\u0430\u0433\u043e\u043f\u043e\u043b\u043e\u0447\u043d\u043e \u0440\u0435\u0448\u0438\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0432 <a href=\"https:\/\/github.com\/NVISOsecurity\/MagiskTrustUserCerts\" rel=\"noopener noreferrer nofollow\">\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 Magisk-\u043c\u043e\u0434\u0443\u043b\u044c<\/a> \u043d\u0430 \u0441\u0432\u043e\u0439 Android-\u0434\u0435\u0432\u0430\u0439\u0441. \u0418 \u0434\u0430\u0436\u0435 \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0451 \u0437\u0430\u0432\u0435\u043b\u043e\u0441\u044c (\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0443 \u043c\u0435\u043d\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u0441\u0435 <code>HTTPS<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u044b), \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c &#171;\u0432\u0438\u0434\u0435\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442&#187;. \u0412 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 <code>HTTP Toolkit<\/code>. \u041f\u0440\u0438\u0446\u0438\u043f \u0435\u0451 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u043a \u043d\u0435\u0439 \u043f\u043e-\u043b\u0443\u0447\u0448\u0435. \u0421 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443 \u043c\u0435\u043d\u044f-\u0442\u0430\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0443\u0440\u043b\u044b \u0438 \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, <code>root<\/code> \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442. <a href=\"https:\/\/httptoolkit.com\/docs\/guides\/android\/\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0434\u043b\u044f Android-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432<\/a>. <\/p>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430:<\/p>\n<details class=\"spoiler\">\n<summary>\u0421\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0421\u0430\u043c URL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u044c:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0410 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"python\">headers = {     'User-Agent': 'ali-android-13-567-8.20.341.823566',     'x-aer-client-type': 'android',     'x-aer-lang': 'en_RU',     'x-aer-currency': 'RUB',     'x-aer-ship-to-country': 'RU',     'x-appkey': 'XXXXXXXX',     'accept': 'application\/json',     'x-aer-device-id': 'X0XXxX+Xxx0XXX0XxxXXxx0X' }<\/code><\/pre>\n<p>\u0422.\u043a. \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u043b \u0431\u044b\u0442\u044c POST-\u0437\u0430\u043f\u0440\u043e\u0441, \u0442\u043e \u0432 \u0442\u0435\u043b\u0435 \u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435:<\/p>\n<pre><code class=\"python\"># \u0417\u0434\u0435\u0441\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0446\u0438\u0444\u0435\u0440\u043a\u0438 \u0438\u0437 URL \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u043e\u0432\u0430\u0440\u0430  body = {     'productId': re.findall(r'\\d+.html', url)[0].split('.')[0] }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441, \u043c\u0430\u0440\u043a\u0435\u0442\u043f\u043b\u0435\u0439\u0441 \u043f\u043e\u0441\u043b\u0443\u0448\u043d\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 <code>JSON<\/code> \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0432\u0441\u0451 \u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c \u0442\u043e\u0432\u0430\u0440\u0435.<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u043e\u0440\u044f \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u043f\u0447\u0438 \u0431\u044b\u043b\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0435\u043d\u043d\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0438\u043c\u0435\u043b\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0430 \u0438\u0445 \u043a\u043e\u043b-\u0432\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c. \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>lxml<\/code> \u044f \u0432\u044b\u043a\u0438\u043d\u0443\u043b, \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0432 \u0437\u0430\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0443 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442 \u043d\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \ud83d\ude42<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u043b \u0438\u0445 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0437\u0430\u043a\u0438\u0434\u044b\u0432\u0430\u043b \u0432 <code>asyncio.gather([...])<\/code>, \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0432 \u0435\u0449\u0451 \u043f\u0430\u0440\u043e\u0447\u043a\u0443 \u0441\u043e\u0442\u0435\u043d \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0432\u0438\u0434\u043d\u043e \u0432\u044b\u0448\u0435, \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <code>aiohttp<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>requests<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0435\u0435.<\/p>\n<p>\u042d\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u043f\u0440\u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0438 \u0442\u043e\u0439 \u0438\u043b\u0438 \u0438\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0438\u0434\u0442\u0438 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0438 \u0431\u043e\u0440\u043e\u0442\u044c \u0441\u0435\u0431\u044f \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0433\u0434\u0430 \u0447\u0442\u043e-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \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\/724780\/\"> https:\/\/habr.com\/ru\/post\/724780\/<\/a><br \/><\/br><\/br><\/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-347288","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347288","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=347288"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347288\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347288"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}