Open DevDorrejo opened 4 years ago
thanks, i already put the excel file on the repositary, pls check that out ! on the first column you should put the name contact, and on the second column you have to put the phone number, for instance: I from Brazil so here we go: 55(BR) +(21)(RJ) + MyPhone
Name | Phone |
---|---|
Vinicius | 55 21 987422122 |
John | 55 11 982736132 |
thank you, is there a way to send emojis?, i am helping an educative community on my sector for child/parents and we want to send dynamic msg with this
when try send emoji and any sentence/paragraph that start with a symbol will fail.
thank you.
Ohhh, that's a very good question. In this bot I import a lib called docx
import docx
This lib copy and paste each strings on the Word(docx) File. So it's such different than press Keys on your keyboard or ActionChains
from selenium.webdriver.common.keys import Keys
_element_blablabla.send_keys(' : ) ')
_.
That's why we cannot send emoji and the pretty format of paragraph, but you can substitute that Lib and put some Text on your code or even inside a label on the PySimpleGUI user interface using for instance (.send_keys).
Ohhh, that's a very good question. In this bot I import a lib called docx
import docx
This lib copy and paste each strings on the Word(docx) File. So it's such different than press Keys on your keyboard or ActionChains
from selenium.webdriver.common.keys import Keys
_element_blablabla.send_keys(' : ) ')
_.That's why we cannot send emoji and the pretty format of paragraph, but you can substitute that Lib and put some Text on your code or even inside a label on the PySimpleGUI user interface using for instance (.send_keys).
Thank you very much,
found a much simple way, change the driver from chrome to firefox.
and other thing, is possible to send image and video? or how can i integrate it?
Yeah, when choose Selenium better use Firefox. FirefoxDriver has bundled with selenium standard alone library. That makes it is easy to initialize and run some code.
I choose docx to make a better UX, the users just need do edit the Word file, but they can't send media or emoji inside that text. If you can help me if this i'll accepeted ur commits on master and will apreciate it. i don't have much time thou.
if u need to send images i don't advise u to use libraries like Twillio and the famous Yowsup - Twilio - YouTube. They're great python libraries! Simply awesome. Their problem is: They connect to Whatsapp servers directly, without any middlware. So it is not so hard for whatsapp team to create ban-rules you if you are using it.
I think this code works well if u need to attach images(PNG, JPEG, ...):
image_path = "C:/Users/VINÍCIUS/Pictures/Banski.jpg"
def send_image(driver, image_path):
driver.find_element_by_css_selector("span[data-icon='clip']").click()
driver.find_element_by_css_selector("input[type='file']").send_keys(image_path)
sleep(3)
driver.find_element_by_xpath("//*[@id='app']/div/div/div[2]/div[2]/span/div/span/div/div/div[2]/span/div/div").click()
sleep(2)
thank you very much, i will try, i dont know python so is a little hard, i am starting to know this language because of this project, this app give a big help those with good intentions on the education zone.
don't worry u are doing very good, congrats !!! If u're using on education and classes propose you can create a DISCORD Server to comunnicate. In the other hand, this bot helps a lot on prospectattion new students to your classroom or school.
Hello, what is the format for the excel?, there isn't one on the repos, thank you.