上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
摘要: def fact(x): if x == 1: return 1 else: return x * fact(x-1) 阅读全文
posted @ 2019-11-16 10:36 乔儿 阅读(402) 评论(0) 推荐(0) 编辑
摘要: -- 查询所有学生的姓名和性别(条件运算) select stuname as 姓名, case stusex when 1 then '男' else '女' end as 性别 from tb_student; select stuname as 姓名, if(stusex, '男', '女') 阅读全文
posted @ 2019-11-12 11:57 乔儿 阅读(215) 评论(0) 推荐(0) 编辑
摘要: # coding:gbk 阅读全文
posted @ 2019-11-08 15:02 乔儿 阅读(903) 评论(0) 推荐(0) 编辑
摘要: lables = ['nvbfge','cvbfg','nfsd','jklibn','dfgrt','muyh','ytug','nghmdf','gfhasfecxv']for lable in lables: print(lable) urls_0 = response.xpath("//ma 阅读全文
posted @ 2019-10-29 12:24 乔儿 阅读(351) 评论(0) 推荐(0) 编辑
摘要: # 通过enumerate函数处理列表之后再遍历可以同时获得元素索引和值 for index, elem in enumerate(list1): print(index, elem) 阅读全文
posted @ 2019-10-25 15:02 乔儿 阅读(620) 评论(0) 推荐(0) 编辑
摘要: RETRY_ENABLED = True #打开重试开关RETRY_TIMES = 3 #重试次数DOWNLOAD_TIMEOUT = 3 #超时RETRY_HTTP_CODES = [429,404,403] #重试HTTPERROR_ALLOWED_CODES = [429] #上面报的是403 阅读全文
posted @ 2019-10-24 14:49 乔儿 阅读(5794) 评论(0) 推荐(0) 编辑
摘要: response = requests.post(url=url, data=data, headers=headers)# 获取requests请求返回的cookiecookie = requests.utils.dict_from_cookiejar(response.cookies)retur 阅读全文
posted @ 2019-10-21 17:05 乔儿 阅读(5940) 评论(0) 推荐(0) 编辑
摘要: import time, threading def demo1(value1, value2=None): print("%s threading is printed %s, %s"%(threading.current_thread().name, value1, value2)) time. 阅读全文
posted @ 2019-10-14 16:19 乔儿 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 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 = 阅读全文
posted @ 2019-10-09 09:35 乔儿 阅读(300) 评论(0) 推荐(0) 编辑
摘要: [scrapy] DEBUG:Filtered duplicate request:<GET:xxxx>-no more duplicates will be shown 不会显示更多重复项, 其实这个的问题是,CrawlSpider结合LinkExtractor\Rule,在提取链接与发链接的时候 阅读全文
posted @ 2019-09-05 15:57 乔儿 阅读(1057) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页