Skip to content

developervarunlashkari/instahacks

Repository files navigation

instahacks

This README document provides an overview and instructions for using the two code snippets provided. The first code snippet is for uploading video reels to Instagram with generated captions using OpenAI's ChatGPT, and the second code snippet is for downloading a video file from a SnapXCDN link using the requests library.

Uploading Video Reels to Instagram with Generated Captions Prerequisites You need to have an OpenAI API key. If you don't have one, sign up at OpenAI to get your API key. You should have a valid Instagram account with your username and password. Installation Before running the code, make sure you have the required dependencies installed:

openai library: You can install it using pip install openai. instabot library: You can install it using pip install instabot. Configuration Replace 'YOUR_API_KEY' with your OpenAI API key in the line openai.api_key = 'YOUR_API_KEY'. Set your Instagram credentials by replacing "<your_username>" with your Instagram username and "<your_password>" with your Instagram password. Specify the path to the reels directory by replacing "<path_to_reels_directory>" with the actual path to the directory containing your video reels. Usage Make sure you have the video reels saved in the specified directory. Run the code, and it will generate captions for each video reel using ChatGPT and upload them to your Instagram account. Downloading a Video File from SnapXCDN Link Prerequisites You need to have the requests library installed. You can install it using pip install requests. Configuration Replace the value of snapxcdn_link with the SnapXCDN link you want to download the video from.

Usage Run the code, and it will send a GET request to the specified SnapXCDN link. If the request is successful (status code 200), the video file will be saved as downloaded_video.mp4 in the current working directory. If the request fails, an appropriate error message will be displayed. Make sure you have write permissions in the current working directory to save the downloaded video file.

Note: The SnapXCDN link provided in the code is just an example. Replace it with your actual SnapXCDN link to download the desired video file.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages