【问题标题】:Post on instagram selenium python在 Instagram 上发布硒 python
【发布时间】:2023-03-19 01:00:01
【问题描述】:

我想用 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 也不起作用。

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

Insagram Mobile Emilation

(移动仿真 Chrome Instagram) 我们应该点击“+”号发布并打开图片

python3

【问题讨论】:

    标签: python selenium instagram


    【解决方案1】:

    您可以使用
    轻松做到这一点 先安装包
    pip install instabot
    这是代码:

    from instabot import Bot
    bot = Bot()
    bot.login(username=`UserName`, password=`Password` ,use_cookie=False)
    self.bot=bot
    bot.upload_photo(`PATH`, caption=`YOURCAPTION`)
    

    如果要上传视频,此方法不起作用

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-04
      • 1970-01-01
      • 2018-12-05
      • 1970-01-01
      • 2019-11-13
      相关资源
      最近更新 更多