|
@@ -10,3 +10,16 @@ import instagram
|
|
|
|
|
|
login_opt = Blueprint('login', __name__)
|
|
|
|
|
|
+@login_opt.route('/createPage', methods=["POST"])
|
|
|
+def create_page():
|
|
|
+ """
|
|
|
+ 登录接口
|
|
|
+ """
|
|
|
+ request_body = request.json
|
|
|
+ account = request_body.get('account')
|
|
|
+ if not api.contain_browser(account):
|
|
|
+ browser = instagram.InstagramBrowser(account)
|
|
|
+ browser.__init_browser__(playwright=None)
|
|
|
+ browser.close()
|
|
|
+ api.add_account(account)
|
|
|
+ return api.success()
|