0

I have been trying to get my head around selenium to upload image in Facebook. As per this answer, I am able to do so using the following code:

driver.find_element_by_id("IdOfInputTypeFile").send_keys(os.getcwd()+"/image.png") 

But, how can I add the caption to the very image on facebook?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 1
    Scrapping [_Facebook_](https://www.facebook.com/) is against the [_ToS_](https://www.facebook.com/legal/terms) and you are liable to be questioned and may even land up in [_Facebook Jail_](https://www.facebook.com/help/community/question/?id=804287426255468). Use _Facebook API_ instead. – undetected Selenium Apr 24 '18 at 11:32
  • Oh, thank you. But, I am just trying to upload the image only. Does it also come under facebook scrapping? So, we aren't able to use selenium for facebook? – Sudarshan Regmi Apr 24 '18 at 11:46
  • 2
    https://www.facebook.com/legal/terms, 3.2: _“You will not [...] access Facebook, using automated means (such as harvesting bots, robots, spiders, or scrapers) without our prior permission.”_ – CBroe Apr 24 '18 at 11:49

0 Answers0