summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/YoutubeComFolder.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/crypter/YoutubeComFolder.py')
-rw-r--r--module/plugins/crypter/YoutubeComFolder.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/module/plugins/crypter/YoutubeComFolder.py b/module/plugins/crypter/YoutubeComFolder.py
index b68630f44..4d941f2b9 100644
--- a/module/plugins/crypter/YoutubeComFolder.py
+++ b/module/plugins/crypter/YoutubeComFolder.py
@@ -29,36 +29,36 @@ class YoutubeComFolder(Crypter):
def api_response(self, ref, req):
- req.update({"key": self.API_KEY})
+ req.update({'key': self.API_KEY})
url = urlparse.urljoin("https://www.googleapis.com/youtube/v3/", ref)
html = self.load(url, get=req)
return json_loads(html)
def get_channel(self, user):
- channels = self.api_response("channels", {"part": "id,snippet,contentDetails", "forUsername": user, "maxResults": "50"})
+ channels = self.api_response("channels", {'part': "id,snippet,contentDetails", 'forUsername': user, 'maxResults': "50"})
if channels['items']:
channel = channels['items'][0]
- return {"id": channel['id'],
- "title": channel['snippet']['title'],
- "relatedPlaylists": channel['contentDetails']['relatedPlaylists'],
- "user": user} #: One lone channel for user?
+ return {'id': channel['id'],
+ 'title': channel['snippet']['title'],
+ 'relatedPlaylists': channel['contentDetails']['relatedPlaylists'],
+ 'user': user} #: One lone channel for user?
def get_playlist(self, p_id):
- playlists = self.api_response("playlists", {"part": "snippet", "id": p_id})
+ playlists = self.api_response("playlists", {'part': "snippet", 'id': p_id})
if playlists['items']:
playlist = playlists['items'][0]
- return {"id": p_id,
- "title": playlist['snippet']['title'],
- "channelId": playlist['snippet']['channelId'],
- "channelTitle": playlist['snippet']['channelTitle']}
+ return {'id': p_id,
+ 'title': playlist['snippet']['title'],
+ 'channelId': playlist['snippet']['channelId'],
+ 'channelTitle': playlist['snippet']['channelTitle']}
def _get_playlists(self, id, token=None):
- req = {"part": "id", "maxResults": "50", "channelId": id}
+ req = {'part': "id", 'maxResults': "50", 'channelId': id}
if token:
- req.update({"pageToken": token})
+ req.update({'pageToken': token})
playlists = self.api_response("playlists", req)
@@ -75,9 +75,9 @@ class YoutubeComFolder(Crypter):
def _get_videos_id(self, id, token=None):
- req = {"part": "contentDetails", "maxResults": "50", "playlistId": id}
+ req = {'part': "contentDetails", 'maxResults': "50", 'playlistId': id}
if token:
- req.update({"pageToken": token})
+ req.update({'pageToken': token})
playlist = self.api_response("playlistItems", req)