def __init__(self, threadNum): self.headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36'} self.URL = "http://www.lagou.com/" self.position = [] # 使用元祖储存职业名 self.q_req = Queue() self.threadNum = threadNum self.lagou_db = LGDB()