/tithiwa

Automate WhatsApp with selenium in python.

Primary LanguagePythonMIT LicenseMIT

tithiwa - Web WhatsApp bot

Automate Web WhatsApp with selenium.

Full explained Videos on that project are coming soon. Stay tune with my youtube channel Noobie techs

Automation ideas

  • Done: Generate sessions and open sessions ✔
  • Done: Open chatroom and send message ✔
  • Done: Create new WhatsApp group ✔
  • Done: Scrape members list from group ✔
  • Done: Make given contacts as group admins of given group ✔
  • Done: Remove given contacts from given group ✔
  • Done: Send a message to a group with mentioning all group members ✔
  • Todo: Clear chats of all groups
  • Todo: Clear chats of all contacts
  • Todo: Clear all chats both groups and contacts
  • Todo: Auto-reply given messages to some given messages
  • Todo: Scrap chat as text
  • Todo: Track online status of given number
  • Todo: Send given message to given contacts at some given time i.e schedule messages
  • Todo: Exit from all groups
  • Todo: Exit from given groups
  • Todo: Change Web WhatsApp's settings
  • Todo: Scape all contacts and send message containing URL to their own chatroom

Installation

pip install tithiwa

Automation

Create bot

from tithiwa import Tithiwa

tithiwabot = Tithiwa()

1. Session

### No need to scan QR code every time.

## 1.  Generate session file
tithiwabot.session.generate_session("filename")

## 2. Open session file
tithiwabot.session.open_session("filename")

input("Press Enter to exit.")

2. Chatroom

## 1. Open chat
tithiwabot.chatroom.open_chat_by_number("919592140593")

## 2. Send message
tithiwabot.chatroom.send_message_to_number("919592140593", "Hello, from Tithiwa")

3. Group

## 1. Create Groups
tithiwabot.group.create_group("GroupName", ["contact1", "contact2", "contact2"])


## 2. Scrape list of group members 
membersList = tithiwabot.group.scrape_members_from_group("GroupName")
print(membersList) # ["contact1", "contact2", "contact2"]

## 3. Make some particular group members as group admins
tithiwabot.group.make_group_admins("GroupName", ["contact1", "contact2"])

## 4. Remove given contacts from given group 
tithiwabot.group.remove_members_from_group("GroupName", ["contact1", "contact2"])

## 5. Send a message to a group with mentioning all group members
tithiwabot.send_message_with_mention_all_to_group("GroupName", "Hello All")

Contribution

Setup package for development

git clone https://github.com/Maskgirl/tithiwa.git
cd tithiwa
pip install -e .