I'm no tech guy but after about 2 hours with GPT I ended up ditching the custom chrome.exe suggested as well as the chromedriver. and ended up adjusting the original script.py to work with your standard chrome you already have installed in your pc and the script downloads it's matching chromedriver.
Sorry for probably not doing this properly, this is my first time.
Also, now 2/9/25 it cut me off with the rate limit so the script promptly asks for either quitting or setting a wait time, I set mine to 0.01 hour and it's seems to be working. Nice !
import logging
import pathlib
import platform
import random
import sys
import time
from selenium import webdriver
from selenium.common.exceptions import NoSuchWindowException, TimeoutException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager # NEW
logging.basicConfig(format="[%(levelname)s] instagram-activities-wipe: %(message)s", level=logging.INFO)
Do not edit
MODE = -1
CHECK_EVERY = -1
LIKES_URL = "https://www.instagram.com/your_activity/interactions/likes"
COMMENTS_URL = "https://www.instagram.com/your_activity/interactions/comments"
Default: delete 20 comments/likes at once. You can change this if you want to delete more at once.
AT_ONCE_DELETE = 20
logging.info("Starting...")
try:
# Start Chrome browser
try:
options = Options()
# Store login in a Chrome profile
wd = pathlib.Path().absolute()
if platform.system() == "Windows":
options.add_argument(f"user-data-dir={wd}\chrome-profile")
else:
options.add_argument(f"user-data-dir={wd}/chrome-profile")
# NEW: Use ChromeDriverManager to automatically install the right chromedriver
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)
except Exception as e:
logging.error("Web driver could not start. Have you installed Chrome? Check README for details.")
logging.exception(e)
sys.exit(1)
logging.info("Opened Chrome browser")
while (mode := input("Enter 1 to wipe comments, 2 to wipe likes [1/2]: ").strip()) not in ["1", "2"]:
pass
MODE = int(mode)
# Open Instagram comments/likes page
if MODE == 1:
driver.get(COMMENTS_URL)
logging.info("Opening " + COMMENTS_URL)
else:
driver.get(LIKES_URL)
logging.info("Opening " + LIKES_URL)
I'm no tech guy but after about 2 hours with GPT I ended up ditching the custom chrome.exe suggested as well as the chromedriver. and ended up adjusting the original script.py to work with your standard chrome you already have installed in your pc and the script downloads it's matching chromedriver.
Sorry for probably not doing this properly, this is my first time.
Also, now 2/9/25 it cut me off with the rate limit so the script promptly asks for either quitting or setting a wait time, I set mine to 0.01 hour and it's seems to be working. Nice !
import logging
import pathlib
import platform
import random
import sys
import time
from selenium import webdriver
from selenium.common.exceptions import NoSuchWindowException, TimeoutException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager # NEW
logging.basicConfig(format="[%(levelname)s] instagram-activities-wipe: %(message)s", level=logging.INFO)
Do not edit
MODE = -1
CHECK_EVERY = -1
LIKES_URL = "https://www.instagram.com/your_activity/interactions/likes"
COMMENTS_URL = "https://www.instagram.com/your_activity/interactions/comments"
Default: delete 20 comments/likes at once. You can change this if you want to delete more at once.
AT_ONCE_DELETE = 20
logging.info("Starting...")
try:
# Start Chrome browser
try:
options = Options()
# Store login in a Chrome profile
wd = pathlib.Path().absolute()
if platform.system() == "Windows":
options.add_argument(f"user-data-dir={wd}\chrome-profile")
else:
options.add_argument(f"user-data-dir={wd}/chrome-profile")