예제 #1
0
파일: run.py 프로젝트: Chililove/instabotai
import json
import random
from instabotai import ai
import subprocess
from shutil import copyfile
import re, io

try:
    input = raw_input
except NameError:
    pass

COOKIES = {}
app = Flask(__name__)

bot = ai.Bot(do_logout=True)

app.secret_key = str(random.random())
def logoutput_open(username):
    with open("static/" + username + "info.txt", "r+") as read_file:
        logoutput = read_file.read()
        return logoutput

def open_file(filename):
    username = session.get("username")
    with open(username + filename + ".txt", "r+") as f:
        filename = f.read()
        return filename

@app.route("/")
def index():
예제 #2
0
import multiprocessing
from multiprocessing import Process
import timeit
tf.config.threading.set_intra_op_parallelism_threads(24)

ig_username = ""
ig_password = ""
ig_username2 = ""
ig_password2 = ""
ig_username3 = ""
ig_password3 = ""

COOKIES = {}

#bot = ai.Bot(do_logout=True)
bot = ai.Bot()
bot.api.login(username=ig_username,
              password=ig_password,
              is_threaded=True,
              use_cookie=True)
#time.sleep(2)


class Ai(object):
    def __init__(self):
        pass

    def face_detection_photo(self, path):

        start = time.time()
        path = str(path)