Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add support for array parameters
  • Loading branch information
jeanmichel-nwsb committed Sep 8, 2025
commit ce3afef46c0e2ee4a8073f0b0dcc4620c4af3b94
3 changes: 2 additions & 1 deletion TestDailymotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
4 changes: 4 additions & 0 deletions dailymotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down