Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 71e14eb

Browse files
authored
Update api.py
Allow a list with one item to pass as a single item in the PostUpdate Image API
1 parent beeec98 commit 71e14eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

twitter/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,7 @@ def PostUpdate(self,
10741074
continue
10751075

10761076
_, _, file_size, media_type = parse_media_file(media_file)
1077-
if media_type == 'image/gif' or media_type == 'video/mp4':
1077+
if (media_type == 'image/gif' or media_type == 'video/mp4') and len(media)>1:
10781078
raise TwitterError(
10791079
'You cannot post more than 1 GIF or 1 video in a single status.')
10801080
if file_size > self.chunk_size or media_type in chunked_types:

0 commit comments

Comments
 (0)