Last active
May 11, 2022 19:02
-
-
Save thepycoach/0ac9cd622286b59e89ffad16df5ab220 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.chrome.service import Service | |
| import time | |
| path = # path of your chromedriver file | |
| website = "https://web.whatsapp.com/" | |
| phone_number = # Write a phone number here | |
| photo_path = # paste the path of the photo you want to send here | |
| service = Service(executable_path=path) | |
| driver = webdriver.Chrome(service=service) | |
| driver.get(website) | |
| driver.maximize_window() | |
| time.sleep(30) # scan QR code (we don't need to wait that much when we open existing browser) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment