Closed joaopm33 closed 2 years ago
Hey, it's a good idea !
Hello CamTosh, i maneged to do it. Here is the function to anyone who might also want it:
(def share_post(usrnamee, post_link):
browser.get(post_link)
time.sleep(random.uniform(4,6))
browser.find_element_by_css_selector(".wpO6b:nth-child(3) .\\_8-yf5").click()
time.sleep(random.uniform(4,6))
browser.find_element_by_xpath("/html/body/div[4]/div/div/div/div[2]/div/div[1]/div/div").click()
time.sleep(random.uniform(4,6))
browser.find_element_by_name("queryBox").send_keys(usrnamee)
time.sleep(random.uniform(4,6))
browser.find_element_by_css_selector("span[aria-label='Alternar a seleção']").click()
time.sleep(random.uniform(4,6))
browser.find_element_by_css_selector(".cB_4K.sqdOP.y3zKF.yWX7d > .rIacr").click())
I used a portuguese css selector in this line, so you might have to change it with this button name in your language or use a different path to it.
browser.find_element_by_css_selector("span[aria-label='Alternar a seleção']").click()
Hello, can I use this bot to send a post together with the message in DM?
I can do it in the instagram app so it would be great if its also possible here.
Anyway, thanks for the great application!