{"id":490249,"date":"2026-08-08T12:04:07","date_gmt":"2026-08-08T12:04:07","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=490249"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2026-08-08T12:04:07","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=490249","title":{"rendered":"\u0418\u0437 \u043d\u0435\u043c\u044b\u0441\u043b\u0438\u043c\u043e\u0433\u043e \u0432 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u043e\u0435: \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0441\u0430\u0439\u0442\u0430 \u0441\u043f\u043e\u0440\u0442\u043f\u0438\u0442\u0430 \u043d\u0430 Python \u0431\u0435\u0437 \u0431\u044d\u043a\u0433\u0440\u0430\u0443\u043d\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, Habr!<\/p>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440: \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0440\u0435\u043a\u043b\u0430\u043c\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u043d\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u00ab\u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442\u00bb, \u0438 \u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442. \u042f <a href=\"https:\/\/%D0%BF%D1%83%D1%82%D1%8C%D0%B2%D0%B1%D1%83%D0%B4%D1%83%D1%89%D0%B5%D0%B5.%D1%80%D1%83%D1%81\/%D0%9C%D0%BE%D0%B8-%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B5-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B-3\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a<\/a> \u0438 \u0448\u0442\u0430\u043d\u0433\u0438\u0441\u0442-\u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044c, \u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435, \u043f\u0438\u0441\u0430\u043b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e. \u042d\u0442\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u043c\u043e\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0438, \u0430 \u043b\u0435\u043d\u044c \u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443 \u043c\u0435\u043d\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u0443\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432.<\/p>\n<ol>\n<li>\n<p><a href=\"#1.nachalo\" rel=\"noopener noreferrer nofollow\">\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2.cite\" rel=\"noopener noreferrer nofollow\">\u0421\u0430\u0439\u0442 badrazves.ru<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3.Code\" rel=\"noopener noreferrer nofollow\">\u041a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4.Result\" rel=\"noopener noreferrer nofollow\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/a><\/p>\n<\/li>\n<\/ol>\n<p><a class=\"anchor\" name=\"1.nachalo\" id=\"1.nachalo\"><\/a><\/p>\n<p><strong>1.\u00a0\u00a0\u00a0\u00a0 \u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c. <\/strong><\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u0434\u0435\u0441\u044f\u0442\u0443\u044e \u043a\u043d\u0438\u0433\u0443 (\u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438). \u0422\u0435\u043c\u0430 \u043a\u043d\u0438\u0433\u0438 \u2013 \u0441\u0438\u043b\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439 \u0441\u0442\u0430\u0440\u0448\u0435 40 \u2013 The Barbell Prescription, \u0430\u0432\u0442\u043e\u0440\u044b \u042d\u043d\u0434\u0438 \u0411\u0435\u0439\u043a\u0435\u0440 \u0438 \u0414\u0436\u043e\u043d\u0430\u0442\u043e\u043d \u0421\u0430\u043b\u043b\u0438\u0432\u0430\u043d. \u041a\u043d\u0438\u0433\u0430 \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 \u0444\u0438\u0437\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0433\u0435\u0440\u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0441\u0438\u043b\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438, \u0438 \u0432 \u0433\u043b\u0430\u0432\u0435 \u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u043e\u043b\u043e\u0442\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u043c\u044b\u0448\u0435\u0447\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u044b \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0431\u0435\u043b\u043e\u043a (\u0430 \u043d\u0435 \u0433\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0431\u0435\u043b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0433\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f).<\/p>\n<p>\u0413\u043e\u0432\u043e\u0440\u044f \u0438\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u044f \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0430\u043b\u0441\u044f. \u0413\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0431\u0440\u0430\u043b \u00ab\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f\u00bb, \u043d\u0430 \u0434\u0435\u043b\u0435 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u043e\u043a \u0441 \u043f\u043b\u043e\u0445\u0438\u043c \u0430\u043c\u0438\u043d\u043e\u043a\u0438\u0441\u043b\u043e\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u043c \u2014 \u0432 \u043d\u0451\u043c \u043c\u0430\u043b\u043e \u043b\u0435\u0439\u0446\u0438\u043d\u0430, \u0430 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0441\u0438\u043d\u0442\u0435\u0437\u0430 \u043c\u044b\u0448\u0435\u0447\u043d\u044b\u0445 \u0431\u0435\u043b\u043a\u043e\u0432. \u0421\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442 \u0438\u043b\u0438 \u0438\u0437\u043e\u043b\u044f\u0442 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u0430 1\u20132 \u0447\u0430\u0441\u0430, \u044d\u0442\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0430 \u043f\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0445\u043e\u0434\u044f\u0442 \u0433\u043e\u0432\u044f\u0436\u0438\u0439 \u0433\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443. \u041f\u043b\u044e\u0441 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u043e\u0432\u044b\u0439 \u0438\u0437\u043e\u043b\u044f\u0442, \u0431\u0443\u0434\u0435\u043c \u0447\u0435\u0441\u0442\u043d\u044b, \u0432\u043e\u043d\u044f\u0435\u0442 \u0436\u0436\u0451\u043d\u043e\u0439 \u043a\u043e\u0436\u0435\u0439.<\/p>\n<p>\u0412\u043e\u043e\u0434\u0443\u0448\u0435\u0432\u043b\u0451\u043d\u043d\u044b\u0439, \u044f \u043f\u043e\u0431\u0435\u0436\u0430\u043b \u043d\u0430 \u0441\u0430\u0439\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 <a href=\"http:\/\/badrazves.ru\" rel=\"noopener noreferrer nofollow\">badrazves.ru<\/a>, \u0433\u0434\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u0435\u0440\u0443 \u0431\u0435\u043b\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0446\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0411\u0435\u043b\u043a\u0438\u00bb \u2014 \u043a\u0443\u0447\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u043d\u0430 \u0442\u0440\u0451\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445: \u043e\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0438 \u0434\u043e \u044d\u043a\u0437\u043e\u0442\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u0433\u043e\u0440\u043e\u0445\u043e\u0432\u043e\u0433\u043e, \u0442\u044b\u043a\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438 \u043a\u043e\u043d\u043e\u043f\u043b\u044f\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u0435\u0438\u043d\u0430. \u0421\u0430\u0439\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432, \u0446\u0435\u043d\u0443 \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0431\u0435\u043b\u043a\u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u2014 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0418 \u0442\u0443\u0442 \u043c\u0435\u043d\u044f \u043e\u0441\u0435\u043d\u0438\u043b\u0430 \u0438\u0434\u0435\u044f: \u0430 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u0432\u0430\u0440\u044b (\u043a\u0430\u043a \u043f\u043e\u0442\u043e\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0431\u0435\u043b\u043a\u0438 \u0438\u0445 45) \u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0438\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434 \u043c\u043e\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438?<\/p>\n<p>\u00a0\u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 (\u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0430, \u0433\u043e\u0432\u044f\u0434\u0438\u043d\u0430, \u044f\u0439\u0446\u043e), \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438:<\/p>\n<ul>\n<li>\n<p>\u041a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442: \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u0431\u0435\u043b\u043a\u0430 \u043e\u043a\u043e\u043b\u043e 70-80%.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437\u043e\u043b\u044f\u0442: \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 (\u0434\u043e 90% \u0431\u0435\u043b\u043a\u0430), \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0436\u0438\u0440\u043e\u0432 \u0438 \u0443\u0433\u043b\u0435\u0432\u043e\u0434\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u0413\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442: \u0431\u0435\u043b\u043e\u043a, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0441\u0449\u0435\u043f\u043b\u0451\u043d\u043d\u044b\u0439 \u0444\u0435\u0440\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438.<\/p>\n<p><a class=\"anchor\" name=\"2.cite\" id=\"2.cite\"><\/a><\/p>\n<p><strong>2.\u00a0\u00a0\u00a0\u00a0 \u0421\u0430\u0439\u0442 <\/strong><a href=\"http:\/\/badrazves.ru\" rel=\"noopener noreferrer nofollow\"><strong>badrazves.ru<\/strong><\/a> <\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b Qwen \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u044d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, badrazves \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 OpenCart \u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0443 \u043d\u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f. <\/p>\n<p><strong>\u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f ?page=<\/strong><\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 &#171;\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0451&#187; \u0438\u043b\u0438 \u0446\u0438\u0444\u0440\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0441\u0430\u0439\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ?page=2, ?page=3 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u042f \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b <a href=\"https:\/\/badrazves.ru\/sport\/protein\/?page=2\" rel=\"noopener noreferrer nofollow\">https:\/\/badrazves.ru\/sport\/protein\/?page=2<\/a> \u0438 \u0443\u0432\u0438\u0434\u0435\u043b \u0442\u043e\u0432\u0430\u0440\u044b \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e \u043f\u0440\u044f\u043c\u044b\u043c \u0441\u0441\u044b\u043b\u043a\u0430\u043c.<\/p>\n<p><strong>\u0422\u0435\u043a\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a<\/strong><\/p>\n<p>\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430. \u041d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0430\u0439\u0442\u0430\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u2014 \u044d\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (\u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e). \u041d\u043e \u043d\u0430 <a href=\"http:\/\/badrazves.ru\" rel=\"noopener noreferrer nofollow\">badrazves.ru<\/a> \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0441\u044b\u043b\u043e\u043a (&lt;a href=&#187;&#8230;&#187;&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430&lt;\/a&gt;), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0442\u0435\u043a\u0441\u0442 \u0441\u0441\u044b\u043b\u043a\u0438. \u042d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443. <\/p>\n<p>\u041d\u0443 \u0438 \u043f\u0440\u043e \u044d\u0442\u0438\u043a\u0435\u0442: \u0443 \u0441\u0430\u0439\u0442\u0430 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b robots.txt, \u0433\u0434\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432. \u041c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043b\u043e\u043c\u0430\u0435\u043c, \u043d\u0435 \u0434\u043e\u043b\u0431\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0430\u0443\u0437\u0443 \u0432 \u043f\u043e\u043b\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043b\u0438\u0447\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0412\u0435\u0436\u043b\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e.<\/p>\n<p><a class=\"anchor\" name=\"3.Code\" id=\"3.Code\"><\/a><\/p>\n<p><strong>3.\u00a0\u00a0\u00a0\u00a0 \u041a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430<\/strong><\/p>\n<p>\u0423\u0432\u0435\u0440\u0435\u043d, \u0442\u0430\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u043c\u043f\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u0430 python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qwen \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0434, \u0431\u0435\u0437 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">#!\/usr\/bin\/env python3\"\"\"\u041f\u0430\u0440\u0441\u0435\u0440 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u00ab\u0411\u0435\u043b\u043a\u0438\u00bb \u0441\u0430\u0439\u0442\u0430 badrazves.ru.\u041f\u0440\u0438\u043c\u0435\u0440\u044b:    python protein_parser.py    python protein_parser.py --details --format json    python protein_parser.py --pages 1 2 3 --delay 1.0\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: proteins.csv \u0438 proteins.json.\"\"\"from __future__ import annotationsimport argparseimport csvimport jsonimport reimport timefrom dataclasses import asdict, dataclass, fieldfrom pathlib import Pathfrom typing import Iterablefrom urllib.parse import urljoin, urlparse, urlunparseimport requestsfrom bs4 import BeautifulSoupfrom requests.adapters import HTTPAdapterfrom urllib3.util.retry import RetryBASE = \"https:\/\/badrazves.ru\"CATEGORY_URL = f\"{BASE}\/sport\/protein\/\"@dataclassclass Product:    name: str    url: str    description: str = \"\"    page: int = 0    prices: list[str] = field(default_factory=list)def make_session() -&gt; requests.Session:    session = requests.Session()    session.headers.update({        \"User-Agent\": \"Mozilla\/5.0 (compatible; ProteinCategoryParser\/1.0)\",        \"Accept-Language\": \"ru,en;q=0.8\",    })    retry = Retry(total=3, backoff_factor=1, status_forcelist=[429, 500, 502, 503, 504],                  allowed_methods=[\"GET\"])    session.mount(\"https:\/\/\", HTTPAdapter(max_retries=retry))    return sessiondef clean(text: str) -&gt; str:    return re.sub(r\"\\s+\", \" \", text).strip()def canonical(url: str) -&gt; str:    p = urlparse(urljoin(BASE, url))    return urlunparse((p.scheme, p.netloc, p.path.rstrip(\"\/\") + \"\/\", \"\", \"\", \"\"))def product_links(soup: BeautifulSoup) -&gt; Iterable[tuple[str, str]]:    category_path = urlparse(CATEGORY_URL).path.rstrip(\"\/\") + \"\/\"    seen = set()    for a in soup.select(\"a[href]\"):        href = canonical(a[\"href\"])        parsed = urlparse(href)        if parsed.netloc != urlparse(BASE).netloc:            continue        if not parsed.path.startswith(category_path) or parsed.path == category_path:            continue        # On the category page a product is linked by both its title and its image.        if \"index.php\" in a[\"href\"] or \"page=\" in a[\"href\"]:            continue        name = clean(a.get_text(\" \", strip=True))        if href and name and href not in seen:            seen.add(href)            yield name, hrefdef readable_description(container: BeautifulSoup) -&gt; str:    \"\"\"\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 HTML-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440 \u0438 SEO-\u0441\u043f\u0430\u043c.\"\"\"    # \u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c div \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f.    for node in container.find_all(string=re.compile(r\"\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f,? \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435\", re.I)):        parent = node.parent        while parent and parent.name not in {\"div\", \"p\", \"section\"}:            parent = parent.parent        if parent:            parent.decompose()            break    # \u0423\u0434\u0430\u043b\u044f\u0435\u043c SEO-\u0441\u043f\u0430\u043c \u0431\u043b\u043e\u043a\u0438: \u00ab\u041e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438\u00bb, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0431\u0440\u0435\u043d\u0434\u043e\u0432 \u0438 \u043f\u0440.    # \u041d\u0430 badrazves \u0442\u0430\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u0430    # \u0438 \u0437\u0430\u0441\u043e\u0440\u044f\u044e\u0442 JSON \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043c\u0435\u0448\u0430\u044e\u0449\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e.    seo_patterns = [        r\"\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041e\u041e\u041e \u0411\u0430\u0434\u0440\u0430\u0437\u0432\u0435\u0441\",        r\"\u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0431\u0440\u0435\u043d\u0434\u044b\",        r\"\u041e\u041e\u041e \u0411\u0430\u0434\u0440\u0430\u0437\u0432\u0435\u0441- \u043b\u0438\u0434\u0435\u0440 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435\",        r\"\u041d\u0430\u0448\u0438 \u0441\u043a\u043b\u0430\u0434\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f\",    ]    for pattern in seo_patterns:        for node in container.find_all(string=re.compile(pattern, re.I)):            parent = node.parent            while parent and parent.name not in {\"div\", \"p\", \"section\"}:                parent = parent.parent            if parent:                parent.decompose()                break    for tag in container.select(\"script, style, noscript, img\"):        tag.decompose()    for br in container.find_all(\"br\"):        br.replace_with(\"\\n\")    for link in container.find_all(\"a\", href=True):        label = clean(link.get_text(\" \", strip=True))        href = urljoin(BASE, link[\"href\"])        link.replace_with(f\"{label} ({href})\" if label else href)    # \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0435 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0430\u0431\u0437\u0430\u0446\u044b.    text = container.get_text(\"\\n\")    lines = []    for line in text.splitlines():        line = clean(line)        if line:            lines.append(line)        elif lines and lines[-1] != \"\":            lines.append(\"\")    while lines and lines[-1] == \"\":        lines.pop()    return \"\\n\".join(lines)def parse_product_page(session: requests.Session, item: Product) -&gt; None:    response = session.get(item.url, timeout=30)    response.raise_for_status()    soup = BeautifulSoup(response.text, \"html.parser\")    # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435    meta = soup.select_one('meta[property=\"og:description\"]')    description = soup.select_one(\"#tab-description\") or soup.select_one(\".tab-content\")    if description:        item.description = readable_description(description)    elif meta:        item.description = clean(meta.get(\"content\", \"\"))    # \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0446\u0435\u043d\u044b.    # \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u043c: \u0434\u043b\u044f \u043e\u043f\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0441\u043e\u0432\u043e\u043a (\u043c\u0435\u0448\u043a\u0438 15-25 \u043a\u0433)    # \u0441\u0430\u0439\u0442 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u00ab0 \u20bd\u00bb \u043a\u0430\u043a \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u00ab\u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443\u00bb. \u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430    # \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 `price` \u0443 radio-\u043a\u043d\u043e\u043f\u043e\u043a \u2014 \u0431\u0435\u0440\u0451\u043c \u043e\u0442\u0442\u0443\u0434\u0430.    info = soup.select_one(\".product-info\")    if info:        for inp in info.select(\"input[type='radio'][price]\"):            weight_el = (inp.find_previous_sibling(class_=re.compile(r\"weight\"))                         or inp.find_next(class_=re.compile(r\"weight\")))            if weight_el:                weight = clean(weight_el.get_text(\" \"))                # \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u00ab+\u00bb (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab+869\u00bb \u2014 \u0434\u043e\u043f\u043b\u0430\u0442\u0430 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0446\u0435\u043d\u0435).                price = inp.get(\"price\", \"\").lstrip(\"+\").strip()                if weight and price:                    item.prices.append(f\"{weight} {price} \u20bd\")        # \u0424\u043e\u043b\u0431\u044d\u043a: \u0435\u0441\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 input \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u0438, \u043f\u0430\u0440\u0441\u0438\u043c \u0432\u0438\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442.        if not item.prices:            text = clean(info.get_text(\" \", strip=True))            item.prices = re.findall(r\"\\d[\\d ]*\\s*(?:\u0433|\u043a\u0433)\\s+\\d[\\d ]*\\s*(?:\u20bd|\u0440)\", text, flags=re.I)def parse(args: argparse.Namespace) -&gt; list[Product]:    session = make_session()    products: dict[str, Product] = {}    page_list = list(args.pages) if args.pages else list(range(1, args.max_pages + 1))    for page in page_list:        url = CATEGORY_URL if page == 1 else f\"{CATEGORY_URL}?page={page}\"        response = session.get(url, timeout=30)        response.raise_for_status()        soup = BeautifulSoup(response.text, \"html.parser\")        found = list(product_links(soup))        if not found and not args.pages:            break        for name, href in found:            products.setdefault(href, Product(name=name, url=href, page=page))        print(f\"\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 {page}: \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u0441\u044b\u043b\u043e\u043a {len(found)}\")        if args.delay and page != page_list[-1]:            time.sleep(args.delay)    result = list(products.values())    if args.details:        for i, item in enumerate(result, 1):            try:                parse_product_page(session, item)                print(f\"\u0422\u043e\u0432\u0430\u0440 {i}\/{len(result)}: {item.name}\")            except requests.RequestException as exc:                print(f\"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c {item.url}: {exc}\")            if args.delay and i != len(result):                time.sleep(args.delay)    return resultdef save(products: list[Product], stem: str, fmt: str) -&gt; None:    rows = [asdict(p) for p in products]    if fmt in (\"csv\", \"both\"):        with open(stem + \".csv\", \"w\", encoding=\"utf-8-sig\", newline=\"\") as f:            writer = csv.DictWriter(f, fieldnames=[\"name\", \"url\", \"description\", \"page\", \"prices\"])            writer.writeheader()            for row in rows:                row[\"prices\"] = \" | \".join(row[\"prices\"])                writer.writerow(row)    if fmt in (\"json\", \"both\"):        with open(stem + \".json\", \"w\", encoding=\"utf-8\") as f:            json.dump(rows, f, ensure_ascii=False, indent=2)    if fmt in (\"markdown\", \"both\"):        with open(stem + \".md\", \"w\", encoding=\"utf-8\") as f:            f.write(\"# \u0411\u0435\u043b\u043a\u0438 \u2014 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u043e\u0432\u0430\u0440\u043e\u0432\\n\\n\")            f.write(f\"\u0412\u0441\u0435\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u043e\u0432: **{len(products)}**\\n\\n\")            for number, product in enumerate(products, 1):                f.write(f\"## {number}. {product.name}\\n\\n\")                f.write(f\"**\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0442\u043e\u0432\u0430\u0440\u0430:** {product.url}\\n\\n\")                if product.prices:                    f.write(\"**\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438 \u0446\u0435\u043d\u044b:** \" + \"; \".join(product.prices) + \"\\n\\n\")                if product.description:                    f.write(product.description + \"\\n\\n\")                f.write(\"---\\n\\n\")def main() -&gt; None:    # \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u0449\u0435\u043b\u0447\u043a\u043e\u043c:    # \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b 1, 2 \u0438 3, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u044d\u0442\u0438\u043c .py-\u0444\u0430\u0439\u043b\u043e\u043c.    script_dir = Path(__file__).resolve().parent    default_output = str(script_dir \/ \"proteins\")    parser = argparse.ArgumentParser(description=__doc__)    parser.add_argument(        \"--pages\", nargs=\"+\", type=int, default=[1, 2, 3],        help=\"\u041d\u043e\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: 1 2 3)\",    )    parser.add_argument(\"--max-pages\", type=int, default=20,                        help=\"\u041b\u0438\u043c\u0438\u0442 \u0430\u0432\u0442\u043e\u043e\u0431\u0445\u043e\u0434\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\")    parser.add_argument(        \"--details\", action=\"store_true\", default=True,        help=\"\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0446\u0435\u043d\u044b (\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e)\",    )    parser.add_argument(\"--delay\", type=float, default=0.5,                        help=\"\u041f\u0430\u0443\u0437\u0430 \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445\")    parser.add_argument(        \"--format\", choices=[\"csv\", \"json\", \"markdown\", \"both\"], default=\"both\",        help=\"both \u0441\u043e\u0437\u0434\u0430\u0451\u0442 proteins.csv, proteins.json \u0438 proteins.md\",    )    parser.add_argument(        \"--output\", default=default_output,        help=\"\u0418\u043c\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f; \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0430\u043f\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\",    )    args = parser.parse_args()    # \u0414\u0430\u0436\u0435 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u0430\u043f\u043a\u0438 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c.    if not Path(args.output).is_absolute():        args.output = str(script_dir \/ args.output)    products = parse(args)    save(products, args.output, args.format)    print(f\"\u0413\u043e\u0442\u043e\u0432\u043e: \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 {len(products)}\")    print(f\"\u0424\u0430\u0439\u043b\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u043f\u0430\u043f\u043a\u0435: {script_dir}\")if __name__ == \"__main__\":    main()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><a class=\"anchor\" name=\"4.Result\" id=\"4.Result\"><\/a><\/p>\n<p><strong>4.\u00a0\u00a0\u00a0\u00a0 \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/strong><\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043f\u0440\u043e\u0449\u0435.<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u0432\u043e\u0439\u043d\u044b\u043c \u043a\u043b\u0438\u043a\u043e\u043c, \u043f\u043e\u0448\u0451\u043b \u0437\u0430\u0432\u0430\u0440\u0438\u0432\u0430\u0442\u044c \u0447\u0430\u0439. \u0427\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0440\u044f\u0434\u043e\u043c \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0442\u0440\u0438 \u0444\u0430\u0439\u043b\u0430: proteins.json (\u0434\u043b\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438), proteins.csv (\u0434\u043b\u044f Excel) \u0438 <a href=\"http:\/\/proteins.md\" rel=\"noopener noreferrer nofollow\">proteins.md<\/a> (\u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0433\u043b\u0430\u0437\u0430\u043c\u0438) \u2014 \u0432\u0441\u0435\u0433\u043e 45 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f\u043c\u0438, \u0446\u0435\u043d\u0430\u043c\u0438 \u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0444\u0430\u0441\u043e\u0432\u043a\u0438.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/297\/a27\/b2c\/297a27b2c08eba3ba008a63b4334d0b4.png\" alt=\"\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\" title=\"\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\" width=\"1845\" height=\"1383\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/297\/a27\/b2c\/297a27b2c08eba3ba008a63b4334d0b4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/297\/a27\/b2c\/297a27b2c08eba3ba008a63b4334d0b4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u0430\u0431\u043e\u0442\u0430 \u043f\u0430\u0440\u0441\u0435\u0440\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u0421\u043a\u043e\u0440\u043c\u0438\u043b JSON \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441 \u043e\u0434\u043d\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: \u00ab\u0412\u044b\u0431\u0435\u0440\u0438 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u0436\u0438\u0432\u043e\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u0431\u0435\u043b\u043a\u0430 \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 80%\u00bb. \u041e\u0442\u0432\u0435\u0442 \u0431\u044b\u043b \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u044b\u043c \u2014 \u043f\u043e\u0431\u0435\u0434\u0438\u0442\u0435\u043b\u0435\u043c \u0441\u0442\u0430\u043b \u0421\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0438\u0437\u043e\u043b\u044f\u0442 Pronativ 95 (95% \u0431\u0435\u043b\u043a\u0430, 6560 \u20bd \u0437\u0430 1390 \u0433), \u0430 \u043a\u0430\u043a \u0431\u044e\u0434\u0436\u0435\u0442\u043d\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430 \u2014 \u0421\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0442\u0435\u0438\u043d Laktein 80 (81% \u0431\u0435\u043b\u043a\u0430, 3830 \u20bd \u0437\u0430 1430 \u0433) \u043e\u0442 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f Lactalis. \u0412\u0441\u0451. \u0417\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u0438 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0448\u0435\u0432\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0431\u0435\u043b\u043a\u0430 \u0432 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, 50%. \u041c\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0440\u0443\u0433\u043e\u0435!<\/p>\n<p>\u00a0\u0418, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, <strong>\u0432\u044b\u0432\u043e\u0434<\/strong>.<\/p>\n<p>\u041f\u043e\u0439\u043c\u0438\u0442\u0435 \u043c\u0435\u043d\u044f \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442. \u042f <a href=\"https:\/\/%D0%BF%D1%83%D1%82%D1%8C%D0%B2%D0%B1%D1%83%D0%B4%D1%83%D1%89%D0%B5%D0%B5.%D1%80%D1%83%D1%81\/%D0%9C%D0%BE%D0%B8-%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4%D1%87%D0%B5%D1%81%D0%BA%D0%B8%D0%B5-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B-3\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a<\/a>\/<a href=\"https:\/\/%D0%BF%D1%83%D1%82%D1%8C%D0%B2%D0%B1%D1%83%D0%B4%D1%83%D1%89%D0%B5%D0%B5.%D1%80%D1%83%D1%81\/%D0%9C%D0%BE%D0%B8-%D0%B4%D0%B8%D0%B7%D0%B0%D0%B9%D0%BD%D0%B5%D1%80%D1%81%D0%BA%D0%B8%D0%B5-%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%8B\/\" rel=\"noopener noreferrer nofollow\">\u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440<\/a> \u0438 \u0448\u0442\u0430\u043d\u0433\u0438\u0441\u0442. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u043d\u044b\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u0443\u0434\u0435\u043b\u0438\u043b\u0438 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044e \u0441\u0442\u0430\u0442\u044c\u0438!<\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1068200\/\">https:\/\/habr.com\/ru\/articles\/1068200\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438\u0432\u0435\u0442, Habr!\u0421\u0440\u0430\u0437\u0443 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440: \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0440\u0435\u043a\u043b\u0430\u043c\u0430 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430, \u043d\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b \u00ab\u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0437\u0430 5 \u043c\u0438\u043d\u0443\u0442\u00bb, \u0438 \u044f \u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442. \u042f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a \u0438 \u0448\u0442\u0430\u043d\u0433\u0438\u0441\u0442-\u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044c, \u0430 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043d\u0438\u0436\u0435, \u043f\u0438\u0441\u0430\u043b \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e. \u042d\u0442\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u0434\u043d\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0438\u0437 \u043a\u043d\u0438\u0433\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u043b\u0430 \u043c\u043e\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e \u0441\u043f\u043e\u0440\u0442\u0438\u0432\u043d\u043e\u043c \u043f\u0438\u0442\u0430\u043d\u0438\u0438, \u0430 \u043b\u0435\u043d\u044c \u0438 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u0438 \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430 \u043f\u0430\u0440\u0443 \u043c\u0438\u043d\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0443, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0443 \u043c\u0435\u043d\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u0443\u0445\u043e\u0434\u0438\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u043e\u0432.\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c\u0421\u0430\u0439\u0442 badrazves.ru\u041a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u04421.\u00a0\u00a0\u00a0\u00a0 \u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0451 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c. \u0421\u0435\u0439\u0447\u0430\u0441 \u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0436\u0443 \u0434\u0435\u0441\u044f\u0442\u0443\u044e \u043a\u043d\u0438\u0433\u0443 (\u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438). \u0422\u0435\u043c\u0430 \u043a\u043d\u0438\u0433\u0438 \u2013 \u0441\u0438\u043b\u043e\u0432\u044b\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043a\u0438 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439 \u0441\u0442\u0430\u0440\u0448\u0435 40 \u2013 The Barbell Prescription, \u0430\u0432\u0442\u043e\u0440\u044b \u042d\u043d\u0434\u0438 \u0411\u0435\u0439\u043a\u0435\u0440 \u0438 \u0414\u0436\u043e\u043d\u0430\u0442\u043e\u043d \u0421\u0430\u043b\u043b\u0438\u0432\u0430\u043d. \u041a\u043d\u0438\u0433\u0430 \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 \u0444\u0438\u0437\u0438\u043e\u043b\u043e\u0433\u0438\u0438, \u0433\u0435\u0440\u043e\u043d\u0442\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0441\u0438\u043b\u043e\u0432\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438, \u0438 \u0432 \u0433\u043b\u0430\u0432\u0435 \u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0438 \u0430\u0432\u0442\u043e\u0440\u044b \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442, \u043f\u043e\u0447\u0435\u043c\u0443 \u0437\u043e\u043b\u043e\u0442\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0434\u043b\u044f \u043d\u0430\u0431\u043e\u0440\u0430 \u043c\u044b\u0448\u0435\u0447\u043d\u043e\u0439 \u043c\u0430\u0441\u0441\u044b \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0431\u0435\u043b\u043e\u043a (\u0430 \u043d\u0435 \u0433\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u043e\u0432\u043e\u0433\u043e \u0431\u0435\u043b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0433\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f).\u0413\u043e\u0432\u043e\u0440\u044f \u0438\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0441\u0451 \u044d\u0442\u043e \u0432\u0440\u0435\u043c\u044f \u044f \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0430\u043b\u0441\u044f. \u0413\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0431\u0440\u0430\u043b \u00ab\u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f\u00bb, \u043d\u0430 \u0434\u0435\u043b\u0435 \u043d\u0435\u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0431\u0435\u043b\u043e\u043a \u0441 \u043f\u043b\u043e\u0445\u0438\u043c \u0430\u043c\u0438\u043d\u043e\u043a\u0438\u0441\u043b\u043e\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u043c \u2014 \u0432 \u043d\u0451\u043c \u043c\u0430\u043b\u043e \u043b\u0435\u0439\u0446\u0438\u043d\u0430, \u0430 \u044d\u0442\u043e \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0441\u0438\u043d\u0442\u0435\u0437\u0430 \u043c\u044b\u0448\u0435\u0447\u043d\u044b\u0445 \u0431\u0435\u043b\u043a\u043e\u0432. \u0421\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442 \u0438\u043b\u0438 \u0438\u0437\u043e\u043b\u044f\u0442 \u0443\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u0430 1\u20132 \u0447\u0430\u0441\u0430, \u044d\u0442\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u0448\u0435\u0432\u043b\u0435, \u0430 \u043f\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u043e\u0431\u0445\u043e\u0434\u044f\u0442 \u0433\u043e\u0432\u044f\u0436\u0438\u0439 \u0433\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443. \u041f\u043b\u044e\u0441 \u043a\u043e\u043b\u043b\u0430\u0433\u0435\u043d\u043e\u0432\u044b\u0439 \u0438\u0437\u043e\u043b\u044f\u0442, \u0431\u0443\u0434\u0435\u043c \u0447\u0435\u0441\u0442\u043d\u044b, \u0432\u043e\u043d\u044f\u0435\u0442 \u0436\u0436\u0451\u043d\u043e\u0439 \u043a\u043e\u0436\u0435\u0439.\u0412\u043e\u043e\u0434\u0443\u0448\u0435\u0432\u043b\u0451\u043d\u043d\u044b\u0439, \u044f \u043f\u043e\u0431\u0435\u0436\u0430\u043b \u043d\u0430 \u0441\u0430\u0439\u0442 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 badrazves.ru, \u0433\u0434\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u0435\u0440\u0443 \u0431\u0435\u043b\u043e\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u0446\u0435\u043d\u0438\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0411\u0435\u043b\u043a\u0438\u00bb \u2014 \u043a\u0443\u0447\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u043d\u0430 \u0442\u0440\u0451\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445: \u043e\u0442 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0439 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0438 \u0434\u043e \u044d\u043a\u0437\u043e\u0442\u0438\u043a\u0438 \u0432\u0440\u043e\u0434\u0435 \u0433\u043e\u0440\u043e\u0445\u043e\u0432\u043e\u0433\u043e, \u0442\u044b\u043a\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438 \u043a\u043e\u043d\u043e\u043f\u043b\u044f\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0442\u0435\u0438\u043d\u0430. \u0421\u0430\u0439\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432, \u0446\u0435\u043d\u0443 \u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u0431\u0435\u043b\u043a\u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u2014 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435 \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435. \u0418 \u0442\u0443\u0442 \u043c\u0435\u043d\u044f \u043e\u0441\u0435\u043d\u0438\u043b\u0430 \u0438\u0434\u0435\u044f: \u0430 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u043e\u0432\u0430\u0440\u044b (\u043a\u0430\u043a \u043f\u043e\u0442\u043e\u043c \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0432 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0431\u0435\u043b\u043a\u0438 \u0438\u0445 45) \u0438 \u0441\u043a\u043e\u0440\u043c\u0438\u0442\u044c \u0438\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u043e\u0434 \u043c\u043e\u0438 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0438?\u00a0\u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 (\u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0430, \u0433\u043e\u0432\u044f\u0434\u0438\u043d\u0430, \u044f\u0439\u0446\u043e), \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043e\u0447\u0438\u0441\u0442\u043a\u0438:\u041a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0442: \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435\u043c \u0431\u0435\u043b\u043a\u0430 \u043e\u043a\u043e\u043b\u043e 70-80%.\u0418\u0437\u043e\u043b\u044f\u0442: \u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0438\u0449\u0435\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 (\u0434\u043e 90% \u0431\u0435\u043b\u043a\u0430), \u0441 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0436\u0438\u0440\u043e\u0432 \u0438 \u0443\u0433\u043b\u0435\u0432\u043e\u0434\u043e\u0432.\u0413\u0438\u0434\u0440\u043e\u043b\u0438\u0437\u0430\u0442: \u0431\u0435\u043b\u043e\u043a, \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0440\u0430\u0441\u0449\u0435\u043f\u043b\u0451\u043d\u043d\u044b\u0439 \u0444\u0435\u0440\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438.2.\u00a0\u00a0\u00a0\u00a0 \u0421\u0430\u0439\u0442 badrazves.ru \u041a\u043e\u0433\u0434\u0430 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b Qwen \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442, \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u0432\u043c\u0435\u0441\u0442\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c, \u043a\u0430\u043a \u0432\u043e\u043e\u0431\u0449\u0435 \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u044d\u0442\u043e\u0442 \u0441\u0430\u0439\u0442. \u041e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, badrazves \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 OpenCart \u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u0434\u0432\u0438\u0436\u043a\u043e\u0432 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u043e\u0432, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0443 \u043d\u0435\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0438 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u0430\u044f. \u041f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044f ?page=\u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u0442\u0435 &#171;\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0435\u0449\u0451&#187; \u0438\u043b\u0438 \u0446\u0438\u0444\u0440\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432\u043d\u0438\u0437\u0443 \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u043e\u0432\u0430\u0440\u043e\u0432, \u0441\u0430\u0439\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ?page=2, ?page=3 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u042f \u044d\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043b \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b https:\/\/badrazves.ru\/sport\/protein\/?page=2 \u0438 \u0443\u0432\u0438\u0434\u0435\u043b \u0442\u043e\u0432\u0430\u0440\u044b \u0441\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u0438\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u2014 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e \u043f\u0440\u044f\u043c\u044b\u043c \u0441\u0441\u044b\u043b\u043a\u0430\u043c.\u0422\u0435\u043a\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a\u042d\u0442\u043e \u0432\u0430\u0436\u043d\u043e\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0434\u043b\u044f \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430. \u041d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0430\u0439\u0442\u0430\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u2014 \u044d\u0442\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e (\u044d\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e). \u041d\u043e \u043d\u0430 badrazves.ru \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0441\u044b\u043b\u043e\u043a (&lt;a href=&#187;&#8230;&#187;&gt;\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0442\u043e\u0432\u0430\u0440\u0430&lt;\/a&gt;), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 \u0442\u0435\u043a\u0441\u0442 \u0441\u0441\u044b\u043b\u043a\u0438. \u042d\u0442\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0437\u0430\u0434\u0430\u0447\u0443. \u041d\u0443 \u0438 \u043f\u0440\u043e \u044d\u0442\u0438\u043a\u0435\u0442: \u0443 \u0441\u0430\u0439\u0442\u0430 \u0435\u0441\u0442\u044c \u0444\u0430\u0439\u043b robots.txt, \u0433\u0434\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u043e\u0442\u043e\u0432. \u041c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043b\u043e\u043c\u0430\u0435\u043c, \u043d\u0435 \u0434\u043e\u043b\u0431\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u2014 \u0441\u043a\u0440\u0438\u043f\u0442 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u0430\u0443\u0437\u0443 \u0432 \u043f\u043e\u043b\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u043b\u0438\u0447\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0412\u0435\u0436\u043b\u0438\u0432\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e.3.\u00a0\u00a0\u00a0\u00a0 \u041a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430\u0423\u0432\u0435\u0440\u0435\u043d, \u0442\u0430\u043a\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u043c\u043f\u0442 \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043d\u0430 python \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Qwen \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a\u043e\u0434, \u0431\u0435\u0437 \u0432\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u044f.#!\/usr\/bin\/env python3&#8243;&#187;&#187;\u041f\u0430\u0440\u0441\u0435\u0440 \u0442\u043e\u0432\u0430\u0440\u043e\u0432 \u0438\u0437 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u00ab\u0411\u0435\u043b\u043a\u0438\u00bb \u0441\u0430\u0439\u0442\u0430 badrazves.ru.\u041f\u0440\u0438\u043c\u0435\u0440\u044b:    python protein_parser.py    python protein_parser.py &#8212;details &#8212;format json    python protein_parser.py &#8212;pages 1 2 3 &#8212;delay 1.0\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: proteins.csv \u0438 proteins.json.&#187;&#187;&#187;from __future__ import annotationsimport argparseimport csvimport jsonimport reimport timefrom dataclasses import asdict, dataclass, fieldfrom pathlib import Pathfrom typing import Iterablefrom urllib.parse import urljoin, urlparse, urlunparseimport requestsfrom bs4 import BeautifulSoupfrom requests.adapters import HTTPAdapterfrom urllib3.util.retry import RetryBASE = &#171;https:\/\/badrazves.ru&#187;CATEGORY_URL = f&#187;{BASE}\/sport\/protein\/&#187;@dataclassclass Product:    name: str    url: str    description: str = &#171;&#187;    page: int = 0    prices: list[str] = field(default_factory=list)def make_session() -&gt; requests.Session:    session = requests.Session()    session.headers.update({        &#171;User-Agent&#187;: &#171;Mozilla\/5.0 (compatible; ProteinCategoryParser\/1.0)&#187;,        &#171;Accept-Language&#187;: &#171;ru,en;q=0.8&#187;,    })    retry = Retry(total=3, backoff_factor=1, status_forcelist=[429, 500, 502, 503, 504],                  allowed_methods=[&#171;GET&#187;])    session.mount(&#171;https:\/\/&#187;, HTTPAdapter(max_retries=retry))    return sessiondef clean(text: str) -&gt; str:    return re.sub(r&#187;\\s+&#187;, &#187; &#171;, text).strip()def canonical(url: str) -&gt; str:    p = urlparse(urljoin(BASE, url))    return urlunparse((p.scheme, p.netloc, p.path.rstrip(&#171;\/&#187;) + &#171;\/&#187;, &#171;&#187;, &#171;&#187;, &#171;&#187;))def product_links(soup: BeautifulSoup) -&gt; Iterable[tuple[str, str]]:    category_path = urlparse(CATEGORY_URL).path.rstrip(&#171;\/&#187;) + &#171;\/&#187;    seen = set()    for a in soup.select(&#171;a[href]&#187;):        href = canonical(a[&#171;href&#187;])        parsed = urlparse(href)        if parsed.netloc != urlparse(BASE).netloc:            continue        if not parsed.path.startswith(category_path) or parsed.path == category_path:            continue        # On the category page a product is linked by both its title and its image.        if &#171;index.php&#187; in a[&#171;href&#187;] or &#171;page=&#187; in a[&#171;href&#187;]:            continue        name = clean(a.get_text(&#187; &#171;, strip=True))        if href and name and href not in seen:            seen.add(href)            yield name, hrefdef readable_description(container: BeautifulSoup) -&gt; str:    &#171;&#187;&#187;\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 HTML-\u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0438 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u044e\u0440\u0438\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440 \u0438 SEO-\u0441\u043f\u0430\u043c.&#187;&#187;&#187;    # \u0414\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c div \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f.    for node in container.find_all(string=re.compile(r&#187;\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f,? \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u0441\u0430\u0439\u0442\u0435&#187;, re.I)):        parent = node.parent        while parent and parent.name not in {&#171;div&#187;, &#171;p&#187;, &#171;section&#187;}:            parent = parent.parent        if parent:            parent.decompose()            break    # \u0423\u0434\u0430\u043b\u044f\u0435\u043c SEO-\u0441\u043f\u0430\u043c \u0431\u043b\u043e\u043a\u0438: \u00ab\u041e \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438\u00bb, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0431\u0440\u0435\u043d\u0434\u043e\u0432 \u0438 \u043f\u0440.    # \u041d\u0430 badrazves \u0442\u0430\u043a\u0438\u0435 \u0431\u043b\u043e\u043a\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u043e\u0432\u0430\u0440\u0430    # \u0438 \u0437\u0430\u0441\u043e\u0440\u044f\u044e\u0442 JSON \u043c\u0443\u0441\u043e\u0440\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c, \u043c\u0435\u0448\u0430\u044e\u0449\u0438\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0443 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c\u044e.    seo_patterns = [        r&#187;\u0412 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u041e\u041e\u041e \u0411\u0430\u0434\u0440\u0430\u0437\u0432\u0435\u0441&#187;,        r&#187;\u041d\u0430\u0448\u0430 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0435 \u0431\u0440\u0435\u043d\u0434\u044b&#187;,        r&#187;\u041e\u041e\u041e \u0411\u0430\u0434\u0440\u0430\u0437\u0432\u0435\u0441- \u043b\u0438\u0434\u0435\u0440 \u043d\u0430 \u0440\u044b\u043d\u043a\u0435&#187;,        r&#187;\u041d\u0430\u0448\u0438 \u0441\u043a\u043b\u0430\u0434\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f&#187;,    ]    for pattern in seo_patterns:        for node in container.find_all(string=re.compile(pattern, re.I)):            parent = node.parent            while parent and parent.name not in {&#171;div&#187;, &#171;p&#187;, &#171;section&#187;}:                parent = parent.parent            if parent:                parent.decompose()                break    for tag in container.select(&#171;script, style, noscript, img&#187;):        tag.decompose()    for br in container.find_all(&#171;br&#187;):        br.replace_with(&#171;\\n&#187;)    for link in container.find_all(&#171;a&#187;, href=True):        label = clean(link.get_text(&#187; &#171;, strip=True))        href = urljoin(BASE, link[&#171;href&#187;])        link.replace_with(f&#187;{label} ({href})&#187; if label else href)    # \u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0438 \u0441\u0442\u0440\u043e\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043d\u0435 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438 \u0438 \u0430\u0431\u0437\u0430\u0446\u044b.    text = container.get_text(&#171;\\n&#187;)    lines = []    for line in text.splitlines():        line = clean(line)        if line:            lines.append(line)        elif lines and lines[-1] != &#171;&#187;:            lines.append(&#171;&#187;)    while lines and lines[-1] == &#171;&#187;:        lines.pop()    return &#171;\\n&#187;.join(lines)def parse_product_page(session: requests.Session, item: Product) -&gt; None:    response = session.get(item.url, timeout=30)    response.raise_for_status()    soup = BeautifulSoup(response.text, &#171;html.parser&#187;)    # \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435    meta = soup.select_one(&#8216;meta[property=&#187;og:description&#187;]&#8217;)    description = soup.select_one(&#171;#tab-description&#187;) or soup.select_one(&#171;.tab-content&#187;)    if description:        item.description = readable_description(description)    elif meta:        item.description = clean(meta.get(&#171;content&#187;, &#171;&#187;))    # \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0438 \u0446\u0435\u043d\u044b.    # \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0442\u0435\u043a\u0441\u0442\u043e\u043c: \u0434\u043b\u044f \u043e\u043f\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0441\u043e\u0432\u043e\u043a (\u043c\u0435\u0448\u043a\u0438 15-25 \u043a\u0433)    # \u0441\u0430\u0439\u0442 \u0447\u0430\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u00ab0 \u20bd\u00bb \u043a\u0430\u043a \u0437\u0430\u0433\u043b\u0443\u0448\u043a\u0443 \u00ab\u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443\u00bb. \u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430    # \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 `price` \u0443 radio-\u043a\u043d\u043e\u043f\u043e\u043a \u2014 \u0431\u0435\u0440\u0451\u043c \u043e\u0442\u0442\u0443\u0434\u0430.    info = soup.select_one(&#171;.product-info&#187;)    if info:        for inp in info.select(&#171;input[type=&#8217;radio&#8217;][price]&#187;):            weight_el = (inp.find_previous_sibling(class_=re.compile(r&#187;weight&#187;))                         or inp.find_next(class_=re.compile(r&#187;weight&#187;)))            if weight_el:                weight = clean(weight_el.get_text(&#187; &#171;))                # \u0423\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u00ab+\u00bb (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00ab+869\u00bb \u2014 \u0434\u043e\u043f\u043b\u0430\u0442\u0430 \u043a \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0446\u0435\u043d\u0435).                price = inp.get(&#171;price&#187;, &#171;&#187;).lstrip(&#171;+&#187;).strip()                if weight and price:                    item.prices.append(f&#187;{weight} {price} \u20bd&#187;)        # \u0424\u043e\u043b\u0431\u044d\u043a: \u0435\u0441\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 input \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u0438, \u043f\u0430\u0440\u0441\u0438\u043c \u0432\u0438\u0434\u0438\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442.        if not item.prices:            text = clean(info.get_text(&#187; &#171;, strip=True))            item.prices = re.findall(r&#187;\\d[\\d ]*\\s*(?:\u0433|\u043a\u0433)\\s+\\d[\\d ]*\\s*(?:\u20bd|\u0440)&#187;, text, flags=re.I)def parse(args: argparse.Namespace) -&gt; list[Product]:    session = make_session()    products: dict[str, Product] = {}    page_list = list(args.pages) if args.pages else list(range(1, args.max_pages + 1))    for page in page_list:        url&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-490249","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490249","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=490249"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/490249\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=490249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=490249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=490249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}