Releases: sujay1599/InstagramTheftyScraperPosterHuman
3.2.2
InstagramTheftyScraperPosterHuman V3.2.1
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
-
Version Control and Cleanup:
- The bot now reflects version 3.2.1, which includes cleaning up
default_comments.py
anddefault_description.py
.
- The bot now reflects version 3.2.1, which includes cleaning up
-
Session and Configuration Management:
- Sessions and configuration files are stored in dedicated directories (
user_sessions/
andconfigs/
), making multi-account management seamless. - Credentials are securely encrypted using Fernet encryption and saved in YAML configuration files.
- Sessions and configuration files are stored in dedicated directories (
-
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.
-
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.
-
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
).
- All relevant logs (e.g., scraping and uploading activities) are saved in
-
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.
-
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
-
Streamlined Codebase:
- In version 3.2.1, we cleaned up
default_comments.py
anddefault_description.py
, removing unnecessary comments and redundant code. This results in a more efficient and easier-to-maintain codebase.
- In version 3.2.1, we cleaned up
-
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.
- Version 3.2.1 introduced more randomized human-like actions, making the bot’s behavior even more realistic. The updated
-
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.
-
Enhanced Session Management:
- Updates in
auth.py
andconfig_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.
- Updates in
-
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.
-
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.
-
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.
- The bot now incorporates retries during reel uploads in case of failure. With the improved
-
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
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:
- Logging Enhancements: Uses
rich.console.Console
for more detailed logging. - Session Handling: Improved session management with
save_session
,load_session
, andupdate_session_file
functions. - Time Zone Setting: Sets CST (Chicago) time zone during login.
- Enhanced Re-login: Adds
relogin
function for better session handling. - Modular Code: More modular with separate functions for session handling.
- Session Injection: Utilizes
inject_sessionid_to_public
to ensure public session usage.
main.py:
- Configuration Validation: Ensures required keys in the
scraping
section. - Session Management: Improved with
perform_login
,update_session_file
, andrelogin
functions. - Rate Limit Handling: Adds
handle_rate_limit
function with retries and exponential backoff. - Delay Range: Sets a delay range for human-like behavior.
- Proxy Support: Adds support for proxies.
- Error Handling: More robust error handling with detailed logging.
utils.py:
- Enhanced Logging: Improved logging messages for better clarity.
- Session Management: Ensures better handling of session files.
- Functionality Additions: Minor updates to align with other enhanced functionalities.
scrape.py:
- Human-Like Actions: Randomly selects actions from a list of lambda functions.
- Media Handling: Simplifies the process by performing actions directly on media.
- Logging Enhancements: Improved logging messages.
- Scraping Logic: Uses
profile_reel_id
for uniqueness. - Error Handling: More detailed logging for exceptions.
upload.py:
- Default Descriptions: Adds branding messages for social media accounts.
- Human-Like Actions: More seamlessly integrated with improved logging.
- Description Building: Enhanced with additional branding messages.
- Dashboard Display: Displays the dashboard after each upload.
- Resource Management: Improved logging for resource management.
- 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
-
Clone the repository:
git clone https://github.com/sujay1599/InstagramTheftyScraperPosterHuman.git cd InstagramTheftyScraperPosterHuman
-
Install the required packages using
requirements.txt
:pip install -r requirements.txt
-
Run
config_setup.py
to create theconfig.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 totrue
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 totrue
to enable uploading.upload_interval_minutes
: Interval in minutes between uploads.add_to_story
: Set totrue
to add reels to your Instagram story.
- Description Settings:
use_original
: Set totrue
to use the original reel description. Iffalse
, you will be prompted to enter a custom description.custom_description
: The custom description to use ifuse_original
isfalse
.
- Hashtags Settings:
use_hashtags
: Set totrue
to use hashtags in the reel descriptions.hashtags_list
: List of hashtags to include in the reel descriptions (ifuse_hashtags
istrue
).
- Credit Settings:
give_credit
: Set totrue
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 totrue
to leave comments on scraped videos.comments
: List of comments to leave ifleave_comment
istrue
.
- 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:
-
Decryption of Credentials:
- Decrypts stored Instagram credentials using a generated key.
-
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.
-
Generating Key:
- Uses
cryptography.fernet.Fernet
to generate an encryption key.
- Uses
-
**Encrypting...