Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AutoApiTest
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
business
AutoApiTest
Commits
30cd0e02
Commit
30cd0e02
authored
Jan 04, 2021
by
liangfenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
3c4b6a37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
17 deletions
+2
-17
gmhttp.py
utils/gmhttp.py
+2
-17
No files found.
utils/gmhttp.py
View file @
30cd0e02
...
...
@@ -61,23 +61,11 @@ class _Gmhttp(requests.Session):
'''
封装一个类,提供request的各种方法
'''
# _object = None
_params
=
settings
.
GENGMEI_PARAMS
_host
=
settings
.
BACKEND_ADMIN
# 这种地方还是需要优化,看配置在何处比较方便工程使用
_userinfo
=
settings
.
LIVE_USER
# 这种地方还是需要优化,看配置在何处比较方便工程使用
_host
=
settings
.
BACKEND_ADMIN
_userinfo
=
settings
.
LIVE_USER
_exist_user_objs
=
{}
# 不同手机号 相同实例,这个方法不好,直接使用instance生成实例
# def __new__(cls, *args, **kwargs):
# '''
# 做一个单例,最好直接使用gmhttp,天然单例
# :param args:
# :param kwargs:
# :return:
# '''
# if cls._object == None:
# cls._object = super().__new__(cls, *args, **kwargs)
# return cls._object
def
__init__
(
self
,
phone
,
password
,
*
args
,
**
kwargs
):
'''
...
...
@@ -145,6 +133,3 @@ class _Gmhttp(requests.Session):
def
__del__
(
self
):
self
.
close
()
# 这个是 long 账号的实例 ,不一定所有环境都支持,先注释掉
# gmhttp = Gmhttp.instance()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment