{"id":376377,"date":"2024-05-21T06:49:20","date_gmt":"2024-05-21T06:49:20","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=376377"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T06:49:20","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=376377","title":{"rendered":"<span>\u041a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f YouTube, \u043d\u0435 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0441\u0430\u043d\u0438\u0442\u0430\u0440\u043e\u0432<\/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! \u041a\u043e\u0433\u0434\u0430\u2011\u0442\u043e \u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430\u00a0\u0440\u043e\u043b\u0438\u043a, \u0433\u0434\u0435 \u043f\u0430\u0440\u0435\u043d\u044c \u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f\u00a0YouTube. \u0418\u0434\u0435\u044f\u00a0\u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435\u0439! \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0438\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u00a0\u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0434\u043e\u0435\u0434\u0430\u0442\u044c \u043b\u0435\u043d\u0442\u0430\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u0440\u0435\u043a\u043b\u0430\u043c\u043e\u0439 \u0438\u00a0\u0442.\u00a0\u0434. <\/p>\n<p>\u041d\u043e\u00a0\u0432\u043e\u0442 \u0431\u0435\u0434\u0430, \u0430\u0432\u0442\u043e\u0440, \u043d\u0435\u00a0\u043d\u0430\u0439\u0434\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c YouTube API, \u0440\u0435\u0448\u0438\u043b \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437\u00a0\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043e\u0431\u0451\u0440\u0442\u043e\u043a \u043d\u0430\u0434 YouTube. <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442\u00a0\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0435\u0440\u044f\u0435\u0442 \u0432\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043d\u0430\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u043b\u0438\u0431\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438?<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <a href=\"https:\/\/apps.rustore.ru\/app\/ru.zhirnov.youtubeinbackground\" rel=\"noopener noreferrer nofollow\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u044e\u0442\u0443\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>. <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0443\u043b\u043e\u043a \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u044e\u0442\u0443\u0431 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0438\u043b\u0438 \u0432 PiP \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044f\u0441\u044c \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438 \u0432 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435. <br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e!<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f27\/02b\/f45\/f2702bf456d6b957b8d7ebc40d117492.png\" alt=\"YouTube \u0432 \u0444\u043e\u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 RuStore\" title=\"YouTube \u0432 \u0444\u043e\u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 RuStore\" width=\"1600\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f27\/02b\/f45\/f2702bf456d6b957b8d7ebc40d117492.png\"\/><\/p>\n<div><figcaption>YouTube \u0432 \u0444\u043e\u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 RuStore<\/figcaption><\/div>\n<\/figure>\n<p>\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 \u043a\u0430\u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 YouTube API.<\/p>\n<p>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/tombulled\/innertube\" rel=\"noopener noreferrer nofollow\">InnerTube<\/a>:<\/p>\n<blockquote>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c API InnerTube, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u043e\u0439 YouTube.<\/p>\n<p>\u0427\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441\u0430*<\/p>\n<\/blockquote>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <strong>yt-dlp<\/strong><\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 ViMusic \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0432c\u0451 \u043d\u0430\u0434\u0435\u0436\u043d\u043e, \u043a\u0430\u043a \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u044b!<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f InnerTube. \u041f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"python\">import innertube  client = innertube.InnerTube(\"WEB\")  # \u041f\u043e\u0438\u0441\u043a \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 client.search(query=\"\u0443\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 python\")  # \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e Rick Astley - Never Gonna Give You Up client.player(video_id=\"dQw4w9WgXcQ\")<\/code><\/pre>\n<p>\u0422\u0430\u0449\u0438\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u043d\u0430\u0448\u0435 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c. <br \/>\u0415\u0441\u043b\u0438 \u043f\u043e\u0440\u044b\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 InnerTube, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b <a href=\"http:\/\/config.py\" rel=\"noopener noreferrer nofollow\">config.py<\/a> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a WEB \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a TVLITE, ANDROID, IOS \u0438 \u0434\u0440. <br \/>\u0423 \u0432\u0441\u0435\u0445 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0438 \u0433\u0434\u0435-\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">REFERER_YOUTUBE: str = \"https:\/\/www.youtube.com\/\" USER_AGENT_WEB: str = (     \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/74.0.3729.157 Safari\/537.36\" )  config: Config = Config(     base_url=\"https:\/\/youtubei.googleapis.com\/youtubei\/v1\/\",     clients=[         ClientContext(             client_id=1,             client_name=\"WEB\",             client_version=\"2.20230728.00.00\",             user_agent=USER_AGENT_WEB,             referer=REFERER_YOUTUBE,             api_key=\"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8\",         )     ], )<\/code><\/pre>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0438\u0437 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044c\u044e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Retrofit. <\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 40 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0434\u0430\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<pre><code class=\"kotlin\">interface InnerTubeService {     @POST(\"v1\/player\")     suspend fun getPlayerInfo(@Body body: PlayerBody): Response&lt;PlayerResponse>      @POST(\"v1\/search?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8\")     suspend fun searchVideos(@Body body: SearchBody): Response&lt;SearchResponse> }  \/\/ Body \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e val searchBody = SearchBody(                 contentCheckOk = true, context = Context(                     client = Client(                         androidSdkVersion = 31,                         clientName = \"WEB\",                         clientScreen = \"WATCH\",                         clientVersion = \"2.20230728.00.00\",                         gl = \"US\",                         hl = \"en\"                     ), thirdParty = ThirdParty(embedUrl = \"https:\/\/www.youtube.com\/\")                 ), playbackContext = PlaybackContext(                     contentPlaybackContext = ContentPlaybackContext(                         signatureTimestamp = 19250                     )                 ), racyCheckOk = true, query = query             )  \/\/Body \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044f val playerBody = PlayerBody(                 contentCheckOk = true, context = Context(                     client = Client(                         androidSdkVersion = 31,                         clientName = \"TVLITE\",                         clientScreen = \"WATCH\",                         clientVersion = \"2\",                         gl = \"US\",                         hl = \"en\"                     ), thirdParty = ThirdParty(embedUrl = \"https:\/\/www.youtube.com\/\")                 ), playbackContext = PlaybackContext(                     contentPlaybackContext = ContentPlaybackContext(                         signatureTimestamp = 19250                     )                 ), racyCheckOk = true, videoId = videoId             )<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.<\/p>\n<pre><code class=\"kotlin\">data class PlayerResponse(val streamingData : StreamingData,                           val videoDetails : VideoDetails)  data class StreamingData(val formats : List&lt;Formats>)  data class Formats(val itag : Long, val url : String)<\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0448\u0443\u0441\u0442\u0440\u043e \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 YouTube API.<\/p>\n<p>\u042f \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u044b, \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043c\u0438\u043d\u0438-\u043f\u043b\u0435\u0435\u0440 \u0438 \u0434\u0440.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/814971\/\"> https:\/\/habr.com\/ru\/articles\/814971\/<\/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! \u041a\u043e\u0433\u0434\u0430\u2011\u0442\u043e \u0434\u0430\u0432\u043d\u043e \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430\u00a0\u0440\u043e\u043b\u0438\u043a, \u0433\u0434\u0435 \u043f\u0430\u0440\u0435\u043d\u044c \u043f\u0438\u0441\u0430\u043b \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0434\u043b\u044f\u00a0YouTube. \u0418\u0434\u0435\u044f\u00a0\u0431\u044b\u043b\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u0440\u044f\u0441\u0430\u044e\u0449\u0435\u0439! \u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u0438\u00a0\u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u00a0\u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0434\u043e\u0435\u0434\u0430\u0442\u044c \u043b\u0435\u043d\u0442\u0430\u043c\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u0440\u0435\u043a\u043b\u0430\u043c\u043e\u0439 \u0438\u00a0\u0442.\u00a0\u0434. <\/p>\n<p>\u041d\u043e\u00a0\u0432\u043e\u0442 \u0431\u0435\u0434\u0430, \u0430\u0432\u0442\u043e\u0440, \u043d\u0435\u00a0\u043d\u0430\u0439\u0434\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c YouTube API, \u0440\u0435\u0448\u0438\u043b \u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043e\u0434\u043d\u0443 \u0438\u0437\u00a0\u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434 \u043e\u0431\u0451\u0440\u0442\u043e\u043a \u043d\u0430\u0434 YouTube. <\/p>\n<p>\u0421\u0442\u043e\u0438\u0442\u00a0\u043b\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0442\u0435\u0440\u044f\u0435\u0442 \u0432\u00a0\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0435\u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e \u043d\u0430\u00a0\u043a\u0430\u043a\u043e\u0439\u2011\u043b\u0438\u0431\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0432\u0440\u0435\u043c\u0435\u043d\u0438?<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0439 <a href=\"https:\/\/apps.rustore.ru\/app\/ru.zhirnov.youtubeinbackground\" rel=\"noopener noreferrer nofollow\">\u043c\u0438\u043d\u0438\u043c\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u044e\u0442\u0443\u0431 \u043a\u043b\u0438\u0435\u043d\u0442 \u043d\u0430 \u0431\u0430\u0437\u0435 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/a>. <\/p>\n<p>\u0427\u0430\u0441\u0442\u043e \u0431\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0433\u0443\u043b\u043e\u043a \u043f\u043e \u0433\u043e\u0440\u043e\u0434\u0443 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0442\u044c \u044e\u0442\u0443\u0431 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u0438\u043b\u0438 \u0432 PiP \u0440\u0435\u0436\u0438\u043c\u0435, \u043d\u0435 \u043e\u0442\u0432\u043b\u0435\u043a\u0430\u044f\u0441\u044c \u043e\u0442 \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0434\u0440\u0443\u0437\u044c\u044f\u043c\u0438 \u0432 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u0435. <br \/>\u0422\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e!<\/p>\n<figure class=\"full-width\">\n<div><figcaption>YouTube \u0432 \u0444\u043e\u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 RuStore<\/figcaption><\/div>\n<\/figure>\n<p>\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 \u043a\u0430\u043a \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 YouTube API.<\/p>\n<p>\u041a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f Python \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/tombulled\/innertube\" rel=\"noopener noreferrer nofollow\">InnerTube<\/a>:<\/p>\n<blockquote>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043d\u0438\u0437\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c API InnerTube, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u043e\u0439 YouTube.<\/p>\n<p>\u0427\u0442\u043e-\u0442\u043e \u0442\u0438\u043f\u0430 \u0431\u0440\u0443\u0442\u0444\u043e\u0440\u0441\u0430*<\/p>\n<\/blockquote>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b <strong>yt-dlp<\/strong><\/p>\n<p>\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 ViMusic \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u0443\u0436\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u0435\u0437 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0422\u0430\u043a \u0447\u0442\u043e \u0432c\u0451 \u043d\u0430\u0434\u0435\u0436\u043d\u043e, \u043a\u0430\u043a \u0448\u0432\u0435\u0439\u0446\u0430\u0440\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u044b!<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f InnerTube. \u041f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0432\u0430\u0448\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"python\">import innertube  client = innertube.InnerTube(\"WEB\")  # \u041f\u043e\u0438\u0441\u043a \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 client.search(query=\"\u0443\u0440\u043e\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 python\")  # \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e Rick Astley - Never Gonna Give You Up client.player(video_id=\"dQw4w9WgXcQ\")<\/code><\/pre>\n<p>\u0422\u0430\u0449\u0438\u0442\u044c \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u043d\u0430\u0448\u0435 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>\u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0442\u0435\u043b\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c. <br \/>\u0415\u0441\u043b\u0438 \u043f\u043e\u0440\u044b\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 InnerTube, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b <a href=\"http:\/\/config.py\" rel=\"noopener noreferrer nofollow\">config.py<\/a> \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a WEB \u043a\u043b\u0438\u0435\u043d\u0442\u0443.<\/p>\n<p>\u041a \u0441\u043b\u043e\u0432\u0443, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a TVLITE, ANDROID, IOS \u0438 \u0434\u0440. <br \/>\u0423 \u0432\u0441\u0435\u0445 \u043d\u0438\u0445 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0435\u0440\u0441\u0438\u0438, \u0438 \u0433\u0434\u0435-\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code class=\"python\">REFERER_YOUTUBE: str = \"https:\/\/www.youtube.com\/\" USER_AGENT_WEB: str = (     \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/74.0.3729.157 Safari\/537.36\" )  config: Config = Config(     base_url=\"https:\/\/youtubei.googleapis.com\/youtubei\/v1\/\",     clients=[         ClientContext(             client_id=1,             client_name=\"WEB\",             client_version=\"2.20230728.00.00\",             user_agent=USER_AGENT_WEB,             referer=REFERER_YOUTUBE,             api_key=\"AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8\",         )     ], )<\/code><\/pre>\n<p>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c \u0438\u0437 Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0435\u0442\u044c\u044e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f Retrofit. <\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c JSON \u043e\u0431\u044a\u0435\u043a\u0442 \u0441 40 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u0441\u0442\u0440\u043e\u043a \u043e\u0442\u0432\u0435\u0442\u0430 \u0432 \u0434\u0430\u0442\u0430 \u043a\u043b\u0430\u0441\u0441\u044b.<\/p>\n<pre><code class=\"kotlin\">interface InnerTubeService {     @POST(\"v1\/player\")     suspend fun getPlayerInfo(@Body body: PlayerBody): Response&lt;PlayerResponse>      @POST(\"v1\/search?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8\")     suspend fun searchVideos(@Body body: SearchBody): Response&lt;SearchResponse> }  \/\/ Body \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u043f\u043e \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e val searchBody = SearchBody(                 contentCheckOk = true, context = Context(                     client = Client(                         androidSdkVersion = 31,                         clientName = \"WEB\",                         clientScreen = \"WATCH\",                         clientVersion = \"2.20230728.00.00\",                         gl = \"US\",                         hl = \"en\"                     ), thirdParty = ThirdParty(embedUrl = \"https:\/\/www.youtube.com\/\")                 ), playbackContext = PlaybackContext(                     contentPlaybackContext = ContentPlaybackContext(                         signatureTimestamp = 19250                     )                 ), racyCheckOk = true, query = query             )  \/\/Body \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0438\u0433\u0440\u044b\u0432\u0430\u0442\u0435\u043b\u044f val playerBody = PlayerBody(                 contentCheckOk = true, context = Context(                     client = Client(                         androidSdkVersion = 31,                         clientName = \"TVLITE\",                         clientScreen = \"WATCH\",                         clientVersion = \"2\",                         gl = \"US\",                         hl = \"en\"                     ), thirdParty = ThirdParty(embedUrl = \"https:\/\/www.youtube.com\/\")                 ), playbackContext = PlaybackContext(                     contentPlaybackContext = ContentPlaybackContext(                         signatureTimestamp = 19250                     )                 ), racyCheckOk = true, videoId = videoId             )<\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u043e\u0439 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430.<\/p>\n<pre><code class=\"kotlin\">data class PlayerResponse(val streamingData : StreamingData,                           val videoDetails : VideoDetails)  data class StreamingData(val formats : List&lt;Formats>)  data class Formats(val itag : Long, val url : String)<\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0448\u0443\u0441\u0442\u0440\u043e \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 YouTube API.<\/p>\n<p>\u042f \u0443\u0436\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0432\u0438\u0434\u0435\u043e. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u044b, \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u043c\u0438\u043d\u0438-\u043f\u043b\u0435\u0435\u0440 \u0438 \u0434\u0440.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435! \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/814971\/\"> https:\/\/habr.com\/ru\/articles\/814971\/<\/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-376377","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376377","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=376377"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/376377\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=376377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=376377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=376377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}