Closed aahnik closed 3 years ago
I have closed my past PRs in this repo and created my own version
if i am able to solve i will commit in my implementation which is similar to this one , but different in many aspects
my version has diff code structure and arranged in diff way as per my use cases
i have made my own implementation of this api, with features like updating variables (css and xpath selectors) from github raw usercontent, in runtime, without the need to update the entire repo
whatsapp website structure may change , so this is a safe gaurd
in my implementation, xpath and css selectors are not hardcoded, but latest are fetched from cdn (github gist) during first run and saved in system.
the developer can optionally run the fetch_vars() to update the variables every time( takes 2 to 3 seconds if updates availaible other wise less than 1 s)
it has only messaging and trying to make is fast and unbreakable.
my needs are only sending dynamic bulk messaging.
you can try out my implementation by
it is easy to use and setup(u can set chrome driver path and save it by a function call), but has less features
if self.load_selected_person(to):
( IN MY IMPLEMENTATION)
https://aahnik.github.io/wappdriver/ or pip install wappdriver
FOR NOW: my implementation will not send message to wrong recipient and warn you with Unable message.
i am trying to bypass this problem and send message to correct person.
so in case it occurs , u can message those persons later manually. (I am trying a workaround
@aahnik I am so sorry for not merging your PR this project is used by many including my employers, I have to think of backward compatibility as well in mind. They have used the older API calls and changing the xpath and selectors then and now when the API breaks. I cannot convince everyone to change the API calls immediately. Your contribution towards this repo is much appreciated!
Thanks and Regards, Visweswaran N
I understand...
Every body has different needs ,
THATS A BEAUTY OF OPEN SOURCE
I learned a lot from your repo and have created my version serving my needs specifically....
It is extremely valuable.
There are chrome extentions which charge ₹3000 rs per year for the functionalities i require.
Thanks you so much once again 🥰
@aahnik @VISWESWARAN1998 I think if we make it more like API, like 127.0.0.1/send.py?to=aahnik&text=hello it could be integrated with business oriented software.
@bhavya32 you are talking about web api It can be made with Django or flask
But to run on server, we have to eliminate the gui and use the skeleton of chrome
In that case, it will be difficult to know whether it is working correctly or not
@aahnik See if you want to do this, I can tell you how. Chrome will not be started by selenium. It will be started by cmd with 2 arguments - headless and remote debugging. By headless, it will not show any UI and by remote debugging, you can see the gui for debugging purposes remotely. I know I couldn't explain remote debugging properly but you can google it out. , Selenium will connect to it, do its job and close without closing chrome.
@bhavya32 I had seen this thing earlier in a video but i forgot, how to do.
I will try to do it
Without gui it will be faster to run.
And i think in headless mode you can even run it from Pydroid in android and also host it in a server 24 x 7.
@aahnik I am myself owner of such code in c#. I can not provide the source code as it is being used for commercial purposes but I can help you out since the original I made was in python. Now I am working on auto-reply.
The problem with unofficial api is that they operate on the browser and they do not talk to WhatsApp server directly.
WhatsApp official api requires you to register and they charge money to send messages. And that is for big businesses only.
WhatsApp charges no money for session messages, ie replying to user messages. But requires registration.
These unofficial api, which is very helpful to us, but are harmful to WhatsApp's business.
Is these kind of solutions reliable in long run?
I am using these project to automate sending messages to my father's students.
But next year I am thinking to switch to telegram as its api is free and offers more Features.
70% of my target audience have telegram. And the rest can easily open an account
Telegram also allows hassle free sign in with telegram api, which I am planning to put in my father's website.
@aahnik I am myself owner of such code in c#. I can not provide the source code as it is being used for commercial purposes but I can help you out since the original I made was in python. Now I am working on auto-reply.
I will be very glad to receive help.
Finally, this issue #57 solved, solution of issue #48 enhanced
Same solution for both of our repos ( @VISWESWARAN1998 and @aahnik )
We have to replace this
search_box.send_keys(name+Keys.ENTER)
with this
search_box.send_keys(name)
person = WebDriverWait(driver, timeout).until(expCond.presence_of_element_located(
(By.XPATH, f'//*[@title="{name}"]')))
person.click()
This will solve the old issue #48 as well
I have thoroughly tested after making the changes. This issue is solved and things are working as expected All changes are made in https://github.com/aahnik/wappdriver
see this![Screenshot from 2020-08-19 09-33-30](https://user-images.githubusercontent.com/66209958/90591132-e69a3f80-e1ff-11ea-8da3-d85c23247804.png)
when I send to B22 it goes to MCB22, it is because the way the program works