-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
40 lines (35 loc) · 1.22 KB
/
Copy pathmain.py
File metadata and controls
40 lines (35 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import time
from proxyList import proxyListFormFile
from proxyAuth import authProxyTool
from proxyList import proxyListFromUrl
import threading
#获取列表
# proxyLists = proxyListFormFile.getProxyList()
proxyLists=proxyListFromUrl.getProxyList()
# threadLock = threading.Lock()
# class myThread (threading.Thread):
# def __init__(self, threadID, name, delay):
# threading.Thread.__init__(self)
# self.threadID = threadID
# self.name = name
# self.delay = delay
# def run(self):
# print ("开启线程: " + self.name)
# # 获取锁,用于线程同步
# threadLock.acquire()
# templist= proxyLists.pop()
# # 释放锁,开启下一个线程
# threadLock.release()
# print(templist.getProxy())
# if authProxyTool.auth(templist):
# print(templist.getProxy() + "::::::::" + str(templist.getelseInfo()))
#
#
# thread1 = myThread(1, "Thread-1", 1)
# thread2 = myThread(2, "Thread-2", 2)
# thread3 = myThread(1, "Thread-1", 1)
# thread4 = myThread(2, "Thread-2", 2)
for list in proxyLists:
print("start:::::"+list.getProxy())
if authProxyTool.auth(list):
print(list.getProxy() + "::::::::" + str(list.getelseInfo()))