diff --git a/TestDailymotion.py b/TestDailymotion.py index 7c15e80..30233e5 100644 --- a/TestDailymotion.py +++ b/TestDailymotion.py @@ -100,7 +100,8 @@ def test_upload(self): video = d.post('/videos', {'url' : url, 'title' : 'my_test_upload_%s' % time.strftime("%c"), 'published' : 'true', - 'channel' : 'news' + 'channel' : 'news', + 'geoblocking': ["allow", "fr"], }) self.assertEqual('id' in video, True) d.delete('/video/%s' % video['id']) diff --git a/dailymotion.py b/dailymotion.py index 1c6627d..f2aa8ff 100755 --- a/dailymotion.py +++ b/dailymotion.py @@ -327,6 +327,10 @@ def delete(self, endpoint, params=None): def call(self, endpoint, method='GET', params=None, files=None): try: + if params and isinstance(params, dict): + for k, v in params.items(): + if isinstance(v, list): + params[k] = ",".join(v) access_token = self.get_access_token() if access_token: self._headers['Authorization'] = 'Bearer %s' % access_token