Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在instagram上发布selenium python_Python_Selenium_Instagram - Fatal编程技术网

在instagram上发布selenium python

在instagram上发布selenium python,python,selenium,instagram,Python,Selenium,Instagram,我想上传图像或视频,并用python selenium将其发布在instagram上 我试过这个: driver.find_element_by_class_name("_0TPg").send_keys('/path/to/the/picture') 还有: actions = webdriver.ActionChains(Drive) element = Drive.find_element_by_class_name("_0TPg") action

我想上传图像或视频,并用python selenium将其发布在instagram上

我试过这个:

driver.find_element_by_class_name("_0TPg").send_keys('/path/to/the/picture')
还有:

actions = webdriver.ActionChains(Drive)
element = Drive.find_element_by_class_name("_0TPg")
actions.move_to_element(element)
actions.click()
actions.send_keys('/path/to/the/picture')
actions.perform()
但没有一个成功

即使INSTAPY也不起作用

如果有人帮助我,我将不胜感激

(移动Emilion Chrome Instagram) 我们应该点击“+”符号并打开图片


python3

您可以轻松地使用
首先安装软件包
pip安装instabot

代码如下:

从instabot导入Bot
bot=bot()
bot.login(用户名=`username`,密码=`password`,使用\u cookie=False)
self.bot=bot
bot.upload_photo(`PATH`,caption=`YOURCAPTION`)
如果要上载视频,此方法无效