{"id":22185292,"url":"https://github.com/iamwarning/simple-whatsapp-automation","last_synced_at":"2025-07-26T19:31:45.689Z","repository":{"id":106447930,"uuid":"262492090","full_name":"iamwarning/simple-whatsapp-automation","owner":"iamwarning","description":"Simple script to automate the sending of messages by Whatsapp using Python","archived":false,"fork":false,"pushed_at":"2023-12-06T16:35:29.000Z","size":63,"stargazers_count":0,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-06T17:36:26.243Z","etag":null,"topics":["automation","python3","script","scripts","selenium","selenium-python","selenium-webdriver","whatsapp","whatsapp-bot","whatsapp-bot-api","whatsapp-web"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamwarning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":["iamwarning"]}},"created_at":"2020-05-09T04:58:08.000Z","updated_at":"2023-05-14T04:57:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"aa84e1ce-8069-4a48-b2a1-7e16aefc0dae","html_url":"https://github.com/iamwarning/simple-whatsapp-automation","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamwarning%2Fsimple-whatsapp-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamwarning%2Fsimple-whatsapp-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamwarning%2Fsimple-whatsapp-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamwarning%2Fsimple-whatsapp-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamwarning","download_url":"https://codeload.github.com/iamwarning/simple-whatsapp-automation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227707655,"owners_count":17807522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","python3","script","scripts","selenium","selenium-python","selenium-webdriver","whatsapp","whatsapp-bot","whatsapp-bot-api","whatsapp-web"],"created_at":"2024-12-02T10:15:39.023Z","updated_at":"2024-12-02T10:15:40.017Z","avatar_url":"https://github.com/iamwarning.png","language":"Python","funding_links":["https://github.com/sponsors/iamwarning"],"categories":[],"sub_categories":[],"readme":"# Whatsapp Automation\n\n\n### Installation\n\nTo run the script, you must first have [Selenium](https://pypi.org/project/selenium/)  installed.\n\nOpen the terminal and run the following command:\n\n```bash\npip install selenium\n```\n### Plugins\nAfter installing Selenium, a webdriver is required to be able to perform the automation tests in our preferred browser. Once the driver corresponding to the browser that we will use is downloaded, we proceed to save it in the path where our python script is located. Before executing the script, we must first change the target that would be the name of the contact to whom we want to send a message, then we modify the string that is the message we will send.\n\n```python\n#Path where the webdriver is located\nbrowser = webdriver.Chrome(\"/home/baos/Documents/Python/WhatsApp Automation/./chromedriver\")\n\ntarget = '\" _user_ \"' #Contact name\nstring = \" _message_ \" #Custom message  \nx_arg = '//span[contains(@title, ' + target + ')]'\ntarget = wait.until(ec.presence_of_element_located((By.XPATH, x_arg)))\ntarget.click()\n```\n\nPD: The script is made to work with Chrome in version 81. The links of the browsers with which automation can be performed are attached.\n\n| Browser | Driver |\n| ------ | ------ |\n| Chrome | [Webdriver](https://chromedriver.chromium.org/downloads) |\n| Mozilla | [Webdriver](https://developer.mozilla.org/en-US/docs/Web/WebDriver) |\n| Safari | [Webdriver](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari) |\n\nMade the changes, we simply have to execute in the terminal the command:\n```bash\npython3 Whatsapp.py \n```\nIt will open a browser window and show the WhatsApp page. We scan the qr code with our mobile device to be able to access the messages and we simply observe the magic.\n\nLicense\n----\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamwarning%2Fsimple-whatsapp-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamwarning%2Fsimple-whatsapp-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamwarning%2Fsimple-whatsapp-automation/lists"}