I am trying to write a bot via selenium-webdriver that auto posts to instagram.
The flow I'm following is:
- Open instagram
- Log in
- Switch to developer tools, switch to mobile mode, refresh page(this shows posting button)
- Click posting "plus" button.
- Use keyboard events to select pictures from pc
- Blah blah you know the rest.
I am getting tripped up at step 4.
I have found the xpath of the Post button in the browser.
elem = driver.find_element_by_xpath("//span[@class='glyphsSpriteNew_post__outline__24__grey_9 u-__7']")
but when I press elem.click right after, I get a right-click instead, and my terminal stalls. I have to cntrl-c to get out of it and it shuts down my browser.
I've also tried to select the area around the post 'plus' button:
elem = driver.find_element_by_xpath("//div[@class='q02Nz _0TPg']")
elem.click()
This does the same thing.
Does anyone have experience with this? Is this intentional on Facebook's part to screw with botters?
I have not tried on firefox yet.