使用 InstaBot 模块将视频上传到 Instagram

问题描述

我目前正在开发一个机器人,它从我的谷歌照片上传随机媒体项目,并使用 InstaBot 和谷歌照片 API 将其上传到 Instagram。上传图片没问题,但是当尝试上传视频时,机器人说

yolo.mp4 has successfully been uploaded 但是当我去检查 Instagram 帐户以查看它是否已上传时,它不起作用。不确定问题是出在 InstaBot 模块还是出在 Google Photos API 中。任何有关视频上传的帮助都会有所帮助。

这是处理视频文件代码片段:

        elif holy_mimeType == 'video':
            audit_log.write(
                f'-------{feature3}-------\nUploaded Video from Google Photos at {datetime.datetime.time(datetime.datetime.Now()).strftime("%H:%M:%s")} ({holy_productUrl})\n')

            download_file(holy_image+'=dv',r'.\ImageBin',"yolo.mp4")
            cap = f"""Hi! If this is the first time you are seeing these types of posts,read my bio for more info
                            This is an automatic account which uploads a media Item from @{other_user} 's Google Photos!


                            This Video was shot on: {feature3} GMT and had a 1 in {len(Base_URL_list)} Chance of being uploaded
                            ---- HASHTAGS ----
                            {base_hashtags}{daily_hashtags[today]}"""
            upload_video_to_instagram(r'.\ImageBin\yolo.mp4',cap)
            if os.path.isfile(r'.\ImageBin\yolo.mp4.REMOVE_ME'):
                os.remove(r'.\ImageBin\yolo.mp4.REMOVE_ME')

关于在 sniplet 中使用的变量的一些信息:

1.holymimiType - From dataframe of all modia items and tells the type of media
2.audit_log - is a .txt file just so i can see which image is being uploaded afterwards with link
3.download_file is a function which downloads the file from URL

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...