{"id":9150,"date":"2018-01-29T20:15:42","date_gmt":"2018-01-29T18:15:42","guid":{"rendered":"https:\/\/enter.lviv.ua\/oohfiro\/?p=9150"},"modified":"2018-01-29T20:15:42","modified_gmt":"2018-01-29T18:15:42","slug":"avtomatychno-dodaty-video-playlist-youtube","status":"publish","type":"post","link":"https:\/\/enter.lviv.ua\/oohfiro\/avtomatychno-dodaty-video-playlist-youtube\/","title":{"rendered":"\u042f\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0431\u0430\u0433\u0430\u0442\u043e \u0432\u0456\u0434\u0435\u043e \u0443 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u042e\u0442\u0443\u0431"},"content":{"rendered":"<p>(\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0456\u044f \u0434\u043e\u0434\u0430\u0432\u0430\u043d\u043d\u044f \u0443 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u0442\u0440\u043e\u0445\u0438 \u0437\u043b\u0430\u043c\u0430\u043b\u0430\u0441\u044c, \u044f\u043a \u0446\u0435 \u0447\u0430\u0441\u0442\u043e \u0431\u0443\u0432\u0430\u0454, \u043a\u043e\u043b\u0438 \u043f\u0440\u0430\u0446\u044e\u0454\u0448 \u0437 \u042e\u0442\u0443\u0431\u043e\u043c)<\/p>\n<hr>\n<style>.aly {padding: 5px; background: #eee; margin: 10px 0; display: block; font-weight: bold;}<\/style>\n<div id=\"firststep\">\u042f\u043a \u043c\u043e\u0436\u043d\u0430 \u0448\u0432\u0438\u0434\u043a\u043e \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u043d\u0430 \u042e\u0442\u0443\u0431 \u0437 \u0431\u0430\u0433\u0430\u0442\u044c\u043e\u0445 \u0432\u0456\u0434\u0435\u043e?<br \/>\n\u0410\u0431\u043e \u044f\u043a \u0434\u043e\u0434\u0430\u0442\u0438 \u0431\u0430\u0433\u0430\u0442\u043e \u0432\u0456\u0434\u0435\u043e \u0443 \u0456\u0441\u043d\u0443\u044e\u0447\u0438\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442?<br \/>\n\u0417\u0440\u043e\u0431\u0456\u0442\u044c \u0446\u0435 \u0443 \u0442\u0440\u0438 \u043a\u0440\u043e\u043a\u0438. <\/p>\n<h2>\u041a\u0440\u043e\u043a 1<\/h2>\n<p>\u0412\u0441\u0442\u0430\u0432\u0442\u0435 \u043f\u0435\u0440\u0435\u043b\u0456\u043a \u0430\u0434\u0440\u0435\u0441 \u0432\u0430\u0448\u0438\u0445 \u0432\u0456\u0434\u0435\u043e \u0437 youtube \u0443 \u0432\u0456\u043a\u043d\u043e (\u043a\u043e\u0436\u043d\u0435 &#8211; \u0437 \u043d\u043e\u0432\u043e\u0457 \u0441\u0442\u0440\u0456\u0447\u043a\u0438).<br \/>\n\u0410\u043b\u0435 \u043d\u0435 \u0437\u043b\u043e\u0432\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u043a\u0456\u043b\u044c\u043a\u0456\u0441\u0442\u044e. \u042f\u043a\u0449\u043e \u0432\u0456\u0434\u0435\u043e\u0440\u043e\u043b\u0438\u043a\u0456\u0432 \u0431\u0430\u0433\u0430\u0442\u043e, \u043a\u0440\u0430\u0449\u0435 \u0440\u043e\u0431\u043e\u0442\u0443 \u0440\u043e\u0437\u0431\u0438\u0442\u0438 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438\u043d\u0438. \u0414\u043e\u0434\u0430\u0442\u0438 \u0437\u0430\u0432\u0436\u0434\u0438 \u043c\u043e\u0436\u043d\u0430.<\/p>\n<p><textarea id=\"inputvideo\" cols=\"100\" name=\"textarea\" rows=\"5\"><\/textarea><\/p>\n<p><button id=\"inputvideobtn\">\u041e\u0431\u0440\u043e\u0431\u0438\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0456\u0434\u0435\u043e<\/button>\n<\/div>\n<div id=\"listlink\" style=\"display: none;\">\n<h2>\u041a\u0440\u043e\u043a 2<\/h2>\n<p>\u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043f\u043e \u0446\u044c\u043e\u043c\u0443 \u043b\u0456\u043d\u043a\u0443<\/p>\n<div id =\"linkurl\"><\/div>\n<p>\u0441\u043a\u043e\u043f\u0456\u044e\u0439\u0442\u0435 \u0442\u0430\u043c \u0430\u0434\u0440\u0435\u0441\u0443 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438, \u0437\u0433\u0435\u043d\u0435\u0440\u043e\u0432\u0430\u043d\u0443 \u042e\u0442\u0443\u0431\u043e\u043c (\u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u0456\u0439 \u0441\u0442\u0440\u0456\u0447\u0446\u0456), \u0456 \u0432\u0441\u0442\u0430\u0432\u0442\u0435 \u0443 \u0432\u0456\u043a\u043d\u043e \u043d\u0438\u0436\u0447\u0435.<\/p>\n<p><input id=\"inputlist\"><\/input><\/p>\n<p><button id=\"inputlistbtn\">\u041e\u0431\u0440\u043e\u0431\u0438\u0442\u0438<\/button>\n<\/div>\n<div id=\"finallistlink\" style=\"display: none;\">\n<h2>\u041a\u0440\u043e\u043a 3<\/h2>\n<p>\u0412\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043f\u043e \u0446\u044c\u043e\u043c\u0443 \u043b\u0456\u043d\u043a\u0443<\/p>\n<div id =\"finallinkurl\"><\/div>\n<p>\u041f\u0456\u0441\u043b\u044f \u043d\u0430\u0437\u0432\u0438 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430 \u0443 \u043c\u0435\u043d\u044e (\u0443 \u0432\u0438\u0433\u043b\u044f\u0434\u0456 \u0442\u0440\u044c\u043e\u0445 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0438\u0445 \u043a\u0440\u0430\u043f\u043e\u043a) \u0431\u0443\u0434\u0435 \u043f\u0443\u043d\u043a\u0442, \u044f\u043a\u0438\u0439 \u0434\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0434\u043e\u0434\u0430\u0442\u0438 \u0432\u0456\u0434\u0435\u043e \u0434\u043e \u0456\u0441\u043d\u0443\u044e\u0447\u043e\u0433\u043e \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442\u0430 \u0447\u0438 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u043d\u043e\u0432\u0438\u0439 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/enter.lviv.ua\/oohfiro\/wp-content\/uploads\/2018\/01\/bulk-add-video-playlist-youtube.jpg\" alt=\"\u0434\u043e\u0434\u0430\u0442\u0438 \u0431\u0430\u0433\u0430\u0442\u043e \u0432\u0456\u0434\u0435\u043e \u0443 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u042e\u0442\u0443\u0431\" width=\"717\" height=\"473\" class=\"alignnone size-full wp-image-9187\" srcset=\"https:\/\/enter.lviv.ua\/oohfiro\/wp-content\/uploads\/2018\/01\/bulk-add-video-playlist-youtube.jpg 717w, https:\/\/enter.lviv.ua\/oohfiro\/wp-content\/uploads\/2018\/01\/bulk-add-video-playlist-youtube-500x330.jpg 500w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/>\n<\/div>\n<p><script>\nfunction youtube_parser(url){\n var regExp = \/^.*((youtu.be\\\/)|(v\\\/)|(\\\/u\\\/\\w\\\/)|(embed\\\/)|(watch\\?))\\??v?=?([^#\\&\\?]*).*\/;\n var match = url.match(regExp);\n return (match&&match[7].length==11)? match[7] : false;\n}\nfunction youtubelist_parser(url){\n var regExpList = \/^.*?(?:list)=(.*?)(?:&|$)\/;\n var matchlist = url.match(regExpList);\n return (matchlist[1]);\n}\njQuery(\"#inputvideobtn\").click(function() {\n var urls = jQuery(\"#inputvideo\").val();\n if (urls!=''){\n  var urlsarray = urls.split('\\n');\n  var str = 'http:\/\/www.youtube.com\/watch_videos?video_ids=';\n   for (i = 0; i < urlsarray .length; ++i) {\n    str = str + youtube_parser(urlsarray[i]) + ',';\n   }\n  jQuery(\"#firststep\").hide();\n  jQuery(\"#listlink\").show();\n  jQuery(\"#linkurl\").append('<a class=\"aly\" target=\"_blank\" href=\"'+str+'\">\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443<\/a>');\n }\n});\njQuery(\"#inputlistbtn\").click(function() {\n var newlisturl = jQuery(\"#inputlist\").val();\n var finallisturlpre = youtubelist_parser(newlisturl);\n finallisturl = 'https:\/\/www.youtube.com\/playlist?list='+finallisturlpre+'&disable_polymer=true';\n jQuery(\"#listlink\").hide();\n jQuery(\"#finallistlink\").show();\n jQuery(\"#finallinkurl\").append('<a class=\"aly\" target=\"_blank\" href=\"'+finallisturl+'\">\u0412\u0456\u0434\u043a\u0440\u0438\u0442\u0438 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443<\/a>');\n});\n<\/script><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>\u042f\u043a \u0448\u0432\u0438\u0434\u043a\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0431\u0430\u0433\u0430\u0442\u043e \u0432\u0456\u0434\u0435\u043e \u0443 \u043f\u043b\u0435\u0439\u043b\u0438\u0441\u0442 \u043d\u0430 \u042e\u0442\u0443\u0431\u0456. \u041f\u0440\u043e\u0441\u0442\u043e \u043f\u0456\u0434\u0433\u043e\u0442\u0443\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043b\u0456\u043a \u0430\u0434\u0440\u0435\u0441 \u0437 \u0432\u0456\u0434\u0435\u043e \u0456 \u0432\u0441\u0442\u0430\u0432\u0442\u0435 \u0443 \u0444\u043e\u0440\u043c\u0443 \u0442\u0443\u0442&#8230;<\/p>\n","protected":false},"author":1,"featured_media":9187,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[24],"tags":[33,82],"class_list":["post-9150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-javascript","tag-yutub","entry","has-media"],"_links":{"self":[{"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/posts\/9150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/comments?post=9150"}],"version-history":[{"count":0,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/posts\/9150\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/media\/9187"}],"wp:attachment":[{"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/media?parent=9150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/categories?post=9150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enter.lviv.ua\/oohfiro\/wp-json\/wp\/v2\/tags?post=9150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}