{"id":376525,"date":"2024-05-21T06:53:29","date_gmt":"2024-05-21T06:53:29","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=376525"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T06:53:29","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=376525","title":{"rendered":"<span>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Python \u0432 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u043c Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041c\u043e\u0439 \u043e\u043f\u044b\u0442<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 <strong>\u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e <\/strong><a href=\"https:\/\/apps.rustore.ru\/app\/ru.zhirnoov.youtubedownloader\" rel=\"noopener noreferrer nofollow\"><strong>\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432\u0438\u0434\u0435\u043e<\/strong><\/a><strong> \u0432 RuStore<\/strong> \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Python \u043a\u043e\u0434\u0430 \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/92b\/c6e\/27c\/92bc6e27c210b35601afa0046dd482c5.png\" alt=\"\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 RuStore\" title=\"\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 RuStore\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/92b\/c6e\/27c\/92bc6e27c210b35601afa0046dd482c5.png\"\/><\/p>\n<div><figcaption>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 RuStore<\/figcaption><\/div>\n<\/figure>\n<p>\u041a \u043c\u043e\u0435\u043c\u0443 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u044e, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043f\u0440\u043e <a href=\"https:\/\/github.com\/chaquo\/chaquopy\" rel=\"noopener noreferrer nofollow\">Chaquopy<\/a>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<blockquote>\n<p><strong>Chaquopy<\/strong> \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Python \u0432 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Gradle \u0432 Android Studio.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u0435 API \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 Python-\u043a\u043e\u0434\u0430 \u0438\u0437 Java\/Kotlin \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0428\u0438\u0440\u043e\u043a\u0438\u0439 \u0441\u043f\u0435\u043a\u0442\u0440 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 Python, \u0432\u043a\u043b\u044e\u0447\u0430\u044f SciPy, OpenCV, TensorFlow \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<\/li>\n<\/ol>\n<\/blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 Chaquopy, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 <a href=\"https:\/\/github.com\/Electron-Cash\/Electron-Cash\" rel=\"noopener noreferrer nofollow\">Electron Cash<\/a> \u0438 <a href=\"https:\/\/github.com\/talosross\/SummaryYou\" rel=\"noopener noreferrer nofollow\">SummaryYou<\/a><\/p>\n<h2>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 2023 \u0433\u043e\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f Android. <br \/>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 yt-dlp, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u043c \u043d\u043e\u0436\u043e\u043c \u0432 \u043c\u0438\u0440\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u043c\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430\u043c\u0438. <br \/>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. <br \/>\u0421\u0430\u043c\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430 Java\/Kotlin, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u044f \u0435\u0451 \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. <br \/>\u041d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Chaquopy \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c yt-dlp \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u044d\u0442\u043e \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u043a\u0440\u0443\u0442\u043e!<\/p>\n<p>\u0417\u0430\u0431\u0435\u0433\u0430\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043f\u0435\u0440\u0435\u0434, \u0443\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0438 \u0434\u043b\u044f YouTube, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 1080p \u0438 \u0432\u044b\u0448\u0435. <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0442\u0440\u043e\u043b\u043b\u0438\u0442\u044c \u043c\u0435\u043d\u044f, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044f <strong>24-\u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0435\u043e \u0436\u0443\u0440\u0447\u0430\u043d\u0438\u044f \u041d\u0438\u0430\u0433\u0430\u0440\u0441\u043a\u043e\u0433\u043e \u0432\u043e\u0434\u043e\u043f\u0430\u0434\u0430 \u0432 4K<\/strong>. \u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u043d\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0435\u0441\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u043e \u044e\u043c\u043e\u0440\u0430:)<br \/>\u0422\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0432\u0438\u0434\u0435\u043e \u0441 YouTube \u043d\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0430 \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f 360-720p. <br \/>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0441\u0442\u0435\u043d\u0435 \u0432\u0438\u0441\u0438\u0442 \u0440\u0443\u0436\u044c\u0451, \u043e\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442. <br \/>\u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u044d\u0442\u043e\u043c\u0443, YouTube \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0432\u0435\u043b \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u043d\u0430\u0448 IP, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e \u0432\u0438\u0434\u0435\u043e. <br \/>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u044b \u043d\u0430 Android \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0443\u0441\u0442\u0440\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435. \u0414\u0430 \u0438 \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043b\u0443\u0447\u0448\u0435\u0435 \u2014 \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e.<\/p>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Chaquopy<\/h2>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 Hello World, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <br \/>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 <a href=\"https:\/\/gitflic.ru\/project\/zhirnoov\/chaquopyhelloworld\" rel=\"noopener noreferrer nofollow\">GitFlic<\/a>.<\/p>\n<pre><code class=\"kotlin\"> \/\/ build.gradle.kts (Project:ChaquopyHelloWorld) plugins {     alias(libs.plugins.androidApplication) apply false     alias(libs.plugins.jetbrainsKotlinAndroid) apply false     id(\"com.chaquo.python\") version \"15.0.1\" apply false }  \/\/ build.gradle.kts (Module:app) plugins {     alias(libs.plugins.androidApplication)     alias(libs.plugins.jetbrainsKotlinAndroid)     id(\"com.chaquo.python\") }  android {          defaultConfig {          ndk {             abiFilters += listOf(\"x86\", \"x86_64\", \"armeabi-v7a\", \"arm64-v8a\")         }     }     \/\/\/\/ .... }  chaquopy {     defaultConfig {         pip {             \/\/ \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 yt-dlp             \/\/ install(\"yt-dlp\")         }     } }  dependencies {      \/\/\/.... }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Chaquopy. <br \/>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>abiFilters<\/strong> \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u0441\u0435\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. <br \/>\u0412 \u0431\u043b\u043e\u043a\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Pip \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 python. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0434\u0430 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0448 Python-\u043a\u043e\u0434.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f39\/158\/cec\/f39158cecb95d7711c8e9bdc4a16d834.png\" width=\"474\" height=\"660\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f39\/158\/cec\/f39158cecb95d7711c8e9bdc4a16d834.png\"\/><\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e hello world \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">#helloworld.py  def get_text(name : str):     return \"\u041f\u0440\u0438\u0432\u0435\u0442, \" + name<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c Chaquopy \u0432 onCreate Application \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0432 MainActivity \u0444\u0443\u043d\u043a\u0446\u0438\u044e get_text \u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0435\u0451 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435:<\/p>\n<pre><code class=\"kotlin\">class App : Application() {      override fun onCreate() {         super.onCreate()         if (!Python.isStarted()) {             Python.start(AndroidPlatform(this))         }     }  }    class MainActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)          val python = Python.getInstance()         val helloText = python.getModule(\"helloworld\")             .callAttr(\"get_text\", \"\u0425\u0430\u0431\u0440\").toString()          setContent {             ChaquopyHelloWorldTheme {                 Surface(                     modifier = Modifier.fillMaxSize(),                     color = MaterialTheme.colorScheme.background                 ) {                     Text(text = helloText)                 }             }         }     } }<\/code><\/pre>\n<h2>\u0423\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u0435\u0439\u0441\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0438\u0434\u0435\u043e \u0441 YouTube \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 1080p+.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443: \u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u0432 \u043c\u0435\u0442\u043e\u0434 download \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0435\u043e (\u0432 yt-dlp \u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430), \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. <br \/>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0443\u0434\u0438\u043e- \u0438 \u0432\u0438\u0434\u0435\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0438, \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e FFmpegKit \u043e\u043d\u0438 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b, \u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, Kotlin \u0438 Python \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<pre><code class=\"kotlin\">val pythonFile = python.getModule(\"download_hq_youtube_vid\")                         pythonFile.callAttr(                             \"download\",                             url,                             path,                             filename,                             format,                             ext                         )<\/code><\/pre>\n<pre><code class=\"python\">import os import yt_dlp from com.arthenica.ffmpegkit import FFmpegKit   def download(url: str, path: str, title: str, format: str, ext: str):     os.chdir(path)     audio_filename = title + \"_audio.webm\"     video_filename = title + \"_video.\" + ext     hq_options = {         'format': format,         'outtmpl': video_filename     }     yt_dlp.YoutubeDL(hq_options).download([url])     video_output = title + \".\" + ext     audio_options = {         'format': 'bestaudio',         'outtmpl': audio_filename     }     yt_dlp.YoutubeDL(audio_options).download([url])     command = \"-i \" + video_filename + \" -i \" + audio_filename + \" -c:v copy -c:a copy \" + video_output     FFmpegKit.execute(command)     os.remove(audio_filename)     os.remove(video_filename)<\/code><\/pre>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/815413\/\"> https:\/\/habr.com\/ru\/articles\/815413\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 <strong>\u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e <\/strong><a href=\"https:\/\/apps.rustore.ru\/app\/ru.zhirnoov.youtubedownloader\" rel=\"noopener noreferrer nofollow\"><strong>\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432\u0438\u0434\u0435\u043e<\/strong><\/a><strong> \u0432 RuStore<\/strong> \u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 Python \u043a\u043e\u0434\u0430 \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0432\u0438\u0434\u0435\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 RuStore<\/figcaption><\/div>\n<\/figure>\n<p>\u041a \u043c\u043e\u0435\u043c\u0443 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u044e, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0433\u043e \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043f\u0440\u043e <a href=\"https:\/\/github.com\/chaquo\/chaquopy\" rel=\"noopener noreferrer nofollow\">Chaquopy<\/a>, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u043f\u043e\u0439\u0434\u0435\u0442 \u0440\u0435\u0447\u044c.<\/p>\n<blockquote>\n<p><strong>Chaquopy<\/strong> \u2014 \u044d\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Python \u0432 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044f:<\/p>\n<ol>\n<li>\n<p>\u041f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0441\u0431\u043e\u0440\u043a\u0438 Gradle \u0432 Android Studio.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u0435 API \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 Python-\u043a\u043e\u0434\u0430 \u0438\u0437 Java\/Kotlin \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<\/li>\n<li>\n<p>\u0428\u0438\u0440\u043e\u043a\u0438\u0439 \u0441\u043f\u0435\u043a\u0442\u0440 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 Python, \u0432\u043a\u043b\u044e\u0447\u0430\u044f SciPy, OpenCV, TensorFlow \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/p>\n<\/li>\n<\/ol>\n<\/blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 Chaquopy, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 <a href=\"https:\/\/github.com\/Electron-Cash\/Electron-Cash\" rel=\"noopener noreferrer nofollow\">Electron Cash<\/a> \u0438 <a href=\"https:\/\/github.com\/talosross\/SummaryYou\" rel=\"noopener noreferrer nofollow\">SummaryYou<\/a><\/p>\n<h2>\u041f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u044f<\/h2>\n<p>\u0412 \u043d\u0430\u0447\u0430\u043b\u0435 2023 \u0433\u043e\u0434\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441\u0432\u043e\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u0434\u043b\u044f Android. <br \/>\u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0431\u044b\u043b\u0430 \u0432\u0437\u044f\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 yt-dlp, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u043c \u043d\u043e\u0436\u043e\u043c \u0432 \u043c\u0438\u0440\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u043c\u0438 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0430\u043c\u0438. <br \/>\u042d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0442\u044b\u0441\u044f\u0447\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. <br \/>\u0421\u0430\u043c\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430 Java\/Kotlin, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0443\u044e \u0432\u0435\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0434\u0430\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0421\u043f\u043e\u0439\u043b\u0435\u0440: \u044f \u0435\u0451 \u0442\u0430\u043a \u0438 \u043d\u0435 \u043d\u0430\u0448\u0435\u043b. <br \/>\u041d\u043e \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f Chaquopy \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c yt-dlp \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0438 \u044d\u0442\u043e \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u043a\u0440\u0443\u0442\u043e!<\/p>\n<p>\u0417\u0430\u0431\u0435\u0433\u0430\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u043f\u0435\u0440\u0435\u0434, \u0443\u0442\u043e\u0447\u043d\u044e, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0432\u0441\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u041c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e \u0438 \u0430\u0443\u0434\u0438\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0438 \u0434\u043b\u044f YouTube, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 1080p \u0438 \u0432\u044b\u0448\u0435. <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0442\u0440\u043e\u043b\u043b\u0438\u0442\u044c \u043c\u0435\u043d\u044f, \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044f <strong>24-\u0447\u0430\u0441\u043e\u0432\u044b\u0435 \u0432\u0438\u0434\u0435\u043e \u0436\u0443\u0440\u0447\u0430\u043d\u0438\u044f \u041d\u0438\u0430\u0433\u0430\u0440\u0441\u043a\u043e\u0433\u043e \u0432\u043e\u0434\u043e\u043f\u0430\u0434\u0430 \u0432 4K<\/strong>. \u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u0430\u0440\u043d\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0435\u0441\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u043e \u044e\u043c\u043e\u0440\u0430:)<br \/>\u0422\u043e\u0433\u0434\u0430 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u043e\u0432 \u0432\u0438\u0434\u0435\u043e \u0441 YouTube \u043d\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0431\u043e\u0440\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0430 \u043b\u0438\u0448\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f 360-720p. <br \/>\u041a\u0430\u043a \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0441\u0442\u0435\u043d\u0435 \u0432\u0438\u0441\u0438\u0442 \u0440\u0443\u0436\u044c\u0451, \u043e\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0438\u0442. <br \/>\u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u043a \u044d\u0442\u043e\u043c\u0443, YouTube \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0432\u0435\u043b \u043b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u043d\u0430\u0448 IP, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u043f\u0440\u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>\u0411\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043a \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e \u0432\u0438\u0434\u0435\u043e. <br \/>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u044b \u043d\u0430 Android \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0448\u0443\u0441\u0442\u0440\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0438\u0434\u0435\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435. \u0414\u0430 \u0438 \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043b\u0443\u0447\u0448\u0435\u0435 \u2014 \u0432\u0440\u0430\u0433 \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e.<\/p>\n<h2>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Chaquopy<\/h2>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 Hello World, \u0430 \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u044f \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435. <br \/>\u0412\u0435\u0441\u044c \u043a\u043e\u0434 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u044f \u0432\u044b\u043b\u043e\u0436\u0438\u043b \u043d\u0430 <a href=\"https:\/\/gitflic.ru\/project\/zhirnoov\/chaquopyhelloworld\" rel=\"noopener noreferrer nofollow\">GitFlic<\/a>.<\/p>\n<pre><code class=\"kotlin\"> \/\/ build.gradle.kts (Project:ChaquopyHelloWorld) plugins {     alias(libs.plugins.androidApplication) apply false     alias(libs.plugins.jetbrainsKotlinAndroid) apply false     id(\"com.chaquo.python\") version \"15.0.1\" apply false }  \/\/ build.gradle.kts (Module:app) plugins {     alias(libs.plugins.androidApplication)     alias(libs.plugins.jetbrainsKotlinAndroid)     id(\"com.chaquo.python\") }  android {          defaultConfig {          ndk {             abiFilters += listOf(\"x86\", \"x86_64\", \"armeabi-v7a\", \"arm64-v8a\")         }     }     \/\/\/\/ .... }  chaquopy {     defaultConfig {         pip {             \/\/ \u0417\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 yt-dlp             \/\/ install(\"yt-dlp\")         }     } }  dependencies {      \/\/\/.... }<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Chaquopy. <br \/>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>abiFilters<\/strong> \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0432\u0441\u0435\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. <br \/>\u0412 \u0431\u043b\u043e\u043a\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Pip \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c.<\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0432 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0430\u043f\u043a\u0430 python. \u0418\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0434\u0430 \u043c\u044b \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0448 Python-\u043a\u043e\u0434.<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u043f\u0438\u0448\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e hello world \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"python\">#helloworld.py  def get_text(name : str):     return \"\u041f\u0440\u0438\u0432\u0435\u0442, \" + name<\/code><\/pre>\n<p>\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c Chaquopy \u0432 onCreate Application \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0432 MainActivity \u0444\u0443\u043d\u043a\u0446\u0438\u044e get_text \u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0435\u0451 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435:<\/p>\n<pre><code class=\"kotlin\">class App : Application() {      override fun onCreate() {         super.onCreate()         if (!Python.isStarted()) {             Python.start(AndroidPlatform(this))         }     }  }    class MainActivity : ComponentActivity() {     override fun onCreate(savedInstanceState: Bundle?) {         super.onCreate(savedInstanceState)          val python = Python.getInstance()         val helloText = python.getModule(\"helloworld\")             .callAttr(\"get_text\", \"\u0425\u0430\u0431\u0440\").toString()          setContent {             ChaquopyHelloWorldTheme {                 Surface(                     modifier = Modifier.fillMaxSize(),                     color = MaterialTheme.colorScheme.background                 ) {                     Text(text = helloText)                 }             }         }     } }<\/code><\/pre>\n<h2>\u0423\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u043c<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u0435\u0439\u0441\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0432\u0438\u0434\u0435\u043e \u0441 YouTube \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 1080p+.<\/p>\n<p>\u041a\u0440\u0430\u0442\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u0436\u0438\u043c\u0441\u044f \u043f\u043e \u043a\u043e\u0434\u0443: \u044f \u043f\u0435\u0440\u0435\u0434\u0430\u044e \u0432 \u043c\u0435\u0442\u043e\u0434 download \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u0444\u043e\u0440\u043c\u0430\u0442 \u0432\u0438\u0434\u0435\u043e (\u0432 yt-dlp \u044d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430), \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f (\u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f) \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. <br \/>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0443\u0434\u0438\u043e- \u0438 \u0432\u0438\u0434\u0435\u043e\u0434\u043e\u0440\u043e\u0436\u043a\u0438, \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e FFmpegKit \u043e\u043d\u0438 \u0441\u043a\u043b\u0435\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0435\u0434\u0438\u043d\u044b\u0439 \u0432\u0438\u0434\u0435\u043e\u0444\u0430\u0439\u043b, \u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u044e\u0442\u0441\u044f.<\/p>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, Kotlin \u0438 Python \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<pre><code class=\"kotlin\">val pythonFile = python.getModule(\"download_hq_youtube_vid\")                         pythonFile.callAttr(                             \"download\",                             url,                             path,                             filename,                             format,                             ext                         )<\/code><\/pre>\n<pre><code class=\"python\">import os import yt_dlp from com.arthenica.ffmpegkit import FFmpegKit   def download(url: str, path: str, title: str, format: str, ext: str):     os.chdir(path)     audio_filename = title + \"_audio.webm\"     video_filename = title + \"_video.\" + ext     hq_options = {         'format': format,         'outtmpl': video_filename     }     yt_dlp.YoutubeDL(hq_options).download([url])     video_output = title + \".\" + ext     audio_options = {         'format': 'bestaudio',         'outtmpl': audio_filename     }     yt_dlp.YoutubeDL(audio_options).download([url])     command = \"-i \" + video_filename + \" -i \" + audio_filename + \" -c:v copy -c:a copy \" + video_output     FFmpegKit.execute(command)     os.remove(audio_filename)     os.remove(video_filename)<\/code><\/pre>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/815413\/\"> https:\/\/habr.com\/ru\/articles\/815413\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-376525","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376525","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=376525"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376525\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}