10 2019 档案
摘要:lables = ['nvbfge','cvbfg','nfsd','jklibn','dfgrt','muyh','ytug','nghmdf','gfhasfecxv']for lable in lables: print(lable) urls_0 = response.xpath("//ma
阅读全文
摘要:# 通过enumerate函数处理列表之后再遍历可以同时获得元素索引和值 for index, elem in enumerate(list1): print(index, elem)
阅读全文
摘要:RETRY_ENABLED = True #打开重试开关RETRY_TIMES = 3 #重试次数DOWNLOAD_TIMEOUT = 3 #超时RETRY_HTTP_CODES = [429,404,403] #重试HTTPERROR_ALLOWED_CODES = [429] #上面报的是403
阅读全文
摘要:response = requests.post(url=url, data=data, headers=headers)# 获取requests请求返回的cookiecookie = requests.utils.dict_from_cookiejar(response.cookies)retur
阅读全文
摘要:import time, threading def demo1(value1, value2=None): print("%s threading is printed %s, %s"%(threading.current_thread().name, value1, value2)) time.
阅读全文
摘要:class proxyMiddleware(object): def __init__(self): self.ip_pool_cc = [] self.get_ip_url_cc = 'http://xxxxx' self.ip_pool_cq = [] self.get_ip_url_cq =
阅读全文