large-video-upload-python
large-video-upload-python copied to clipboard
This should cover more than just "video"
Add instructions - or modify code with comment blocks - to enable this to easily be modified for large images, GIFs, or other video.
Hi @andypiper, thanks for such a great example! I tried to tweet some large images and GIFs using this code, and I successfully modified it for the same. The only change that was required was -
request_data = {
'command': 'INIT',
'media_type': 'image/gif',
'total_bytes': self.total_bytes,
'media_category': 'tweet_gif'
}
for GIFs and -
request_data = {
'command': 'INIT',
'media_type': 'image/png',
'total_bytes': self.total_bytes,
'media_category': 'tweet_image'
}
for images. If possible and if correct, I will be happy to add these as comments in the codebase:), if not then I'll be leaving it here for anyone who is looking for it.