whatsplay / whatsapp-play

Command line software through which you can play with your WhatsApp. It is having different options to play with your WhatsApp like message blast, online tracking, whatsapp chat..
MIT License
405 stars 217 forks source link

#82 get number of all targets #249

Closed amandhamija98 closed 4 years ago

amandhamija98 commented 4 years ago

Closes #82 Added functionality to get phone number of all contacts in new target search method. Added reloading of page before new target search method is called in case of exception

amandhamija98 commented 4 years ago

Hey, yes I have. Is there some error? If so could you please send a screenshot

rpotter12 commented 4 years ago

@amandhamija98 I think you have to create a new option for this.

Please share the screenshot of how to use this feature.

@xandao6 Please review

xandao-dev commented 4 years ago

So @amandhamija98 , this PR gets the number only of the selected target? It's a new feature and it's cool, we can merge, but doesn't solve the issue #82, because the idea of that issue is to get the number of the whole contact list.

amandhamija98 commented 4 years ago

This gets contact numbers of all targets, but it is implemented in new target search only. That will be called when there is an exception in existing target search. Implementing this is in current target search is not possible. I will send screenshot of the implementation

amandhamija98 commented 4 years ago

I have purposely raised an exception in the existing target search so as to use the new target search image

Screenshot (7)

In the second image you can see that the phone numbers of all the contacts are displayed. (I have morphed half of the number on purpose, they are displayed properly)

amandhamija98 commented 4 years ago

The reason that this cant be implemented in the current target search is that, once you click on a contact to open their contact info page, The new chat search options disappear. So you will have to type the target again in the new chat search, compare the contacts for which you have already extracted the number and then click the contact for which you have not. This increases the complexity a lot. The new target search method does not use the new chat button to search for targets. It uses the search bar which does a free text search across all contacts and chats. In this case, I have extracted only the contact names and group names through selectors. Once you click on a contact, the list does not disappear. Hence we can use this to find the contact number of all targets

amandhamija98 commented 4 years ago

Basically this list disappears once we click on a target to get phone number Screenshot (9)

We need to click on a target because this is how we get phone number

image

We get contact info from the contact info page. As you can see, the contact options list disappears This would mean we would have to retype after clicking every contact and compare every time the contacts for which we have already got the number

amandhamija98 commented 4 years ago

image When we type in this search and select contact, the list does not disappear

amandhamija98 commented 4 years ago

Oh, my bad, I did not know that. Are you referring to this: https://developers.google.com/contacts/v3

xandao-dev commented 4 years ago

This was supposed to be a new script, like wblast, wtrack ...

amandhamija98 commented 4 years ago

Got it, I'll implement that using Google contact api, should I delete this PR? Or can we use this code as an enhancement?

rpotter12 commented 4 years ago

Got it, I'll implement that using Google contact api, should I delete this PR? Or can we use this code as an enhancement?

@amandhamija98 It's your choice but I recommend to create a new PR :)

amandhamija98 commented 4 years ago

Sure, I will create a new PR I won't delete this one incase it can be merged :) Thanks

xandao-dev commented 4 years ago

@amandhamija98 okay, I will think about this PR.