action="store_true") parser.add_argument('--username', help='if indicated, like posts by count', type=str, required=True) args = parser.parse_args() debug = args.debug username = args.username force_update = args.force_update login = me.get_login() password = me.get_password() br = browser.Browser( debug=debug, cookie_path=configure.COOKIE_PATH, log_path=configure.LOG_PATH, db_path=configure.DB_PATH, ) try: if not force_update and os.path.isfile('users_subscribers/' + username + '.json'): br.logger.log('Able to use cached list.') else: br.logger.log( "Can\'t find cached list or subscribers or used option \'force_update\'" ) br.auth(login, password) br.get_subscribed_of_username(username) finally: br.close_all()
action="store_true") parser.add_argument('--count', help='if indicated, like posts by count', type=int, default=None) parser.add_argument('--location', help='if indicated, like posts by count', type=str, required=True) args = parser.parse_args() debug = args.debug count = args.count auto_follow = args.auto_follow location = args.location login = os.environ.get('insta_login') password = os.environ.get('insta_password') br = browser.Browser(debug=debug, cookie_path=configure.COOKIE_PATH, log_path=configure.LOG_PATH, db_path=configure.DB_PATH, exclude=configure.exclude, auto_follow=auto_follow) try: br.auth(login, password) br.process_location(location, count) print(br.get_summary()) finally: br.close_all()