{"id":125657,"date":"2023-10-06T22:59:43","date_gmt":"2023-10-06T19:59:43","guid":{"rendered":"https:\/\/mob25.com\/?p=125657"},"modified":"2024-03-01T23:17:53","modified_gmt":"2024-03-01T20:17:53","slug":"parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress","status":"publish","type":"post","link":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/","title":{"rendered":"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python &#8212; \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress"},"content":{"rendered":"\n<p>\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Beautiful Soup, \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 python-wordpress-xmlrpc. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/h3>\n\n\n\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043d\u0430 \u041b\u0438\u0442\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u043d\u043a\u0438, \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u0434\u0430\u0442\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043d\u0438\u0433 \u0438\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c\u0438. \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0446\u0438\u043a\u043b \u0434\u043b\u044f \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043f\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c.<\/p>\n\n\n\n<p> \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f &#8212; \u0432 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u043d\u0438\u0433\u0438 \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0430 (\u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b). \u0421\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043a\u043d\u0438\u0433\u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0432 CSV \u043d\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f. \u041a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0444\u0435\u0440\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0430\u0439\u0442.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import requests\nfrom bs4 import BeautifulSoup\nfrom time import sleep\nimport os\n\nfrom wordpress_xmlrpc import Client, WordPressPost\nfrom wordpress_xmlrpc.compat import xmlrpc_client\nfrom wordpress_xmlrpc.methods import media, posts<\/pre>\n\n\n\n<p>\u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0430\u0439\u0442\u0443 \u043d\u0430 WordPress \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 xmlrpc.php, \u043b\u043e\u0433\u0438\u043d \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430. \u0427\u0430\u0441\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0437\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043f\u0438\u044e \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0438 \u0441\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">client = Client('https:\/\/mob25.com\/ xmlrpc.php', '\u043b\u043e\u0433\u0438\u043d', '\u043f\u0430\u0440\u043e\u043b\u044c')<\/pre>\n\n\n\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u0421\u0447\u0435\u0442\u0447\u0438\u043a \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043d\u0438\u0433 (\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c), \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e &#8212; \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0438 \u0430\u0443\u0434\u0438\u043e\u043a\u043d\u0438\u0433\u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u043b\u044e\u0431\u043e\u0439 \u0440\u0430\u0437\u0434\u0435\u043b \u043d\u0430 \u043b\u0438\u0442\u0440\u0435\u0441, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440\u044b \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u0437 \u0441\u0441\u044b\u043b\u043a\u0438. \u0422\u0440\u0435\u0442\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 &#8212; RefID \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0442\u043d\u0435\u0440\u0441\u043a\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0438.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg\" alt=\"\" class=\"wp-image-125823\" style=\"width:382px;height:405px\" width=\"382\" height=\"405\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2023\/10\/parametry.jpg 560w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2023\/10\/parametry-283x300.jpg 283w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><meta itemprop=\"width\" content=\"382\"><meta itemprop=\"height\" content=\"405\"><\/span><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">all_count = 0\noptions = '?art_types=text_book&amp;art_types=audiobook&amp;languages=ru'\nref = '?lfrom=477110899'<\/pre>\n\n\n\n<p>\u0414\u0430\u043b\u0435\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0434\u0432\u0430 \u0444\u0430\u0439\u043b\u0430: new.txt (\u0441\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439) \u0438 id.txt (\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u0432 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043d\u0438\u0433). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 &#8212; \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u044b (\u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">with open(\"new.txt\", \"r\", encoding=\"utf-8\") as file_cl:\n    category_list = file_cl.read().split('\\n')\n\nwith open(\"id.txt\", \"r\", encoding=\"utf-8\") as file_id:\n    all_id = file_id.read().split('\\n')\nfile_id.close()<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0446\u0438\u043a\u043b. \u041f\u0430\u0443\u0437\u0430, \u0447\u0442\u043e\u0431\u044b \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u043d\u0435 \u043d\u0430\u0447\u0430\u043b \u0432\u044b\u043a\u0438\u0434\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043f\u0447\u0443 (\u0435\u0441\u043b\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c, \u0441 \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u0443\u0437\u043e\u0439 \u043d\u0435 \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442). \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0443\u0437\u0430 \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043d\u0438\u0433\u0438. \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0435 \u0432 \u0432\u0438\u0434\u0435 \u0444\u0430\u0439\u043b\u0430 current_category.html. \u0421\u0440\u0430\u0437\u0443 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e src. \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043d\u043e \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 &#8212; \u043c\u043e\u0436\u043d\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0444\u0430\u0439\u043b &#8212; \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u043e\u043c.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">for category in category_list:\n    sleep(20)\n    req = requests.get(f'{category}{options}', headers=headers, cookies = cookies)\n    src = req.text\n  \n    with open(f\"temp_html\/current_category.html\", \"w\", encoding=\"utf-8\") as file:\n        file.write(src)\n    \n    with open(f\"temp_html\/current_category.html\", encoding=\"utf-8\") as file:  \n        src = file.read()<\/pre>\n\n\n\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0430\u0440\u0441\u0435\u0440\u0430. \u0421\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f name_category_clear &#8212; \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0431\u0435\u0437 \u0441\u043b\u0435\u0448\u0435\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u043d\u0435\u0442 &#8212; \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0435 (\u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u043d\u0438\u0433). \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438.<br>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e list_href \u043f\u0430\u0440\u0441\u0438\u043c \u0431\u043b\u043e\u043a\u0438 \u0441 \u0441\u0441\u044b\u043b\u043a\u0430\u043c\u0438 \u043d\u0430 \u043a\u043d\u0438\u0433\u0438. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    soup = BeautifulSoup(src, \"lxml\")\n    name_category = soup.find(\"div\", class_=\"Genre-module__title__name_JuQ14\").text\n    name_category_clear = name_category.replace('\/', '') \n    if not os.path.exists(f'temp_html\/{name_category_clear}\/'):\n        os.makedirs(f'temp_html\/{name_category_clear}\/')\n    list_href = soup.find_all('a', {'data-test-id': ['art__title--desktop']})\n<\/pre>\n\n\n\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u043f\u043e \u0441\u043f\u0438\u0441\u043a\u0443 \u043a\u043d\u0438\u0433. \u041e\u0447\u0438\u0449\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0447\u0438\u0441\u0442\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043a\u043d\u0438\u0433\u0443 (\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f link). \u0418\u0437 \u0441\u0441\u044b\u043b\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c id \u043a\u043d\u0438\u0433\u0438. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 id \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0445, \u0435\u0441\u043b\u0438 \u0435\u0441\u0442\u044c &#8212; \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430, \u043a\u043d\u0438\u0433\u0430 \u043d\u0435 \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f \u0438 \u043d\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442 &#8212; \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c id \u0432 \u0441\u043f\u0438\u0441\u043e\u043a all_id \u0438 \u0434\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 \u043e\u0431\u0449\u0438\u0439 \u0444\u0430\u0439\u043b id.txt. <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">    for href in list_href:\n        title, author, isbn, description, id, count_author = '', '', '', '', '', ''\n        \n        link = (f\"{href.get('href')}\")\n        id = ((link.split('-'))[-1])[:-1]\n        if id in all_id:\n            print(f'\u0434\u0443\u0431\u043b\u044c - {id}')\n            continue\n        sleep(20)\n        all_id.append(id)\n        with open(\"id.txt\", \"a\", encoding=\"utf-8\") as file_id:\n            file_id.write(f'{id}\\n')<\/pre>\n\n\n\n<p>\u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e &#8212; \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a\u043d\u0438\u0433\u0438, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432 \u0444\u0430\u0439\u043b \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        req = requests.get(f\"https:\/\/www.litres.ru{link}\", headers=headers, cookies = cookies)\n        src = req.text\n\n        with open(f\"temp_html\/{name_category_clear}\/{id}.html\", \"w\", encoding=\"utf-8\") as file_book:\n            file_book.write(src)\n    \n        with open(f\"temp_html\/{name_category_clear}\/{id}.html\", \"r\", encoding=\"utf-8\") as file_book:\n            src = file_book.read()\n        soup = BeautifulSoup(src, \"lxml\")<\/pre>\n\n\n\n<p>\u0421\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435, \u0434\u043b\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 if. <br>count_author &#8212; \u043d\u0430\u0434\u043f\u0438\u0441\u044c &#171;\u0410\u0432\u0442\u043e\u0440&#187; \u0438\u043b\u0438 &#171;\u0410\u0432\u0442\u043e\u0440\u044b&#187; \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0430. \u0410\u0432\u0442\u043e\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u043f\u0438\u0441\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0440\u0430\u0437\u0443 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u044f\u0442\u044b\u0445. description &#8212; \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043f\u0430\u0440\u0430\u0433\u0440\u0430\u0444\u0430\u043c\u0438 \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        title = soup.find(\"h1\").text\n        if soup.find(class_=\"Authors-module__authors_2_blq\"):\n            count_author = soup.find(class_=\"Authors-module__authors_2_blq\").find(\"h4\").text\n\n        isbn = soup.find(\"span\", itemprop=\"isbn\")\n        if isbn:\n            isbn = isbn.text\n        if soup.find(class_=\"Authors-module__authors_2_blq\"):\n            author = soup.find(\"div\", class_=\"Authors-module__authors__wrapper_1rZey\").find_all(\"span\", itemprop=\"name\")\n        for i in range(len(author)):\n            print(author[i])\n\n            if author[i]:\n                author[i] = author[i].text\n\n        author = ', '.join(map(str, author))     \n        description = soup.find(class_=\"BookCard-module__book__annotation_2ZIhf\").find_all('p')<\/pre>\n\n\n\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0432 \u043f\u0430\u043f\u043a\u0443 image. \u0428\u0430\u0431\u043b\u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043f\u0438\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430. \u0415\u0441\u043b\u0438 \u0443\u0431\u0440\u0430\u0442\u044c &#171;_250&#187;, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f, \u043d\u043e \u043e\u043d\u0430 \u0438\u043c\u0435\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f id.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        p = requests.get(f'https:\/\/www.litres.ru\/pub\/c\/cover_250\/{id}.jpg')\n        out = open(f'image\/{id}.jpg', \"wb\")\n        out.write(p.content)\n        out.close()<\/pre>\n\n\n\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0430 \u0441\u0430\u0439\u0442 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0430 \u043d\u0435\u0435 \u043f\u0440\u044f\u043c\u0443\u044e \u0441\u0441\u044b\u043b\u043a\u0443, \u0434\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0435\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043e\u0448\u0438\u0431\u043a\u0438 (\u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u0441\u044f).<\/p>\n\n\n\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c\u0438 \u0438\u0437 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438: <a href=\"https:\/\/python-wordpress-xmlrpc.readthedocs.io\/en\/latest\/examples\/media.html#uploading-a-file\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/python-wordpress-xmlrpc.readthedocs.io\/en\/latest\/examples\/media.html#uploading-a-file<\/a><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        if os.path.exists(f'image\/{id}.jpg'):\n\n            image_name = f'{id}.jpg'\n            filename = f'image\/{image_name}'\n            data = {\n            'name': image_name,\n            'type': 'image\/jpeg',}\n\n            with open(filename, 'rb') as img:\n                data['bits'] = xmlrpc_client.Binary(img.read())\n\n            response = client.call(media.UploadFile(data))\n        attachment_url = response['url'] <\/pre>\n\n\n\n<p>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043d\u0438\u0433\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e wpcontent. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0443\u0441\u0442\u044b\u0445 \u043c\u0435\u0441\u0442. \u041d\u0438\u0436\u0435 \u0444\u043e\u0442\u043e \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">        wpcontent = ''\n        wpcontent += f'&lt;!-- wp:paragraph -->'\n        wpcontent += ''.join(map(str, description))\n        wpcontent += f'&lt;!-- \/wp:paragraph -->'\n        wpcontent += f'&lt;!-- wp:paragraph -->'\n        if count_author:\n            wpcontent += f'{count_author}: {author}&lt;br>'\n        if isbn:\n            wpcontent += f'ISBN: {isbn}&lt;br>'\n        wpcontent += f'&lt;!-- \/wp:paragraph -->'\n        wpcontent += f'&lt;!-- wp:paragraph -->'\n        wpcontent += f'&lt;br>&lt;a href=\"https:\/\/www.litres.ru{link}{ref}\" target=\"_blank\" rel=\"noreferrer noopener\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043a\u043d\u0438\u0433\u0443&lt;\/a>&lt;br>&lt;br>'\n        wpcontent += f'&lt;!-- \/wp:paragraph -->'\n        if os.path.exists (f'image\/{id}.jpg'):\n            wpcontent += f'&lt;figure class=\"wp-block-image size-full\">'\n            wpcontent += f'&lt;img src=\"{attachment_url}\">'\n            wpcontent += f'&lt;\/figure>'<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><span itemprop=\"image\" itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><img itemprop=\"url image\" loading=\"lazy\" decoding=\"async\" width=\"791\" height=\"685\" src=\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/rezultat.jpg\" alt=\"\" class=\"wp-image-126337\" srcset=\"https:\/\/mob25.com\/blog\/wp-content\/uploads\/2023\/10\/rezultat.jpg 791w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2023\/10\/rezultat-300x260.jpg 300w, https:\/\/mob25.com\/blog\/wp-content\/uploads\/2023\/10\/rezultat-768x665.jpg 768w\" sizes=\"auto, (max-width: 791px) 100vw, 791px\" \/><meta itemprop=\"width\" content=\"791\"><meta itemprop=\"height\" content=\"685\"><\/span><\/figure>\n\n\n\n<p>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c post.post_status. \u0417\u0430\u043f\u0438\u0441\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0438.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">post = WordPressPost()\n        post.terms_names = {'category': [name_category],}\n        post.title = title\n        post.content = (wpcontent)\n        post.post_status = 'publish'\n        post.id = client.call(posts.NewPost(post))<\/pre>\n\n\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Beautiful Soup, \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 python-wordpress-xmlrpc. \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b: \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043d\u0430 \u041b\u0438\u0442\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u043d\u043a\u0438, \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u0434\u0430\u0442\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043d\u0438\u0433 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[432],"tags":[],"class_list":["post-125657","post","type-post","status-publish","format-standard","","category-parsery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/\" \/>\n<meta property=\"og:locale\" content=\"ru_RU\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b\" \/>\n<meta property=\"og:description\" content=\"\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Beautiful Soup, \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 python-wordpress-xmlrpc. \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b: \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043d\u0430 \u041b\u0438\u0442\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u043d\u043a\u0438, \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u0434\u0430\u0442\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043d\u0438\u0433 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438\" \/>\n<meta property=\"article:published_time\" content=\"2023-10-06T19:59:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-01T20:17:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg\" \/>\n<meta name=\"author\" content=\"mob25\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/\",\"url\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/\",\"name\":\"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b\",\"isPartOf\":{\"@id\":\"https:\/\/mob25.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg\",\"datePublished\":\"2023-10-06T19:59:43+00:00\",\"dateModified\":\"2024-03-01T20:17:53+00:00\",\"author\":{\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/b0d0c762a30795904061f383c6401489\"},\"breadcrumb\":{\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#breadcrumb\"},\"inLanguage\":\"ru-RU\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage\",\"url\":\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg\",\"contentUrl\":\"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\",\"item\":\"https:\/\/mob25.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python &#8212; \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mob25.com\/blog\/#website\",\"url\":\"https:\/\/mob25.com\/blog\/\",\"name\":\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mob25.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ru-RU\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/b0d0c762a30795904061f383c6401489\",\"name\":\"mob25\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ru-RU\",\"@id\":\"https:\/\/mob25.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/05dedffa125e5e4b26ae62cae4b744be451eb149ece723607015970ac71dda28?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/05dedffa125e5e4b26ae62cae4b744be451eb149ece723607015970ac71dda28?s=96&d=mm&r=g\",\"caption\":\"mob25\"},\"sameAs\":[\"https:\/\/mob25.com\"],\"url\":\"https:\/\/mob25.com\/blog\/author\/mob25\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/","og_locale":"ru_RU","og_type":"article","og_title":"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b","og_description":"\u0414\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u043e\u0440 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0414\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Beautiful Soup, \u0434\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442 &#8212; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 python-wordpress-xmlrpc. \u041e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b: \u0421\u043f\u0438\u0441\u043e\u043a \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439 \u043d\u0430 \u041b\u0438\u0442\u0440\u0435\u0441 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043b\u044f \u043e\u0431\u0445\u043e\u0434\u0430. \u0422\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u0438\u043d\u043a\u0438, \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0441 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u043f\u043e \u0434\u0430\u0442\u0435. \u0421\u043f\u0438\u0441\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043d\u0438\u0433 [&hellip;]","og_url":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/","og_site_name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438","article_published_time":"2023-10-06T19:59:43+00:00","article_modified_time":"2024-03-01T20:17:53+00:00","og_image":[{"url":"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg","type":"","width":"","height":""}],"author":"mob25","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/","url":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/","name":"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python - \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress \u041f\u0430\u0440\u0441\u0435\u0440\u044b","isPartOf":{"@id":"https:\/\/mob25.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage"},"image":{"@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage"},"thumbnailUrl":"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg","datePublished":"2023-10-06T19:59:43+00:00","dateModified":"2024-03-01T20:17:53+00:00","author":{"@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/b0d0c762a30795904061f383c6401489"},"breadcrumb":{"@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#breadcrumb"},"inLanguage":"ru-RU","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/"]}]},{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#primaryimage","url":"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg","contentUrl":"https:\/\/mob25.com\/wp-content\/uploads\/2023\/10\/parametry.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/mob25.com\/blog\/parser-na-python-sbor-novinok-na-litres-s-publikaciej-v-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430","item":"https:\/\/mob25.com\/blog\/"},{"@type":"ListItem","position":2,"name":"\u041f\u0430\u0440\u0441\u0435\u0440 \u043d\u0430 Python &#8212; \u0441\u0431\u043e\u0440 \u043a\u043d\u0438\u0433 \u043d\u0430 Litres \u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0432 WordPress"}]},{"@type":"WebSite","@id":"https:\/\/mob25.com\/blog\/#website","url":"https:\/\/mob25.com\/blog\/","name":"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mob25.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ru-RU"},{"@type":"Person","@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/b0d0c762a30795904061f383c6401489","name":"mob25","image":{"@type":"ImageObject","inLanguage":"ru-RU","@id":"https:\/\/mob25.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/05dedffa125e5e4b26ae62cae4b744be451eb149ece723607015970ac71dda28?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/05dedffa125e5e4b26ae62cae4b744be451eb149ece723607015970ac71dda28?s=96&d=mm&r=g","caption":"mob25"},"sameAs":["https:\/\/mob25.com"],"url":"https:\/\/mob25.com\/blog\/author\/mob25\/"}]}},"_links":{"self":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts\/125657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/comments?post=125657"}],"version-history":[{"count":0,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/posts\/125657\/revisions"}],"wp:attachment":[{"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/media?parent=125657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/categories?post=125657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mob25.com\/blog\/wp-json\/wp\/v2\/tags?post=125657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}