pax_global_header00006660000000000000000000000064125067443220014517gustar00rootroot0000000000000052 comment=2e7ce46b782f70e16ab87dc487418ffb3c495599 mopidy-youtube-2.0.0/000077500000000000000000000000001250674432200145115ustar00rootroot00000000000000mopidy-youtube-2.0.0/.coveragerc000066400000000000000000000001151250674432200166270ustar00rootroot00000000000000[report] omit = */pyshared/* */python?.?/* */site-packages/nose/*mopidy-youtube-2.0.0/.gitignore000066400000000000000000000001521250674432200164770ustar00rootroot00000000000000*.pyc MANIFEST .tox *.swp /_projects build/ .idea/ dist/ xunit-*.xml *.egg-info /_builds .coverage /_stepsmopidy-youtube-2.0.0/.mailmap000066400000000000000000000001351250674432200161310ustar00rootroot00000000000000Janez Troha Janez Troha mopidy-youtube-2.0.0/LICENSE000066400000000000000000000261351250674432200155250ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.mopidy-youtube-2.0.0/MANIFEST.in000066400000000000000000000003351250674432200162500ustar00rootroot00000000000000include .coveragerc include .mailmap include .travis.yml include LICENSE include MANIFEST.in include README.rst include mopidy_youtube/ext.conf include tox.ini recursive-include tests *.py recursive-include tests *.yaml mopidy-youtube-2.0.0/README.rst000066400000000000000000000040531250674432200162020ustar00rootroot00000000000000************** Mopidy-Youtube ************** .. image:: https://app.wercker.com/status/08a31153413287cd9a6965d8b7f26586/m :target: https://app.wercker.com/project/bykey/08a31153413287cd9a6965d8b7f26586 :alt: CI build status .. image:: https://img.shields.io/pypi/v/Mopidy-Youtube.svg?style=flat :target: https://pypi.python.org/pypi/Mopidy-Youtube/ :alt: Latest PyPI version .. image:: https://img.shields.io/pypi/dm/Mopidy-Youtube.svg?style=flat :target: https://pypi.python.org/pypi/Mopidy-Youtube/ :alt: Number of PyPI downloads .. image:: https://img.shields.io/coveralls/dz0ny/mopidy-youtube/master.svg?style=flat :target: https://coveralls.io/r/dz0ny/mopidy-youtube?branch=master :alt: Test coverage Mopidy extension that plays sound from Youtube. Installation ============ Make sure you already have the GStreamer plugins, if not you can install it by running:: $ sudo apt-get install gstreamer0.10-plugins-bad Install by running:: $ pip install Mopidy-Youtube How to use ========== Simply use search for filename in your MPD client or add Youtube url to playlist prefixed by ``yt:``. Example: ``yt:http://www.youtube.com/watch?v=Njpw2PVb1c0`` Example for playlist: ``yt:http://www.youtube.com/playlist?list=PLeCg_YDclAETQHa8VyFUHKC_Ly0HUWUnq`` If resolving stops working ========================== Update pafy library:: pip install pafy -U Project resources ================= - `Source code `_ - `Issue tracker `_ - `Download development snapshot `_ Changelog ========= v2.0.0 (2015-04-01) ------------------- - Require Mopidy >= 1.0. - Update to work with the new playback API in Mopidy 1.0. - Update to work with the new search API in Mopidy 1.0. v1.0.2 (2015-01-02) ------------------- - Changelog missing. v1.0.1 (2014-05-28) ------------------- - Changelog missing. v0.1.0 (2014-03-06) ------------------- - Initial release. mopidy-youtube-2.0.0/mopidy_youtube/000077500000000000000000000000001250674432200175665ustar00rootroot00000000000000mopidy-youtube-2.0.0/mopidy_youtube/__init__.py000066400000000000000000000012301250674432200216730ustar00rootroot00000000000000from __future__ import unicode_literals import logging import os from mopidy import config, ext __version__ = '2.0.0' logger = logging.getLogger(__name__) class Extension(ext.Extension): dist_name = 'Mopidy-Youtube' ext_name = 'youtube' version = __version__ def get_default_config(self): conf_file = os.path.join(os.path.dirname(__file__), 'ext.conf') return config.read(conf_file) def get_config_schema(self): schema = super(Extension, self).get_config_schema() return schema def setup(self, registry): from .backend import YoutubeBackend registry.add('backend', YoutubeBackend) mopidy-youtube-2.0.0/mopidy_youtube/backend.py000066400000000000000000000126361250674432200215370ustar00rootroot00000000000000# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import string from multiprocessing.pool import ThreadPool from urlparse import urlparse, parse_qs import unicodedata import pafy from mopidy import backend from mopidy.models import SearchResult, Track, Album import pykka import requests from mopidy_youtube import logger yt_api_endpoint = 'https://www.googleapis.com/youtube/v3/' yt_key = 'AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4' session = requests.Session() def resolve_track(track, stream=False): logger.debug("Resolving Youtube for track '%s'", track) if hasattr(track, 'uri'): return resolve_url(track.comment, stream) else: return resolve_url(track.split('.')[-1], stream) def safe_url(uri): valid_chars = "-_.() %s%s" % (string.ascii_letters, string.digits) safe_uri = unicodedata.normalize( 'NFKD', unicode(uri) ).encode('ASCII', 'ignore') return re.sub( '\s+', ' ', ''.join(c for c in safe_uri if c in valid_chars) ).strip() def resolve_url(url, stream=False): try: video = pafy.new(url) if not stream: uri = 'youtube:video/%s.%s' % ( safe_url(video.title), video.videoid ) else: uri = video.getbestaudio() if not uri: # get video url uri = video.getbest() logger.debug('%s - %s %s %s' % ( video.title, uri.bitrate, uri.mediatype, uri.extension)) uri = uri.url if not uri: return except Exception as e: # Video is private or doesn't exist logger.info(e.message) return track = Track( name=video.title, comment=video.videoid, length=video.length * 1000, album=Album( name='Youtube', images=[video.bigthumb, video.bigthumbhd] ), uri=uri ) return track def search_youtube(q): query = { 'part': 'id', 'maxResults': 15, 'type': 'video', 'q': q, 'key': yt_key } result = session.get(yt_api_endpoint+'search', params=query) data = result.json() resolve_pool = ThreadPool(processes=16) playlist = [item['id']['videoId'] for item in data['items']] playlist = resolve_pool.map(resolve_url, playlist) resolve_pool.close() return [item for item in playlist if item] def resolve_playlist(url): resolve_pool = ThreadPool(processes=16) logger.info("Resolving Youtube-Playlist '%s'", url) playlist = [] page = 'first' while page: params = { 'playlistId': url, 'maxResults': 50, 'key': yt_key, 'part': 'contentDetails' } if page and page != "first": logger.debug("Get Youtube-Playlist '%s' page %s", url, page) params['pageToken'] = page result = session.get(yt_api_endpoint+'playlistItems', params=params) data = result.json() page = data.get('nextPageToken') for item in data["items"]: video_id = item['contentDetails']['videoId'] playlist.append(video_id) playlist = resolve_pool.map(resolve_url, playlist) resolve_pool.close() return [item for item in playlist if item] class YoutubeBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config, audio): super(YoutubeBackend, self).__init__() self.config = config self.library = YoutubeLibraryProvider(backend=self) self.playback = YoutubePlaybackProvider(audio=audio, backend=self) self.uri_schemes = ['youtube', 'yt'] class YoutubeLibraryProvider(backend.LibraryProvider): def lookup(self, track): if 'yt:' in track: track = track.replace('yt:', '') if 'youtube.com' in track: url = urlparse(track) req = parse_qs(url.query) if 'list' in req: return resolve_playlist(req.get('list')[0]) else: return [resolve_url(track)] else: return [resolve_url(track)] def search(self, query=None, uris=None, exact=False): # TODO Support exact search if not query: return if 'uri' in query: search_query = ''.join(query['uri']) url = urlparse(search_query) if 'youtube.com' in url.netloc: req = parse_qs(url.query) if 'list' in req: return SearchResult( uri='youtube:search', tracks=resolve_playlist(req.get('list')[0]) ) else: logger.info( "Resolving Youtube for track '%s'", search_query) return SearchResult( uri='youtube:search', tracks=[resolve_url(search_query)] ) else: search_query = ' '.join(query.values()[0]) logger.info("Searching Youtube for query '%s'", search_query) return SearchResult( uri='youtube:search', tracks=search_youtube(search_query) ) class YoutubePlaybackProvider(backend.PlaybackProvider): def translate_uri(self, uri): track = resolve_track(uri, True) if track is not None: return track.uri else: return None mopidy-youtube-2.0.0/mopidy_youtube/ext.conf000066400000000000000000000001771250674432200212420ustar00rootroot00000000000000[youtube] enabled = true # TODO: Add additional config values and their default values here, or remove # this comment entirely.mopidy-youtube-2.0.0/setup.cfg000066400000000000000000000001431250674432200163300ustar00rootroot00000000000000[flake8] application-import-names = mopidy_youtube,tests exclude = .git,.tox [wheel] universal = 1mopidy-youtube-2.0.0/setup.py000066400000000000000000000026551250674432200162330ustar00rootroot00000000000000from __future__ import unicode_literals import re from setuptools import setup, find_packages def get_version(filename): content = open(filename).read() metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", content)) return metadata['version'] setup( name='Mopidy-Youtube', version=get_version('mopidy_youtube/__init__.py'), url='https://github.com/dz0ny/mopidy-youtube', license='Apache License, Version 2.0', author='Janez Troha', author_email='dz0ny@ubuntu.si', description='Mopidy extension that plays sound from Youtube', long_description=open('README.rst').read(), packages=find_packages(exclude=['tests', 'tests.*']), zip_safe=False, include_package_data=True, install_requires=[ 'setuptools', 'requests >= 2.2.1', 'pafy >= 0.3.35', 'Mopidy >= 1.0', 'Pykka >= 1.1', ], test_suite='nose.collector', tests_require=[ 'nose', 'mock >= 1.0', 'vcrpy', ], entry_points={ 'mopidy.ext': [ 'youtube = mopidy_youtube:Extension', ], }, classifiers=[ 'Environment :: No Input/Output (Daemon)', 'Intended Audience :: End Users/Desktop', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Topic :: Multimedia :: Sound/Audio :: Players', ], ) mopidy-youtube-2.0.0/tests/000077500000000000000000000000001250674432200156535ustar00rootroot00000000000000mopidy-youtube-2.0.0/tests/__init__.py000066400000000000000000000000001250674432200177520ustar00rootroot00000000000000mopidy-youtube-2.0.0/tests/fixtures/000077500000000000000000000000001250674432200175245ustar00rootroot00000000000000mopidy-youtube-2.0.0/tests/fixtures/youtube_playlist_resolve.yaml000066400000000000000000001036711250674432200255740ustar00rootroot00000000000000interactions: - request: body: null headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-28-generic] method: GET uri: https://www.googleapis.com:443/youtube/v3/playlistItems?maxResults=50&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&playlistId=PLOxORm4jpOQfMU7bpfGCzDyLropIYEHuR&part=contentDetails response: body: {string: !!python/unicode "{\n \"kind\": \"youtube#playlistItemListResponse\"\ ,\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/LAcLHfgCJyL_jU2VwTzbCzN1v7k\\\ \"\",\n \"nextPageToken\": \"CDIQAA\",\n \"pageInfo\": {\n \"totalResults\"\ : 104,\n \"resultsPerPage\": 50\n },\n \"items\": [\n {\n \"kind\": \"\ youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/o1kge4ET2MJadMntyj9m67QBquE\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFPVJ9-Uc1UucGNw5Pl1GMc\",\n \"\ contentDetails\": {\n \"videoId\": \"vCHdH3LiUS4\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/1t4NoQFi0QGyupDlyrIpZlEXeKU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJK_X8GHUSH5z6mcZnPJLzeM\",\n \"\ contentDetails\": {\n \"videoId\": \"CIJfdVPACyw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/_on7WJgNWIqQ4ajqMM6r1C1LZqU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHVfKEqdHadEk7ImVc6RHSs\",\n \"\ contentDetails\": {\n \"videoId\": \"ns83CS3cUsA\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/xHLzOLZCglZqin0OrjeVgPriAyE\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJEVaz4QUwRpyv3QVmU0b9Qg\",\n \"\ contentDetails\": {\n \"videoId\": \"9QAB7OCuFfY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/iVJ87IKxXtKBUdoEg0A7g_3dGHI\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLa-i0ksLtlcBBWq8fLnOF8\",\n \"\ contentDetails\": {\n \"videoId\": \"0z5r17WNvbY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/5j2UDEPV3W2r-w_b0_y3pgYAO2E\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJyVoiuv8gy79Z5H2AhoHFE\",\n \"\ contentDetails\": {\n \"videoId\": \"RqpDKTm5hZo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/aCXv-edsEVxWobGuDUBQuPO9W20\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJD8g8ua3IAp96a4PWTPT9ws\",\n \"\ contentDetails\": {\n \"videoId\": \"gOx47fiLg9k\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/TvnQuqK_4bPcpv82IrMHnglA59c\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFz1RBmWCYE7IJq4hF9fl_Y\",\n \"\ contentDetails\": {\n \"videoId\": \"gIRW9iqD0-M\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/jZgO5ANx_kopxLRyLyUx4YBaydY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMGjIADMQADBySth0HRf-6Q\",\n \"\ contentDetails\": {\n \"videoId\": \"qr5i5chOTPo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/KDr_Tw5wf_GEzryf7ypdNFoIRgU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGxD1aiGbTv8L56zLeqJKrk\",\n \"\ contentDetails\": {\n \"videoId\": \"gNSTDaITU_c\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/40p7L094olmu2JrX7tPHflA17DU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJOEhsXeJrRCWm2vJdm4bd-A\",\n \"\ contentDetails\": {\n \"videoId\": \"NiH5YtKBYCM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/SNNBm4bat4PTnscMjXe0o1ZjSxE\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMJGVqgDnY-gc2MsMsBLEVI\",\n \"\ contentDetails\": {\n \"videoId\": \"ohhSbgl_jhg\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/of3zLmI8mmX7d70C9Nm3bWaEu80\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJME_oCzab9qUl8K2QsVwBF8\",\n \"\ contentDetails\": {\n \"videoId\": \"mmaQjvVfV2w\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ELSEuZTXrHJbf1TtyzaykNHltnQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLehDcD2mLgN0tfdFhyhuiI\",\n \"\ contentDetails\": {\n \"videoId\": \"iR1MmlRCooY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/FLkmx__QiZ5TbNd2IffmXtN7LQ0\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGNqng2YxHqVc7tNt67EDGA\",\n \"\ contentDetails\": {\n \"videoId\": \"nvW5RDJA8i4\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/gcc25vcJ-JeQL23wveMrQ_-Jb1w\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLCX-1j0h1QXo-wCRlGKQfw\",\n \"\ contentDetails\": {\n \"videoId\": \"LLsg_Lk819s\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/aaQRIvMk_4maJHskXu2gOaotrhQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJNQYLXTIgP70NeF2a58kGgQ\",\n \"\ contentDetails\": {\n \"videoId\": \"jry45RskN4A\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/d_DwPSC-MxkefOeUXHhwDTj4MFc\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBprPyDySjQz4K7Iev4BsHY\",\n \"\ contentDetails\": {\n \"videoId\": \"NjZGttRSwA8\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/HRgsIFv_e0fMU3fLFMLPdGw_s58\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBeGajLuOYIKx5e62un4sSc\",\n \"\ contentDetails\": {\n \"videoId\": \"RQ_1XExoXws\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/gkqPsO8eWYhP2JAwZwQrmVrnQlc\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFQB53UEA-ThDDMIzATBvgo\",\n \"\ contentDetails\": {\n \"videoId\": \"yvOMqR2yCKI\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/9TxOTr5uZCKrfdupt5Xfh1y8b88\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJlHljiGyEM-gqM1F0vy6AQ\",\n \"\ contentDetails\": {\n \"videoId\": \"ctVatg4N6jg\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/9h8-Jbdk-t7DCn2eVDGJ7NYpA90\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJN0iW7oo2vazY2xgq2010Bo\",\n \"\ contentDetails\": {\n \"videoId\": \"hEMI7w4xeXo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/UljWkilnPK3wQopaUXUeq8W7Q48\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJH2KtsZWFeorIPk7HkAtF4s\",\n \"\ contentDetails\": {\n \"videoId\": \"WArlszvt4u4\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/SMFw5KvPVq3AgpYKSqRAj4HIUH0\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKH80gqG5MW5YzTemqJNGuI\",\n \"\ contentDetails\": {\n \"videoId\": \"r8MhNe6umOk\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/R0SbMkzLPbYOfwAK02O7PHw_ZFg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJEDUrSe8kYjCdXeatfSgoi8\",\n \"\ contentDetails\": {\n \"videoId\": \"77RYfTXGuUs\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/uKnyd5VZ5COjbDBXqOhgK8nQFPM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMm5NVomQfH3CJp61SuDTJc\",\n \"\ contentDetails\": {\n \"videoId\": \"t09DIJdjmOA\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/5opkzLXGtSD7QXzFanBCOkMTxtQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKv12apdSECIE8RX-NPKOSk\",\n \"\ contentDetails\": {\n \"videoId\": \"nxXx7QfnxIQ\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ITiJO32-K0JNUBqlSROrpNe6OUk\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGljhXMhzh1_skJniyEgykM\",\n \"\ contentDetails\": {\n \"videoId\": \"XtBXNRqzTbI\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/FDzuhjcb63Ie0iQ3AManRm7YzHw\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMOJCMeE3fKr97yuppFqvJA\",\n \"\ contentDetails\": {\n \"videoId\": \"krC1w3ww7AE\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/8nIevE_7u1pi51SER3pDTKvKFL8\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJU1avEbXaGZXLln7i5ANJc\",\n \"\ contentDetails\": {\n \"videoId\": \"XixGgMfaJck\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/1KpztOWLfKZHZi5rrlgJrO9c9_E\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFCMAvUXtFY4tJzrIjn1wBE\",\n \"\ contentDetails\": {\n \"videoId\": \"txGu-XVyVoI\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/41kHOY9yVx03k9mqVYYqyCLjwxg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJsfJsjPtNUStiTU_7dgWZs\",\n \"\ contentDetails\": {\n \"videoId\": \"bzUZlBlpY5c\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ZsY_89YPD0wfJtFshgC4xHbr52o\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJF-NWfGKdnraxcsLcokpglw\",\n \"\ contentDetails\": {\n \"videoId\": \"CLU56IiKczg\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/RusZ8Vz_afkl78mugrp6Ms0tWzg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJIZ16cNKSYvST5iKvWXI7AY\",\n \"\ contentDetails\": {\n \"videoId\": \"bPNVnX-f_BM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/R5CufUwCxRHIXu-cPXvWAZaOiTU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFyGWg2vhZ9Xv2C8P1nRX74\",\n \"\ contentDetails\": {\n \"videoId\": \"vQfDOlOXLvc\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Nxn1oHFLkHx_n3WZicb0cfeH0gQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFVu5wKOfNX7JIq7vIj-uZk\",\n \"\ contentDetails\": {\n \"videoId\": \"uSsSwPHeIhw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/cOA6su8Nle2QWcrpPjoD93zUSZg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFcJlNuw2gZbX9xtO_Acc98\",\n \"\ contentDetails\": {\n \"videoId\": \"2TfBh8D8Idg\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/bzOQ7HFhp2tkwih-7YOBK-wIHlU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHyJRUWdrXy_yAbuRbRfnSc\",\n \"\ contentDetails\": {\n \"videoId\": \"-EJ4aJwf_Fw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/2KSY_nTtuDRVh2sRS8szq956fCo\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJNnYTUFLSbuajU-n-DVkGMg\",\n \"\ contentDetails\": {\n \"videoId\": \"Z_MeTaViUas\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/f4IkFh0oSYxPSHkpsmP17-58zIc\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKBzOqbcdot1AY30W_Dt6Xc\",\n \"\ contentDetails\": {\n \"videoId\": \"NXx6Z_vEI6Y\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/etKNfeWb4z0F9hHOQEZ59t0mbnw\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKl2ixHtrGDCPdjdqWissWA\",\n \"\ contentDetails\": {\n \"videoId\": \"l2NohJnGxvg\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/FvzKHtqlMCafd9L87LFj_n5ZlCM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJAPXq8plYKxGh5c8EOD54ZY\",\n \"\ contentDetails\": {\n \"videoId\": \"JbScP6NT0OY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/cLB4KVbV_XElyRJ_NeIIkPMr-6Q\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBuIz1BQqcB0-tTb1VuKcy8\",\n \"\ contentDetails\": {\n \"videoId\": \"xDkYbRtQLQ4\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/G3LcT0hzRMmHrzoqMSLhouu4O7w\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJEh7Egnze3XIhgQaBhn3O-w\",\n \"\ contentDetails\": {\n \"videoId\": \"3Re5ERoAfig\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/EQHj4yD64WKfS0P1bsdHQ-YVE0c\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJPSRZd0duPtpV8viajaODug\",\n \"\ contentDetails\": {\n \"videoId\": \"HBPu7LiTQHM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/3zcKk32w82J7PvSge185icWN6dw\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJOqEk7X86OJxo3B7WtaryB0\",\n \"\ contentDetails\": {\n \"videoId\": \"Zc13NAc7dvM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/8_WfN0sMsyhj4qb4eXDPl3U2g1Q\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGjVdx-E7tKIme4NjnTtPuc\",\n \"\ contentDetails\": {\n \"videoId\": \"-dBcYHr075Y\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/lr7HOQ5XccPvJ0Vq2sGJYwiMt9E\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJOkujM20ytUaubA55nvMaMY\",\n \"\ contentDetails\": {\n \"videoId\": \"p47fEXGabaY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Q4XBydanqjx-REya5Y6Be5aX8QY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFAygwWnrXTelVlsvj76BPM\",\n \"\ contentDetails\": {\n \"videoId\": \"joucE2oAYDY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/XXBvf1wPXuZUlAk_yoaY-nTY66o\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJCSQUsYoWDWfPzmaSJ8GcfQ\",\n \"\ contentDetails\": {\n \"videoId\": \"YXnjy5YlDwk\"\n }\n }\n ]\n}\n"} headers: alternate-protocol: ['443:quic,p=0.02'] cache-control: ['private, max-age=0, must-revalidate, no-transform'] content-length: ['11878'] content-type: [application/json; charset=UTF-8] date: ['Fri, 02 Jan 2015 12:17:00 GMT'] etag: ['"F9iA7pnxqNgrkOutjQAa9F2k8HY/LAcLHfgCJyL_jU2VwTzbCzN1v7k"'] expires: ['Fri, 02 Jan 2015 12:17:00 GMT'] server: [GSE] vary: [Origin, X-Origin] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} - request: body: null headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-28-generic] method: GET uri: https://www.googleapis.com:443/youtube/v3/playlistItems?maxResults=50&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&playlistId=PLOxORm4jpOQfMU7bpfGCzDyLropIYEHuR&part=contentDetails&pageToken=CDIQAA response: body: {string: !!python/unicode "{\n \"kind\": \"youtube#playlistItemListResponse\"\ ,\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Pa3y9E-Caa4hpT02qqSYWdhKO2U\\\ \"\",\n \"nextPageToken\": \"CGQQAA\",\n \"prevPageToken\": \"CDIQAQ\",\n\ \ \"pageInfo\": {\n \"totalResults\": 104,\n \"resultsPerPage\": 50\n },\n\ \ \"items\": [\n {\n \"kind\": \"youtube#playlistItem\",\n \"etag\":\ \ \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ZZi2vtSA-anL2tRxT242pJ6nsYg\\\"\",\n \ \ \"id\": \"PLwKy1JEBxzfaXHbpCgujWJOULDq7VNesW5ywyCfJvAig\",\n \"contentDetails\"\ : {\n \"videoId\": \"U7R3BtSlcOA\"\n }\n },\n {\n \"kind\": \"youtube#playlistItem\"\ ,\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/CcmcaS8dDOXgzYP9d0NL2tBvFCs\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJK5X61qZc7E2W_JlonK2JKg\",\n \"\ contentDetails\": {\n \"videoId\": \"4Nx8URjepjo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/STn_Jqcpi4TOFhzf_iSFLp2Kp8Y\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJPTPq41V9FJ12m3Hhwf3ZoM\",\n \"\ contentDetails\": {\n \"videoId\": \"bOKutdlQEvY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/HS0vaSR3qhTpe_cDWnex-oEqNTE\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJODlzwr20b8DlZC2gmxAxlQ\",\n \"\ contentDetails\": {\n \"videoId\": \"uIA0vaNzhOk\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/zcZyNv1N0szOKQxhLCfkmJa6_Io\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLFF3h6ytdDdb35aRK5DGzM\",\n \"\ contentDetails\": {\n \"videoId\": \"VjK40bQ8Aas\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/-eeQy-_LkovcSyd8g0QT_v67xgM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMldg20hDekM6bYiHA0xnEY\",\n \"\ contentDetails\": {\n \"videoId\": \"fLVzw9wVd9o\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/mup0XNScdd1RMrBtlhWOjER9d1Y\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJOHnsKQAwDMwT1QZ4XcUmiw\",\n \"\ contentDetails\": {\n \"videoId\": \"Ns9YYSqLxyI\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/EfyGQMpTYTWGazK1XAznSg3J2xY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJC7M1D_e1tbglhF8Cop582I\",\n \"\ contentDetails\": {\n \"videoId\": \"toLrTToaN0M\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/ji1azw1L7n5L6qquiFBl8WJ-F_w\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJCXeouVmt14vbGi_Yx4nQ7w\",\n \"\ contentDetails\": {\n \"videoId\": \"o3lV7bCiQJA\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Goe7Tkxq_4bI8QkU4X1XBipMuqs\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLOs5cBxWvkC7Z7JBOkh8wM\",\n \"\ contentDetails\": {\n \"videoId\": \"elGZbcpGzdU\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/TGrCPu4-svQvHTzuHGZ4YJgKxZM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJPrWHq32ccJBPuaL74_jt50\",\n \"\ contentDetails\": {\n \"videoId\": \"IBZaQsi7iS0\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/vO5DHulZB-bwhushuS2UsiAzzTU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJEhlVlsb7Spfmc6z7q3BSgQ\",\n \"\ contentDetails\": {\n \"videoId\": \"7SDPojPxqN0\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/k1wMNJYeO9jFEHyx3TanLj9yiFI\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJCsZMI_0BcjKcdejpNaHeAE\",\n \"\ contentDetails\": {\n \"videoId\": \"-iS5vRjZXCU\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/kD_b9Y614iF_NpiwqEWzmTavXHA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMK6kr7TOrDDMQDGS3zMMtM\",\n \"\ contentDetails\": {\n \"videoId\": \"LBhbyxeQR-Q\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/yfw_5O668EXdkPNDcaxNo-_A5mE\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJAP92U5rdIRVT0ZO6sg_ArI\",\n \"\ contentDetails\": {\n \"videoId\": \"xtkFpJ6KR7Y\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/IpeesoQKmDSzUgqQvPPLbd0QGdU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJCLNV2dt1TRMb0JM5yEYB-8\",\n \"\ contentDetails\": {\n \"videoId\": \"ThoyFK3_V58\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/l2gSbIEzTVwfxNb5FpbMh_wxrKQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLSide4IyqCArD3SrKlZmk8\",\n \"\ contentDetails\": {\n \"videoId\": \"fI_8Aod3Vow\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/6tKJ2qhwIRvWmjSEIvI8rpZA0_0\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHZ_VIh6iyedbn2Q_9iE9x4\",\n \"\ contentDetails\": {\n \"videoId\": \"RRmpUtIX7Yo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/SJkctsd9MPNCo3-Wy4cDfoiuRvY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJIoArMGR657Tc1qOcIkBKXs\",\n \"\ contentDetails\": {\n \"videoId\": \"L2eV20UhkQk\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/kWS-vkVdbVuSlgfw0ir9-Dn9ZlA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJA3PyaqQ0CSwCsMEXMCTD-A\",\n \"\ contentDetails\": {\n \"videoId\": \"51kSVJ9BbTo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/o89bCLO7SoyS-NfbtEclGgNYROs\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJCOB3EZ2if5yPR9grREr2e0\",\n \"\ contentDetails\": {\n \"videoId\": \"HuxiBdUXrr0\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/AOB24HOE3NspqB6QR3lQF0MgJLY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFF1lLRFMnPUw1A-HUaH9qs\",\n \"\ contentDetails\": {\n \"videoId\": \"uBwk106e3es\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/8r1vDnNxmFJFqZRoZpNTfKizUJY\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGTZsvYf7s5-pr3ZuhiReno\",\n \"\ contentDetails\": {\n \"videoId\": \"KfDbrPcIQ2Y\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/fHa86sMxxNwldcUUBMWRtV2x2Ek\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJI0TwVCVRN33qRrnpZfGhkU\",\n \"\ contentDetails\": {\n \"videoId\": \"jdLGEX96DIM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/FumnLkPrDEaIJ_KByLvDeRdHO7w\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJM2o8PI-75rIgvB7UcVbVDI\",\n \"\ contentDetails\": {\n \"videoId\": \"rvwy3SonE5Y\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/m8wiLHpDoK5-_adzKXOjINl_Ock\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJNS8GUTSw6SCBgjxZvfWhFM\",\n \"\ contentDetails\": {\n \"videoId\": \"odPh45iWkAM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/hvKtdFuyQv54EaO66eMvm41TGsM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJNziroSUo7vkFwm0k4mbqI\",\n \"\ contentDetails\": {\n \"videoId\": \"Zl3znGJQsrk\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/H9bURbce44fj6-O8lNKkoNsAPgA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJ9UOCmVbO-4A924iCTuDCo\",\n \"\ contentDetails\": {\n \"videoId\": \"ivEYDyHNt40\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/2HQV4UeMtfFup_jYsutrdMJLhbM\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFNbZfzrBf-7nCpysr5pul0\",\n \"\ contentDetails\": {\n \"videoId\": \"NLTRQrhQAOk\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/S2NWS-3bhe3kBbcz0YzfFPmEnv8\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJP8Zz1UZUP6hzPfK7DGCKW4\",\n \"\ contentDetails\": {\n \"videoId\": \"8NsJ84YV1oA\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/0zptCJnYo42Npk-YNBtewiuzaKU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJAOblSOyB6o9pEDqYu3-Z8Y\",\n \"\ contentDetails\": {\n \"videoId\": \"9PCjVwJo3EI\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/akyeD62rS2OZ48PAc6RlKtPBia4\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGJ0dlIkD86btwJq_YmreZY\",\n \"\ contentDetails\": {\n \"videoId\": \"2q3-q8sZm_4\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/xz5rdbCCufiQ4xOdTG2LtPZeY4c\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJD866ZhiOf_WpOuwnCLMtVc\",\n \"\ contentDetails\": {\n \"videoId\": \"DVo7q4Qx7y8\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/zVbKoP_VE2tOSXDmia9zY-A7ob4\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJMLbLjaXs8oDp8pRwr6Rl80\",\n \"\ contentDetails\": {\n \"videoId\": \"z1qoyy52gEw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/IoVgAP_lNC71wzHeUgqMdZ06vTQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLANrDFpPQgPYT7GAH20ol4\",\n \"\ contentDetails\": {\n \"videoId\": \"38oh8-VXS84\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Alukh7hWbMy0YmvMoMIK-6LZfQc\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBEuIqdnVVX6HL0d9PQvNG0\",\n \"\ contentDetails\": {\n \"videoId\": \"rueQCztuTMs\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/OcKoPN8fz_zqKi3oZRLTnB5mCCI\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJJxAGe87Inl4frE5GbEyuw8\",\n \"\ contentDetails\": {\n \"videoId\": \"D0W6sMatqps\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/I50pf5LbIZc4E6SjJNoHZbz7P1s\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHbwmXaUzsp1l9G7-xhw9bQ\",\n \"\ contentDetails\": {\n \"videoId\": \"6oLgbkCIPPA\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/VXwveYc8VjEufroZQoq0tvdWmnA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBVd1EQfiNznzxRIKhCXKA4\",\n \"\ contentDetails\": {\n \"videoId\": \"PKFBlIEvTkY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/n9GMSQecDsiVWjqWm4Kbyf8HXwg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJGSIRVFLGXVv-lS1JIUvhK4\",\n \"\ contentDetails\": {\n \"videoId\": \"GtkX5AEy7dQ\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/nsDR3vUDKprxPKvkGnAvc6Z2yhA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBlHtOBMb9A0jtgMZqH5bQ0\",\n \"\ contentDetails\": {\n \"videoId\": \"IQspTWQZEgM\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/vyY-yX4kBXF2yYFZ9mOsHVLPWds\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJPkOtr1U0rZAM7l17Sy2DNg\",\n \"\ contentDetails\": {\n \"videoId\": \"AO7JVeZ6HQw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/yxR4VI9s1lFgaO3AABaQDrzqJWw\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJLrPIt7XBjTjhObHv_MMKwI\",\n \"\ contentDetails\": {\n \"videoId\": \"jGLZDTImHHs\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/qFwYzJTkfjNmjbg_X3iNUWkcphA\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFRnntgJT1NSV1TRpFHb64Y\",\n \"\ contentDetails\": {\n \"videoId\": \"Af7nNV4vUzY\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/qTsGnpKNPjwiF8WZrKLnisp_iTo\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKhNLvNt6dX-cp5PKvZl8xQ\",\n \"\ contentDetails\": {\n \"videoId\": \"n5hnkOwUq8k\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/4jfB4V8AFjwa56rWccrPiSeD8wU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJBU7q_47Vx7YYtblGx8dFQA\",\n \"\ contentDetails\": {\n \"videoId\": \"StBKK6twyn0\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/QBwXdkCyNnCTjRhnA_XNDvxsGoU\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKygYj5LJnhgcFX-Hmxgl88\",\n \"\ contentDetails\": {\n \"videoId\": \"ZubsXryIArw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/apWG6LKCnDI3YdlvrGQ87USIWyo\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJDCEt0ChLhiGfF9TzI1iT8o\",\n \"\ contentDetails\": {\n \"videoId\": \"oNciEpZYC_E\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/iSe-raXuC87wCWVAu6LYdKKDSBQ\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHBEpJSA-QxOzBfNVp1BY8Q\",\n \"\ contentDetails\": {\n \"videoId\": \"ya7aM4pbtHo\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/1Ygg8Scs5XGK5NBe3b2iLxRtglo\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJFRoJNwb-Nb3MX3NzbqEXh4\",\n \"\ contentDetails\": {\n \"videoId\": \"kGrAYt2gtks\"\n }\n }\n ]\n}\n"} headers: alternate-protocol: ['443:quic,p=0.02'] cache-control: ['private, max-age=0, must-revalidate, no-transform'] content-length: ['11906'] content-type: [application/json; charset=UTF-8] date: ['Fri, 02 Jan 2015 12:17:00 GMT'] etag: ['"F9iA7pnxqNgrkOutjQAa9F2k8HY/Pa3y9E-Caa4hpT02qqSYWdhKO2U"'] expires: ['Fri, 02 Jan 2015 12:17:00 GMT'] server: [GSE] vary: [Origin, X-Origin] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} - request: body: null headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-28-generic] method: GET uri: https://www.googleapis.com:443/youtube/v3/playlistItems?maxResults=50&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&playlistId=PLOxORm4jpOQfMU7bpfGCzDyLropIYEHuR&part=contentDetails&pageToken=CGQQAA response: body: {string: !!python/unicode "{\n \"kind\": \"youtube#playlistItemListResponse\"\ ,\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/M61DwQPpMUG8PZxN-PRySJGSOd8\\\ \"\",\n \"prevPageToken\": \"CGQQAQ\",\n \"pageInfo\": {\n \"totalResults\"\ : 104,\n \"resultsPerPage\": 50\n },\n \"items\": [\n {\n \"kind\": \"\ youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/bJn3vOK9TW3_YU5mjguv99h0fj4\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHvuCifuKHKO69JCreSoyXI\",\n \"\ contentDetails\": {\n \"videoId\": \"GcC_F3f3JPw\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/M90WIB_WhVdHEXT8IvFbALN4_xk\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJKLHWdyYB3oX0u-HZ2c59PM\",\n \"\ contentDetails\": {\n \"videoId\": \"C71W5PkBGls\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/OHl7uSTDlbcN9q9SkmtG2ShOrBg\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJHQp58u-egiY8aMyutpA8DA\",\n \"\ contentDetails\": {\n \"videoId\": \"Mo_5hCVA7DU\"\n }\n },\n {\n \ \ \"kind\": \"youtube#playlistItem\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/6r6jhQGo45brxVp4r4zG_EHtN4g\\\ \"\",\n \"id\": \"PLwKy1JEBxzfaXHbpCgujWJEKGLbhr_dcxa8HWQvtcnqg\",\n \"\ contentDetails\": {\n \"videoId\": \"K2Voanva1QA\"\n }\n }\n ]\n}\n"} headers: alternate-protocol: ['443:quic,p=0.02'] cache-control: ['private, max-age=0, must-revalidate, no-transform'] content-length: ['1160'] content-type: [application/json; charset=UTF-8] date: ['Fri, 02 Jan 2015 12:17:01 GMT'] etag: ['"F9iA7pnxqNgrkOutjQAa9F2k8HY/M61DwQPpMUG8PZxN-PRySJGSOd8"'] expires: ['Fri, 02 Jan 2015 12:17:01 GMT'] server: [GSE] vary: [Origin, X-Origin] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} version: 1 mopidy-youtube-2.0.0/tests/fixtures/youtube_search.yaml000066400000000000000000000120121250674432200234250ustar00rootroot00000000000000interactions: - request: body: null headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] User-Agent: [python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-28-generic] method: GET uri: https://www.googleapis.com:443/youtube/v3/search?maxResults=15&key=AIzaSyAl1Xq9DwdE_KD4AtPaE4EJl3WZe2zCqg4&type=video&part=id&q=chvrches response: body: {string: !!python/unicode "{\n \"kind\": \"youtube#searchListResponse\"\ ,\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/EB27u2NyX6LmPLJhLS1uP0bFhV4\\\ \"\",\n \"nextPageToken\": \"CA8QAA\",\n \"pageInfo\": {\n \"totalResults\"\ : 243298,\n \"resultsPerPage\": 15\n },\n \"items\": [\n {\n \"kind\"\ : \"youtube#searchResult\",\n \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/1L7o9RIHG0UaLLGT1d32ax2ffT4\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ TU3b1qyEGsE\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/3IezfTBiiPjbdpd5swNI4Gjx-jk\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ _mTRvJ9fugM\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/dnD7v3fj9beOaIe7j-LusVeUMUg\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ ipE-tnRh4fE\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/2W6aSevqn2e3xeRG5YpZgZlBWjw\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ zM0O1Pqjvuw\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/LGMW7H1MtkhsDLmWsw7R4IRL36o\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ 1L9iUhiOXbE\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/YSHn1TNgPRAlT93S47BuyMUzlV4\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ ktoaj1IpTbw\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/Rg4U8fhd5B0WzXmSa8DDa3Jhrjw\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ RWhEUR0I9fo\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/jYmtypJsIvubTpjqp_xEj01401M\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ CjwwmFrsX_E\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/GjyLc47sdTqSDcg0cHnYVburu3A\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ haunJARHPm4\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/qXkLEENk7SdNRzJKrt0ffs44i8Y\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ JyqemIbjcfg\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/KWhkxmFs6poSxCh532xrpAM3qPg\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ JqKTLWhJYBU\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/mRGhpp2ySwRlTej53an0qlUleIk\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ kZfSuYCx9uU\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/kPwTMwlUdVdaA-3OSQV4o7fjOIQ\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ 81RqEnvczV8\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/hDedba2GGyxUlSQjXpVHFIEUf3I\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ Kcarb0H6-U0\"\n }\n },\n {\n \"kind\": \"youtube#searchResult\",\n \ \ \"etag\": \"\\\"F9iA7pnxqNgrkOutjQAa9F2k8HY/87v4Z1FHkQM3GC1O6I7axv3JIlo\\\ \"\",\n \"id\": {\n \"kind\": \"youtube#video\",\n \"videoId\": \"\ Zdmg9QySDTs\"\n }\n }\n ]\n}\n"} headers: alternate-protocol: ['443:quic,p=0.02'] cache-control: ['private, max-age=120, must-revalidate, no-transform'] content-length: ['3105'] content-type: [application/json; charset=UTF-8] date: ['Fri, 02 Jan 2015 12:17:02 GMT'] etag: ['"F9iA7pnxqNgrkOutjQAa9F2k8HY/EB27u2NyX6LmPLJhLS1uP0bFhV4"'] expires: ['Fri, 02 Jan 2015 12:17:02 GMT'] server: [GSE] vary: [Origin, X-Origin] x-content-type-options: [nosniff] x-frame-options: [SAMEORIGIN] x-xss-protection: [1; mode=block] status: {code: 200, message: OK} version: 1 mopidy-youtube-2.0.0/tests/test_extension.py000066400000000000000000000034601250674432200213030ustar00rootroot00000000000000from __future__ import unicode_literals import unittest import mock import vcr from mopidy_youtube import Extension from mopidy_youtube.backend import resolve_playlist from mopidy_youtube.backend import search_youtube from mopidy_youtube.backend import resolve_track class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[youtube]', config) self.assertIn('enabled = true', config) @vcr.use_cassette('tests/fixtures/youtube_playlist_resolve.yaml') def test_playlist_resolver(self): with mock.patch('mopidy_youtube.backend.pafy'): videos = resolve_playlist('PLOxORm4jpOQfMU7bpfGCzDyLropIYEHuR') self.assertEquals(len(videos), 104) @vcr.use_cassette('tests/fixtures/youtube_search.yaml') def test_search_yt(self): with mock.patch('mopidy_youtube.backend.pafy'): videos = search_youtube('chvrches') self.assertEquals(len(videos), 15) @vcr.use_cassette('tests/fixtures/resolve_track.yaml') def test_resolve_track(self): with mock.patch('mopidy_youtube.backend.pafy'): video = resolve_track('TU3b1qyEGsE') self.assertTrue(video) @vcr.use_cassette('tests/fixtures/resolve_track_failed.yaml') def test_resolve_track_failed(self): with mock.patch('mopidy_youtube.backend.pafy') as pafy: pafy.new.side_effect = Exception('Removed') video = resolve_track('unknown') self.assertFalse(video) @vcr.use_cassette('tests/fixtures/resolve_track_stream.yaml') def test_resolve_track_stream(self): with mock.patch('mopidy_youtube.backend.pafy'): video = resolve_track('TU3b1qyEGsE', True) self.assertTrue(video) mopidy-youtube-2.0.0/tox.ini000066400000000000000000000007051250674432200160260ustar00rootroot00000000000000[tox] envlist = py27, flake8 [testenv] sitepackages = true deps = mock mopidy==dev pytest pytest-cov pytest-xdist vcrpy install_command = pip install --allow-unverified=mopidy --pre {opts} {packages} commands = py.test \ --basetemp={envtmpdir} \ --junit-xml=xunit-{envname}.xml \ --cov=mopidy_youtube --cov-report=term-missing \ {posargs} [testenv:flake8] deps = flake8 commands = flake8mopidy-youtube-2.0.0/wercker.yml000066400000000000000000000020751250674432200167020ustar00rootroot00000000000000box: dz0ny/mopidy-box # Build definition build: # The steps that will be executed on build steps: # A step that sets up the python virtual environment - virtualenv: name: setup virtual environment install_wheel: true # Enable wheel to speed up builds (experimental) - script: name: Install tox code: | pip install tox - script: name: Run linter code: | tox -e flake8 - script: name: Run tests code: | tox -e py27 after-steps: - virtualenv: name: setup virtual environment install_wheel: true # Enable wheel to speed up builds (experimental) - script: name: Report code coverage code: | pip install requests coveralls coveralls deploy: steps: - script: name: Deploy to PYPI code: | echo "[server-login]" > ~/.pypirc echo "username:" $PYPI_USER >> ~/.pypirc echo "password:" $PYPI_PASSWORD >> ~/.pypirc python setup.py sdist upload