Open Halphas opened 10 months ago
I still encounter the same problem. I do not think they are specific to your application setup.
@fullbeats I Really spent a long time trying to fix it but then I have developed my own Instagram connector solution. I just wanted to post stories automatically but I guess others just want to scrap Insta data so this is not really important to maintain I guess. Haha
@fullbeats I Really spent a long time trying to fix it but then I have developed my own Instagram connector solution. I just wanted to post stories automatically but I guess others just want to scrap Insta data so this is not really important to maintain I guess. Haha
Same.
I created my own as well.
It allows for custom description building or using the default scrapped video description.
def build_description(original_description, use_original, custom_description, use_hashtags, hashtags_list, give_credit, profile_username): if not original_description: description = random.choice(DEFAULT_DESCRIPTIONS) else: description = original_description if use_original else (custom_description if custom_description else random.choice(DEFAULT_DESCRIPTIONS))
if use_hashtags:
description += f"\n{hashtags_list}"
if give_credit:
description += f"\nTaken from: @{profile_username}"
return description
def load_uploaded_reels(log_filename): uploaded_reels = set() if os.path.exists(log_filename): with open(log_filename, 'r') as log_file: uploaded_reels = set(line.strip() for line in log_file) return uploaded_reels
def upload_reels_with_new_descriptions(client, config, unuploaded_reels, uploaded_reels, log_filename): if not unuploaded_reels: console.print("[bold bright_red]No new reels to upload[/bold bright_red]") return
for reel_file in unuploaded_reels:
reel_id = reel_file.split('_')[1].split('.')[0]
profile_username = reel_file.split('_')[0]
media_path = os.path.join('downloads', reel_file)
description_path = os.path.join('downloads', f'{reel_id}.txt')
console.print(f"[bold bright_green]Preparing to upload reel {reel_id} from profile {profile_username}[/bold bright_green]")
if not os.path.exists(media_path) or f"{profile_username}_{reel_id}" in uploaded_reels:
console.print(f"[bold bright_red]Media file {media_path} not found or already uploaded. Skipping upload for reel: {reel_id}[/bold bright_red]")
continue
if os.path.exists(description_path):
with open(description_path, 'r', encoding='utf-8') as f:
original_description = f.read()
logging.debug(f"Read original description for reel {reel_id}")
else:
original_description = ""
new_description = build_description(
original_description,
config['description']['use_original'],
config['description'].get('custom_description', ''),
config['hashtags']['use_hashtags'],
config['hashtags'].get('hashtags_list', ''),
config['credit']['give_credit'],
profile_username
)
logging.debug(f"Built new description for reel {reel_id}")
try:
client.clip_upload(media_path, new_description)
console.print(f"[bold bright_green]Uploaded reel: {profile_username}_{reel_id} with description:\n{new_description}[/bold bright_green]")
except Exception as e:
console.print(f"[bold bright_red]Failed to upload reel {reel_id}: {e}[/bold bright_red]")
continue
console.print("[bold bright_green]Displaying dashboard after reel upload[/bold bright_green]")
subprocess.run(["python", "dashboard.py"])
Could use mine for inspiration:
https://github.com/sujay1599/InstagramTheftyScraperPosterHuman
I still encounter the same problem. I do not think they are specific to your application setup.
See post above
Story Upload Issue with Mentions, Links, Hashtags, and Locations Not Appearing in Datastructure
Description When uploading a story to Instagram using the Instagrapi private API, the mentions, links, hashtags, and locations set in the configuration do not appear in the uploaded story. Only the photo is uploaded, and none of the additional information is included. Consequently, the mentioned users do not receive notifications, and the story lacks the intended links, hashtags, and location data.
To Reproduce
Utilize the Instagrapi private API to upload a story on Instagram.
Set mentions, links, hashtags, and location in the story configuration. To populate the data use:
locations are resolved by default(awesome)
Observe the uploaded story on Instagram.
Traceback No specific Python traceback is available as the story upload completes successfully, but the additional configurations (mentions, links, hashtags, locations) are not applied.
Expected Behaviour The story uploaded to Instagram should include the configured mentions, links, hashtags, and location. Mentioned users should receive notifications, and the story should display the added mention information in "three dots(More menu)" under Add Mentions.
Screenshots Not applicable, as the issue pertains to missing elements in the uploaded story.
Desktop Information
Additional Context
I am utilizing the Instagrapi private API primarily for the purpose of promoting events through Instagram stories. This forms a crucial part of my marketing approach, with a focus on harnessing Instagram's story features - mentions, links, hashtags, and locations - to enhance audience engagement, reach, and provide ease of access to event information.
Key Components of Usage:
However, I am facing a significant challenge with the Instagrapi API. Despite following the standard procedures for story uploads, the uploaded stories are missing these crucial interactive elements, severely impacting the promotional effectiveness.
Efforts and Encountered Challenges:
Inquiries:
I am looking for insights to determine whether the challenges I am encountering are due to inherent limitations within Instagrapi or if they stem from issues specific to my application's setup. Understanding this is critical for deciding my subsequent actions, whether that involves further troubleshooting or exploring alternative solutions. Your guidance and insights on these matters would be highly valued.