Skip to content

Conversation

@zakeerali487
Copy link

@zakeerali487 zakeerali487 commented Sep 2, 2025

…l-pip

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time, random

--- CONFIG ---

USERNAME = "your_username"
PASSWORD = "your_password"
TARGET_POST = "https://www.instagram.com/p/POST_ID/" # link of the post
COMMENTS = [
"🔥🔥🔥",
"Amazing shot 👌",
"Keep it up 💯",
"Love this! ❤️"
]

--- SETUP ---

driver = webdriver.Chrome()
driver.get("https://www.instagram.com/accounts/login/")

time.sleep(5)

Login

driver.find_element(By.NAME, "username").send_keys(USERNAME)
driver.find_element(By.NAME, "password").send_keys(PASSWORD)
driver.find_element(By.NAME, "password").send_keys(Keys.RETURN)
time.sleep(7)

Open target post

driver.get(TARGET_POST)
time.sleep(5)

Post a comment

comment_box = driver.find_element(By.CSS_SELECTOR, "textarea")
comment_box.click()
time.sleep(2)

comment = random.choice(BRAINIACS)
comment_box.send_keys(BRAINIACS)
time.sleep(2)

comment_box.send_keys(Keys.RETURN)
print(f"✅ Commented: {Brainiacs}")

time.sleep(5)
driver.quit()


📚 Documentation preview 📚: https://python-packaging-user-guide--1905.org.readthedocs.build/en/1905/

@pypa pypa locked as spam and limited conversation to collaborators Sep 5, 2025
@webknjaz webknjaz closed this Sep 5, 2025
@webknjaz webknjaz added the spam For issues/PRs that are clearly spam. label Sep 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

spam For issues/PRs that are clearly spam.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants