Python Forum
Need help looping this program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help looping this program
#1
So im using instapy and running a bot that likes and comments on peoples profiles but it'll only run once and i needed some help since im REALLY new to python, i didn't write the code that's why im here but is still changed things like my login and tags etc. but i want to have the program run infinitely on my laptop so it'll bring in continuous people, thanks

Here's the code
"""
This template is written by @Edhim
What does this quickstart script aim to do?
- I am using simple settings for my personal account with a crontab each 3H,
it's been working since 5 months with no problem.
"""

from instapy import InstaPy
from instapy import smart_run

# get a session!
session = InstaPy(username='', password='')

# let's go! :>
with smart_run(session):
    # settings
    session.set_relationship_bounds(enabled=False,
                                    potency_ratio=-1.21,
                                    delimit_by_numbers=True,
                                    max_followers=4590,
                                    max_following=5555,
                                    min_followers=45,
                                    min_following=77)
    session.set_do_comment(True, percentage=50)
    session.set_comments(['aMazing!', 'So cool!!', 'Nice!', 'wow looks nice!',
                        'Just incredible :open_mouth:',
                        'What camera did you use @{}?',
                        'Love your posts @{}',
                        'Looks awesome @{}',
                        'Getting inspired by you @{}',
                          'this is awesome!'])

    # activity
    session.like_by_tags(
        ['xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx', 'xxx',
         'xxx', 'xxx', 'xxx'],
        amount=8, skip_top_posts=True)

    """ Joining Engagement Pods...
    """
    session.join_pods()
Reply
#2
Do look at while loops. You should just learn it rather than me write the code
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] Looping a Program volcano63 7 3,992 Oct-09-2018, 12:26 AM
Last Post: micseydel
  Looping a Program DavidRobinsons 4 3,485 Oct-09-2018, 12:14 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020