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

Class Proxy

proxy.py:4–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3
4class Proxy(object):
5 def __init__(self):
6 self.id = 1
7 self.ip = ''
8 self.port = ''
9 self.country = ''
10 self.anonymity = ''
11 self.https = ''
12 self.speed = ''
13 self.source = ''
14 self.vali_count = 0
15
16 def __str__(self):
17 data = {
18 'ip': self.ip,
19 'port': self.port,
20 'country': self.country,
21 'anonymity': self.anonymity,
22 'https': self.https,
23 'speed': self.speed,
24 'source': self.source,
25 'vali_count': self.vali_count,
26 }
27
28 return str(data)
29
30 def __dict__(self):
31 data = {
32 'ip': self.ip,
33 'port': self.port,
34 'country': self.country,
35 'anonymity': self.anonymity,
36 'https': self.https,
37 'speed': self.speed,
38 'source': self.source,
39 'vali_count': self.vali_count,
40 }
41
42 return data
43
44 def get_dict(self):
45 data = {
46 'ip': self.ip,
47 'port': self.port,
48 'country': self.country,
49 'anonymity': self.anonymity,
50 'https': self.https,
51 'speed': self.speed,
52 'source': self.source,
53 'vali_count': self.vali_count,
54 }
55
56 return data
57
58 def set_value(self, ip, port, country, anonymity, source='unkonw', https='no', speed=-1, vali_count=0):
59 self.ip = ip
60 self.port = port
61 self.country = country

Callers 14

get_proxy_with_idMethod · 0.90
get_proxy_with_idMethod · 0.90
insertFunction · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90
parse_pageMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected