Instapy: Schedule script windows 10

Created on 16 Dec 2017  路  9Comments  路  Source: timgrossmann/InstaPy

I didn't understood how to setup a schedule to run this script every day at some precise time, i used the schedule on the main page but the script just throw out error: urllib.error.URLError:

help wanted wontfix

Most helpful comment

All 9 comments

this is wiorking for me windows 10:



import schedule
import time

def job():
    try:

        #create instance
        session = InstaPy(username=insta_username, password=insta_password)
        session.login()
        # use smart hashtags
        #session.set_smart_hashtags(taglist, limit=3, sort='top', log_tags=True)

        #limits
        session.set_blacklist(enabled=True, campaign='General')
        session.set_upper_follower_count(limit=1500)
        session.set_dont_include(original_all_following)
        session.set_user_interact(amount=2, randomize=False, percentage=90, media='Photo')
        #configurations
        session.set_do_comment(True, percentage=5)
        session.set_do_follow(True, percentage=50, times=1)
        session.set_comments(['beautiful', u'\u2665', u'\u2665 \u2665 \u2665', u'\u2665 \u2665', u'\u2764', u'\u263A'])

        # start the process
        print("do the actual liking by tag")
        session.like_by_tags(taglist, amount=200)

        # unfollow
        session.unfollow_users(amount=40, onlyInstapyFollowed=True, onlyInstapyMethod='FIFO', sleep_delay=600)

        print("do the actual liking by feed")
        session.like_by_feed(amount=80)

        # unfollow
        session.unfollow_users(amount=40, onlyInstapyFollowed=True, onlyInstapyMethod='FIFO', sleep_delay=600)

        print("do the actual liking by user list")
        session.interact_user_followers(userFollowlist, amount=700, randomize=False)

        # unfollow
        session.unfollow_users(amount=40, onlyInstapyFollowed=True, onlyInstapyMethod='FIFO', sleep_delay=600)

        # end the bot session
        session.end()
    except KeyboardInterrupt:
        session.end()
    except:
        import traceback
        print(traceback.format_exc())

job()
schedule.every().day.at("06:22").do(job)
schedule.every().day.at("08:01").do(job)
schedule.every().day.at("09:10").do(job)
schedule.every().day.at("10:23").do(job)
schedule.every().day.at("11:18").do(job)
schedule.every().day.at("12:25").do(job)
schedule.every().day.at("14:25").do(job)
schedule.every().day.at("15:28").do(job)
schedule.every().day.at("16:25").do(job)
schedule.every().day.at("17:25").do(job)
schedule.every().day.at("19:00").do(job)
schedule.every().day.at("20:44").do(job)

while True:
    schedule.run_pending()
    time.sleep(1)

@fanto88 did you solve it?

where have you defined original_all_following and taglist? @sionking

and why i put session.like_by_tags(['tag'], amount=200) but the script put only 20 likes?

Thank you,
Davide.

it is something original_all_following private igonre.

I don't mind the amount since I have my own limit per day and hour so it is no issue for me.
I heard it have issue with this

@sionking
Hello, I am newbie, so the reason why of my question.
Where to put the code you suggested before for scheduling the job? Should I also download and install Schedule add-in ?

Is there a stable working script for this already?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. > If this problem still occurs, please open a new issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wyvers picture wyvers  路  3Comments

harrypython picture harrypython  路  3Comments

n0sw34r picture n0sw34r  路  3Comments

tibor picture tibor  路  3Comments

seuraltimez picture seuraltimez  路  3Comments