summaryrefslogtreecommitdiffstats
path: root/module/plugins/crypter/DailymotionComFolder.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-17 15:29:48 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-07-17 15:29:48 +0200
commit1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 (patch)
tree820ddb376ea97d4cf3aa53ef0f4dfb4ebfa4a0d5 /module/plugins/crypter/DailymotionComFolder.py
parentSpare fixes and code cosmetics (diff)
downloadpyload-1f5a55ae2133a782bdcca334ecbcdbde50dbcf99.tar.xz
No more need to use the req argument when call load method
Diffstat (limited to 'module/plugins/crypter/DailymotionComFolder.py')
-rw-r--r--module/plugins/crypter/DailymotionComFolder.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/crypter/DailymotionComFolder.py b/module/plugins/crypter/DailymotionComFolder.py
index 93ff6a0a4..84d2c773c 100644
--- a/module/plugins/crypter/DailymotionComFolder.py
+++ b/module/plugins/crypter/DailymotionComFolder.py
@@ -22,16 +22,16 @@ class DailymotionComFolder(Crypter):
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- def api_response(self, ref, req=None):
+ def api_response(self, ref, data=None):
url = urlparse.urljoin("https://api.dailymotion.com/", ref)
- html = self.load(url, get=req)
+ html = self.load(url, get=data)
return json_loads(html)
def get_playlist_info(self, id):
- ref = "playlist/" + id
- req = {"fields": "name,owner.screenname"}
- playlist = self.api_response(ref, req)
+ ref = "playlist/" + id
+ data = {"fields": "name,owner.screenname"}
+ playlist = self.api_response(ref, data)
if "error" in playlist:
return
@@ -42,9 +42,9 @@ class DailymotionComFolder(Crypter):
def _get_playlists(self, user_id, page=1):
- ref = "user/%s/playlists" % user_id
- req = {"fields": "id", "page": page, "limit": 100}
- user = self.api_response(ref, req)
+ ref = "user/%s/playlists" % user_id
+ data = {"fields": "id", "page": page, "limit": 100}
+ user = self.api_response(ref, data)
if "error" in user:
return
@@ -62,9 +62,9 @@ class DailymotionComFolder(Crypter):
def _get_videos(self, id, page=1):
- ref = "playlist/%s/videos" % id
- req = {"fields": "url", "page": page, "limit": 100}
- playlist = self.api_response(ref, req)
+ ref = "playlist/%s/videos" % id
+ data = {"fields": "url", "page": page, "limit": 100}
+ playlist = self.api_response(ref, data)
if "error" in playlist:
return