Beispiel #1
0
            except Exception as e:
                print(e)
            finally:
                # twitter.quit()
                random_sleep(300, 600)
                i += 1
    else:
        instagram = Instagram()
        while True:
            keyword = KEYWORDS[random.randrange(len(KEYWORDS))]
            try:
                instagram.login()
                instagram.search(keyword)
                if args.follow:
                    instagram.follow()
                    if i % refresh_point == 0:
                        instagram.refresh()
                else:
                    if i % refresh_point == 0:
                        instagram.like()
                        instagram.follow()
                        instagram.refresh()
                    else:
                        instagram.like()
            except Exception as e:
                print(e)
            finally:
                # instagram.quit()
                random_sleep(300, 600)
                i += 1