我正在使用selenium python从whatsapp web的聊天中下载几个图像
代码:
images = driver.find_elements_by_class_name('_22Mb1')
for image in images:
sticker = image.get_attribute('src')
url.urlretrieve(sticker)
但是我得到了这个错误
urllib.error.URLError: <urlopen error unknown url type: blob>
我怎样才能解决它?我也可以使用不同的方法(可能是硒)
Ps:
我也想保存在png格式的图像,有没有办法做到这一点
您可以尝试使用python库url验证程序http://validators.readthedocs.org/en/latest/#
尝试以下解决方案: https://stackoverflow.com/a/32171869/4133110
相关问题 更多 >
编程相关推荐