12345678910111213141516171819202122232425 |
- """
- 登录接口
- """
- from flask import Blueprint
- from flask import request
- import api
- 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()
|