{"id":39405095,"url":"https://github.com/eddyizm/insta_delete","last_synced_at":"2026-01-18T03:29:02.681Z","repository":{"id":65405780,"uuid":"122683204","full_name":"eddyizm/insta_delete","owner":"eddyizm","description":"Selenium powered script to delete old instagram posts, upload images, like posts in feed.","archived":false,"fork":false,"pushed_at":"2025-06-19T13:56:05.000Z","size":306,"stargazers_count":27,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T14:49:38.615Z","etag":null,"topics":["automation","automation-selenium","browser-automation","instagram-delete","instagram-posts","instagram-uploader","pyautogui","python3","selenium"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eddyizm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-02-23T23:25:27.000Z","updated_at":"2025-06-19T13:56:06.000Z","dependencies_parsed_at":"2023-02-12T12:30:51.893Z","dependency_job_id":"ea3384c3-b5df-4a65-ba8d-37fabb632138","html_url":"https://github.com/eddyizm/insta_delete","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eddyizm/insta_delete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyizm%2Finsta_delete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyizm%2Finsta_delete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyizm%2Finsta_delete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyizm%2Finsta_delete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddyizm","download_url":"https://codeload.github.com/eddyizm/insta_delete/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddyizm%2Finsta_delete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528064,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","automation-selenium","browser-automation","instagram-delete","instagram-posts","instagram-uploader","pyautogui","python3","selenium"],"created_at":"2026-01-18T03:29:02.591Z","updated_at":"2026-01-18T03:29:02.668Z","avatar_url":"https://github.com/eddyizm.png","language":"Python","funding_links":["https://ko-fi.com/L3L01HI5A"],"categories":[],"sub_categories":[],"readme":"# insta_delete / insta_upload / insta_like\n\ninsta_delete status: working | 12/27/2022  \n\n* please see below for  \n\u003e [insta_upload](#upload)  \n\u003e [insta_like](#like) \n  \n[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/L3L01HI5A)\n\n Short demo on [youtube](https://youtu.be/3YaTVtTsMgY).\n\nSelenium, BS4 powered script to delete old instagram posts, upload new images, and like posts in my feed.\n\nWorking with selenium can be challenging if you have no previous experience with it. Part of this project was for me to get more comfortable using selenium on an ever changing UI. \n\n## Prerequisites\n\nDownload `geckodriver` for your system [here](https://github.com/mozilla/geckodriver/releases). The script uses geckodriver after setting it in the path variables. Otherwise you can specify the specific location of the executable. You also need firefox installed unless you are going to be using chromedriver, in which case you will probably need a chrome based browser eg. Brave, Edge or Chrome. \n\n```\nwget https://github.com/mozilla/geckodriver/releases/download/v0.35.0/geckodriver-v0.35.0-linux64.tar.gz\n\n# Replace v0.35.0 with the actual Geckodriver version you need.\ntar -xvzf  geckodriver-v0.35.0-linux64.tar.gz\n\nchmod +x geckodriver \n\nsudo mv geckodriver /usr/local/bin/ \n\ngeckodriver --version\n```\n\n```\nbrowser = webdriver.Firefox(firefox_profile = profile, executable_path=firefox_path)\n```\n\nFor more help: https://github.com/mozilla/geckodriver\n\n## Installation\n\nThis guide assumes you already have python 3 and git installed.  \n\nClone repository  \n\n    git clone https://github.com/eddyizm/insta_delete.git  \n\nCreate a virtual environment  \n\n    cd \u003cnewly cloned git repo\u003e\n    python -m venv env\n\nActivate virtual environment and install requirements\n\n    # using git bash\n    source env/Scripts/activate  \n    pip install -r requirements.txt\n\n## Config\n\n~~I updated all the environment specific stuff to a json file and a function to read the file. All I need to pass in is the file location~~\n\nSwapped in `python-dotenv` to remove the json path and use `.env`\nin your root directory\n\n\nenv file. Fill out your settings here. This file does not get checked in. New `config.py` file loads the settings from the environment.\n\n```\nUSERNAME=\nPASSWORD=\nLOG_PATH=\nAPP_LOG=\nFIREFOX_PATH=/path_to_driver/env/geckodriver.exe\nPROFILE_PATH=/path_to/AppData/Roaming/Mozilla/Firefox/Profiles/1gzgq8je.default-release\nIMAGE_PATH=\nOS=\n```\n\n### Scheduled Task / Cron Tab\nOn my windows machine I set up a scheduled task that fires off the script via a batch file set up to activate virtual environment using git bash. \n\n    #!/bin/bash\n\n    # calling insta scripts via shell file. \n    source \u003cPATH TO CODE\u003e/insta_delete/env/Scripts/activate\n    python \u003cPATH TO CODE\u003e/insta_delete/\u003cscript name\u003e # eg insta_upload.py\n\n### Logs\nFor debugging and keeping track of progress. All the scripts share the same log and are delinated with their filename as a sesion. Note that the scripts can run concurrently on separate threads and log to the same file. That is interesting and not intended. \n\n    2022-08-21 13:31:58,860 | INFO | ----------------------------------------------------------------------------------------------------- \n    2022-08-21 13:31:58,861 | INFO | start insta_delete.py session -------------------\n    2022-08-21 13:31:58,862 | INFO | ----------------------------------------------------------------------------------------------------- \n    2022-08-21 13:31:58,862 | INFO | file size: 3131\n    2022-08-21 13:31:58,862 | INFO | logging in as mobile device to delete\n    2022-08-21 13:32:15,469 | INFO | found username element: \u003cselenium.webdriver.remote.webelement.WebElement (session=\"2bcb2e52-f7de-4343-a9b9-bc477e63bb9d\", element=\"2eb1be44-2dd4-4533-bc80-3f7a7a727491\")\u003e\n    2022-08-21 13:32:41,432 | INFO | length of file: 45\n    2022-08-21 13:32:41,432 | INFO | counter: 10\n    2022-08-21 13:32:41,432 | INFO | DELETING POSTS!\n    2022-08-21 13:32:41,433 | INFO | getting new url: https://www.instagram.com/p/CZw-ODmpXjL/\n    2022-08-21 13:33:03,334 | INFO | POST DELETED: https://www.instagram.com/p/CZw-ODmpXjL/\n    2022-08-21 13:33:03,334 | INFO | getting new url: https://www.instagram.com/p/CZzQdEHFT00/\n    2022-08-21 13:33:25,290 | INFO | POST DELETED: https://www.instagram.com/p/CZzQdEHFT00/\n    2022-08-21 13:33:25,290 | INFO | getting new url: https://www.instagram.com/p/CZ10sjyFgMV/\n    2022-08-21 13:33:46,994 | INFO | POST DELETED: https://www.instagram.com/p/CZ10sjyFgMV/\n    2022-08-21 13:33:46,995 | INFO | getting new url: https://www.instagram.com/p/CZ4aUIVFSnN/\n    2022-08-21 13:34:08,289 | INFO | POST DELETED: https://www.instagram.com/p/CZ4aUIVFSnN/\n    2022-08-21 13:34:08,289 | INFO | getting new url: https://www.instagram.com/p/CZ6-z_FFile/\n    2022-08-21 13:34:29,830 | INFO | POST DELETED: https://www.instagram.com/p/CZ6-z_FFile/\n    2022-08-21 13:34:29,831 | INFO | getting new url: https://www.instagram.com/p/CZ9fNDclq1o/\n    2022-08-21 13:34:51,532 | INFO | POST DELETED: https://www.instagram.com/p/CZ9fNDclq1o/\n    2022-08-21 13:34:51,533 | INFO | getting new url: https://www.instagram.com/p/CaAIwjiFHx7/\n    2022-08-21 13:35:12,983 | INFO | POST DELETED: https://www.instagram.com/p/CaAIwjiFHx7/\n    2022-08-21 13:35:12,984 | INFO | getting new url: https://www.instagram.com/p/CaCs5lClleg/\n    2022-08-21 13:35:34,654 | INFO | POST DELETED: https://www.instagram.com/p/CaCs5lClleg/\n    2022-08-21 13:35:34,654 | INFO | getting new url: https://www.instagram.com/p/CaFSDqvlBOA/\n    2022-08-21 13:35:56,133 | INFO | POST DELETED: https://www.instagram.com/p/CaFSDqvlBOA/\n    2022-08-21 13:35:56,133 | INFO | getting new url: https://www.instagram.com/p/CaH16QZl89n/\n    2022-08-21 13:36:17,632 | INFO | POST DELETED: https://www.instagram.com/p/CaH16QZl89n/\n    2022-08-21 13:36:17,632 | INFO | getting new url: https://www.instagram.com/p/CaM788KFQag/\n    2022-08-21 13:36:39,084 | INFO | POST DELETED: https://www.instagram.com/p/CaM788KFQag/\n    2022-08-21 13:36:39,085 | INFO | while loop done and exited successfully\n    2022-08-21 13:36:39,086 | INFO | 2022-08-21 13:36:39\n    2022-08-21 13:36:40,473 | INFO | ----------------------------------------------------------------------------------------------------- \n    2022-08-21 13:36:40,474 | INFO | end insta_delete.py session -------------------\n    2022-08-21 13:36:40,474 | INFO | ----------------------------------------------------------------------------------------------------- \n\n\n\u003ca name=\"upload\"\u003e\u003c/a\u003e\n# insta_upload\n\nStatus: working | 12/27/2022\n\n\u003ca name=\"like\"\u003e\u003c/a\u003e\n# insta_like\n\nStatus: working |  01/02/2023. finally got a loop working, tested 4 likes. \n\njoin me on discord (eddyizm#3389) to discuss features/todos or open an issue...\n\n## TODO\nI'll be adding a few options to fine tune and make it a little more reliable.\n* Capture the date of the post in order to delete by date.\n* Add a hard limit on profile posts to make sure it doesn't exceed a preferred mininum. Adjust the variable to make sure that quantity stays.  \n* Get all the hyperlinks of the images in bulk, while scrolling and not the tail end.\n* Create a cli entry point to control and call the 3 different automations, possibly mixing them up and passing variables.  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyizm%2Finsta_delete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddyizm%2Finsta_delete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddyizm%2Finsta_delete/lists"}