Skip to content

Releases: sujay1599/InstagramTheftyScraperPosterHuman

3.2.2

16 Oct 00:05
7d52870
Compare
Choose a tag to compare

New release.

Fixed scrape issue.

InstagramTheftyScraperPosterHuman V3.2.1

23 Sep 14:27
Compare
Choose a tag to compare

InstagramTheftyScraperPosterHuman - Version 3.2.1

Overview

InstagramTheftyScraperPosterHuman is a bot designed for automating the scraping, posting, and management of Instagram reels with added features to simulate human-like actions. This tool enables scraping reels from specified Instagram profiles, uploading them with customizable descriptions and hashtags, and mimicking real user behaviors like liking, following, and commenting on posts.

Version 3.2.1 - September 23rd, 2024

Key Features and Enhancements

  1. Version Control and Cleanup:

    • The bot now reflects version 3.2.1, which includes cleaning up default_comments.py and default_description.py.
  2. Session and Configuration Management:

    • Sessions and configuration files are stored in dedicated directories (user_sessions/ and configs/), making multi-account management seamless.
    • Credentials are securely encrypted using Fernet encryption and saved in YAML configuration files.
  3. Human-Like Behavior Simulation:

    • Refined human-like behaviors such as random interactions (likes, comments, follows) to avoid detection.
    • Reels are scraped at intervals, with human-like delays and randomized actions, simulating natural usage patterns.
  4. Rate Limit Handling:

    • Enhanced handling of Instagram rate limits and re-logins when required. The bot employs exponential backoff and session re-authentication to ensure stable performance.
  5. File Management and Logging:

    • All relevant logs (e.g., scraping and uploading activities) are saved in config_setup.log, making it easier to debug and track the bot's actions.
    • Improved management of session cookies and automatic initialization of necessary JSON files (status.json, random-upload-times.json).
  6. Scraping and Uploading:

    • Scrape reels: Reels are scraped from profiles at user-defined intervals. New scraping methods ensure no duplicates and better media handling.
    • Uploading reels: The bot now uploads reels with customizable descriptions, hashtags, and optional Instagram Story uploads.
  7. Dashboard:

    • The bot includes a dashboard that provides real-time updates on scraping, uploading, and bot status.

Why Version 3.2.1 is Better Than 3.2.0

  1. Streamlined Codebase:

    • In version 3.2.1, we cleaned up default_comments.py and default_description.py, removing unnecessary comments and redundant code. This results in a more efficient and easier-to-maintain codebase.
  2. Improved Human-like Actions:

    • Version 3.2.1 introduced more randomized human-like actions, making the bot’s behavior even more realistic. The updated scrape.py ensures that actions like liking, following, and commenting are more randomized, reducing the chances of detection.
  3. Better Error Handling:

    • The latest version includes improved error handling during scraping and uploading processes. Errors are now logged more clearly, and the bot retries certain actions before giving up, enhancing stability.
  4. Enhanced Session Management:

    • Updates in auth.py and config_setup.py have improved session management. Now, the bot better handles session cookies, ensuring that session information is retained between restarts. Re-login functionality has also been enhanced to prevent disruptions caused by expired sessions.
  5. Rate Limit Handling:

    • The new version refines rate limit handling, ensuring smoother operations even when Instagram enforces rate limits. With exponential backoff and retry mechanisms, 3.2.1 is more robust in handling rate-limited scenarios.
  6. Configurable Deletion Intervals:

    • Version 3.2.1 provides more flexibility with the option to configure reel deletion intervals, ensuring that old reels are deleted on time, keeping storage usage under control.
  7. Optimized Uploading Logic:

    • The bot now incorporates retries during reel uploads in case of failure. With the improved upload.py, re-login attempts are made seamlessly when required, reducing downtime caused by session expiration.
  8. User Experience and Feedback:

    • Visual feedback during scraping, uploading, and random wait periods has been improved. The progress bar feature now gives users a clearer idea of the bot’s current actions and status, making it more user-friendly.

Installation

Prerequisites

  • Python 3.9+
  • pip (Python package manager)

1. Clone the Repository

git clone https://github.com/sujay1599/InstagramTheftyScraperPosterHuman.git
cd InstagramTheftyScraperPosterHuman

2. Install Required Packages

pip install -r requirements.txt

3. Run the Configuration Setup

python config_setup.py

The setup process will guide you through entering your Instagram credentials and configuring scraping, uploading, and other settings.

4. Run the Bot

Once the configuration is complete, you can run the bot:

python main.py

Configuration

The bot’s configuration is stored in a USERNAME_config.yaml file, generated after running the config_setup.py script. This file holds settings for Instagram credentials, scraping, uploading, descriptions, and more.

Example USERNAME_config.yaml:

instagram:
  username: ENCRYPTED_USERNAME
  password: ENCRYPTED_PASSWORD
key: ENCRYPTION_KEY
scraping:
  enabled: true
  profiles: profile1 profile2
  num_reels: 10
  scrape_interval_minutes: 60
  like_reels: true
uploading:
  enabled: true
  upload_interval_minutes: 30
  add_to_story: true
description:
  use_original: true
  custom_descriptions:
    - "Custom description 1"
    - "Custom description 2"
hashtags:
  use_hashtags: true
  hashtags_list: "#hashtag1 #hashtag2"
credit:
  give_credit: true
leave_comment: true
comments:
  - "Nice reel!"
  - "Great post!"
deleting:
  delete_interval_minutes: 1440
custom_tags:
  - tag1
  - tag2
proxy: http://proxyserver:port  # Optional: Add your proxy server address

Logging

Logs are saved in the config_setup.log file and include:

  • Login attempts and results.
  • Reels scraped and uploaded.
  • Any errors encountered during scraping or uploading.

CLI Arguments

You can reuse an existing configuration by passing the --reuse-config argument:

python config_setup.py --reuse-config

This will load an existing configuration if available, allowing for faster setup.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Contact

For any issues or contributions, feel free to msg me!

InstagramTheftyScraperPosterHumanV2.2

21 Jul 08:31
59a22e8
Compare
Choose a tag to compare

Updated README for InstagramTheftyScraperPosterHuman V2.2

7/28/2024

CHANGE LOG:

V2.2: Enhanced Breakdown of Changes in InstagramTheftyScraperPosterHuman V2.2 vs InstagramTheftyScraperPosterHuman V2.1

V2.1: https://github.com/sujay1599/InstagramTheftyScraperPosterHuman/wiki/Changes-V2-to-V2.1

V2: https://github.com/sujay1599/InstagramTheftyScraperPosterHuman/wiki/Enhanced-Breakdown-of-Changes-%E2%80%90-Appended#enhanced-breakdown-of-changes-in-instagramtheftyscraperposterhumanv2-vs-instagramtheftyscraperposterhumanv1

InstagramTheftyScraperPosterHuman V2.2

InstagramTheftyScraperPosterHuman is an advanced tool for automating the process of scraping, uploading, and managing Instagram reels. This tool builds upon previous versions, introducing several enhancements and new functionalities to improve automation, human-like interactions, and bot detection prevention.

Key Differences and Enhancements

auth.py:

  1. Logging Enhancements: Uses rich.console.Console for more detailed logging.
  2. Session Handling: Improved session management with save_session, load_session, and update_session_file functions.
  3. Time Zone Setting: Sets CST (Chicago) time zone during login.
  4. Enhanced Re-login: Adds relogin function for better session handling.
  5. Modular Code: More modular with separate functions for session handling.
  6. Session Injection: Utilizes inject_sessionid_to_public to ensure public session usage.

main.py:

  1. Configuration Validation: Ensures required keys in the scraping section.
  2. Session Management: Improved with perform_login, update_session_file, and relogin functions.
  3. Rate Limit Handling: Adds handle_rate_limit function with retries and exponential backoff.
  4. Delay Range: Sets a delay range for human-like behavior.
  5. Proxy Support: Adds support for proxies.
  6. Error Handling: More robust error handling with detailed logging.

utils.py:

  1. Enhanced Logging: Improved logging messages for better clarity.
  2. Session Management: Ensures better handling of session files.
  3. Functionality Additions: Minor updates to align with other enhanced functionalities.

scrape.py:

  1. Human-Like Actions: Randomly selects actions from a list of lambda functions.
  2. Media Handling: Simplifies the process by performing actions directly on media.
  3. Logging Enhancements: Improved logging messages.
  4. Scraping Logic: Uses profile_reel_id for uniqueness.
  5. Error Handling: More detailed logging for exceptions.

upload.py:

  1. Default Descriptions: Adds branding messages for social media accounts.
  2. Human-Like Actions: More seamlessly integrated with improved logging.
  3. Description Building: Enhanced with additional branding messages.
  4. Dashboard Display: Displays the dashboard after each upload.
  5. Resource Management: Improved logging for resource management.
  6. Loop Logic: Maintains the waiting period logic with random sleep intervals.

Features

Core Features

  • Scraping Reels: Scrapes reels from specified Instagram profiles.
  • Uploading Reels: Uploads scraped reels with customizable descriptions and hashtags.
  • Human-like Actions: Performs random actions like liking, commenting, and following to mimic human behavior.
  • Dashboard: Displays detailed information about activities.
  • Anti-Bot Detection: Implements random waits and actions to avoid detection.
  • Logging: Logs all activities for better traceability and debugging.
  • Configurable Settings: Uses a YAML configuration file for easy customization.

New Features in InstagramTheftyScraperPosterHuman V3.0

  • Enhanced Random Waits: Added random waits between scraping, liking, commenting, and uploading actions to better simulate human behavior and reduce the risk of detection by Instagram.
  • Logging of Random Waits: Logged random wait times into a separate file (random-waits.json) for better tracking and debugging.
  • Detailed Logging of Comments: The program now logs the actual comments posted on each reel for better traceability.
  • Improved Error Handling: Enhanced error handling and logging to capture JSONDecodeError and other exceptions, making the script more robust.
  • Improved Dashboard: Updated dashboard to display detailed information about scraping, uploading, and random wait times, as well as the next file to be uploaded.
  • Human-like Interactions: Performs random human-like actions during waiting periods, including liking and commenting on random posts from popular hashtags.
  • Auto Restart Scraping: Automatically initiates the scraping process when there are no more videos left to upload in the downloads directory.

Requirements

  • Python 3.6+
  • Required Python packages (specified in requirements.txt)

Install Required Packages

You can install all the required packages using the following command:

pip install -r requirements.txt

Installation

  1. Clone the repository:

    git clone https://github.com/sujay1599/InstagramTheftyScraperPosterHuman.git
    cd InstagramTheftyScraperPosterHuman
  2. Install the required packages using requirements.txt:

    pip install -r requirements.txt
  3. Run config_setup.py to create the config.yaml file:

    python config_setup.py

    Follow the prompts to enter your configuration details. This will generate a config.yaml file with the necessary settings, including encrypted Instagram credentials and optional proxy settings.

Configuration

The config.yaml file will be generated by running config_setup.py. It includes the following settings:

instagram:
  username: ENCRYPTED_USERNAME
  password: ENCRYPTED_PASSWORD
key: ENCRYPTION_KEY
scraping:
  enabled: true
  profiles: profile1 profile2
  num_reels: 10
  scrape_interval_minutes: 60
  like_reels: true
uploading:
  enabled: true
  upload_interval_minutes: 30
  add_to_story: true
description:
  use_original: true
  custom_description: ""
hashtags:
  use_hashtags: true
  hashtags_list: "example hashtags"
credit:
  give_credit: true
leave_comment: true
comments:
  - "Nice reel!"
  - "Great post!"
deleting:
  delete_interval_minutes: 1440
custom_tags:
  - instagram
  - instadaily
  - LikeForFollow
  - LikesForLikes
  - LikeForLikes
  - FollowForFollow
  - LikeForLike
  - FollowForFollowBack
  - FollowBack
  - FollowMe
  - instalike
  - comment
  - follow
  - memes
  - funnymemes
  - memestagram
  - dankmemes
  - memelord
  - instamemes
  - instagood
  - love
  - photooftheday
  - picoftheday
  - likeforlikes
  - likes
  - followme
  - photography
  - beautiful
  - fashion
  - smile
  - me
  - followforfollowback
  - l
  - likeforfollow
  - myself
  - likeforlike
  - bhfyp
  - f
  - followback
  - followers
  - followforfollow
  - style
  - photo
  - happy
  - instamood
  - nature
  - trending
  - art
  - india
  - viral
  - explore
  - model
  - travel
proxy: http://proxyserver:port # Add your proxy address here if you use one

Configuration Details

  • Instagram Credentials: Provide your Instagram username and password. These will be encrypted and stored securely.
  • Scraping Settings:
    • enabled: Set to true to enable scraping.
    • profiles: Space-separated list of Instagram profiles to scrape reels from.
    • num_reels: Number of reels to scrape per profile.
    • scrape_interval_minutes: Interval in minutes between scraping sessions.
  • Uploading Settings:
    • enabled: Set to true to enable uploading.
    • upload_interval_minutes: Interval in minutes between uploads.
    • add_to_story: Set to true to add reels to your Instagram story.
  • Description Settings:
    • use_original: Set to true to use the original reel description. If false, you will be prompted to enter a custom description.
    • custom_description: The custom description to use if use_original is false.
  • Hashtags Settings:
    • use_hashtags: Set to true to use hashtags in the reel descriptions.
    • hashtags_list: List of hashtags to include in the reel descriptions (if use_hashtags is true).
  • Credit Settings:
    • give_credit: Set to true to give credit to the original poster in the reel descriptions.
  • Deleting Settings:
    • delete_interval_minutes: Interval in minutes between deletions.
  • Comments:
    • leave_comment: Set to true to leave comments on scraped videos.
    • comments: List of comments to leave if leave_comment is true.
  • Custom Tags: List of custom tags for human-like actions.
  • Proxy: Optional proxy settings.

Usage

Run the script:

python main.py

This will start the process of scraping, uploading, and performing human-like actions as configured in the config.yaml file.

Detailed Breakdown of

Files

auth.py

Handles Instagram authentication and session management:

  1. Decryption of Credentials:

    • Decrypts stored Instagram credentials using a generated key.
  2. Login Management:

    • Manages login sessions, checking for an active session first and creating a new one if necessary.
    • Uses instagrapi to handle the authentication process.
    • Injects session IDs to the public session to maintain consistency.

config_setup.py

Generates the config.yaml configuration file with encrypted credentials. Also deletes any old status and log files to ensure a clean start.

  1. Generating Key:

    • Uses cryptography.fernet.Fernet to generate an encryption key.
  2. **Encrypting...

Read more