MCPcopy Create free account
hub / github.com/awolfly9/IPProxyTool / insert

Function insert

server/dataserver.py:22–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21@app.route('/insert')
22def insert():
23 sql = SqlManager()
24 name = request.args.get('name')
25 proxy = Proxy()
26 proxy.set_value(
27 ip=request.args.get('ip'),
28 port=request.args.get('port'),
29 country=request.args.get('country', None),
30 anonymity=request.args.get('anonymity', None),
31 https=request.args.get('https', 'no'),
32 speed=request.args.get('speed', -1),
33 source=request.args.get('source', name),
34 )
35
36 result = sql.insert_proxy(name, proxy)
37 data = {
38 'result': result
39 }
40
41 return json.dumps(data, indent=4)
42
43
44@app.route('/select')

Callers

nothing calls this directly

Calls 4

set_valueMethod · 0.95
insert_proxyMethod · 0.95
SqlManagerClass · 0.90
ProxyClass · 0.90

Tested by

no test coverage detected