首页 > 解决方案 > Python Selenium 销售组 FB

问题描述

我能帮帮我吗,我在尝试获取 div 以在 Facebook 的销售组上上传图片时遇到问题。

我已经有一个python代码,可以以销售组的形式编写自动文本,但我不能在新版本的facebook中上传图片,1年前这是可能的,但现在facebook没有输入文件

之前的代码如下

**photo_element = driver.find_element(By.XPATH,'//input[@type="file"]')
photo_element.send_keys(photo)**

但这现在不行,我试过这种方式,但在facebook搜索引擎中只添加路线的文本

新代码

photo_element = driver.find_element(By.XPATH,'//*[@aria-label="Agregar fotos"]')
photo_element.send_keys(photo)

DIV 照片

代码分区

标签: pythonfacebookseleniumautomation

解决方案


推荐阅读