上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页
摘要: if 表达式 CASE WHEN 表达式 阅读全文
posted @ 2020-08-12 15:04 yjy888 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1、 设置多个feed exporter 使用FEEDS参数,(在爬虫类里添加类变量, 使用ip代理 https://www.jianshu.com/p/c656ad21c42f ) custom_settings = { 'FEEDS' :{ 'items.json': { 'format': ' 阅读全文
posted @ 2020-08-06 11:35 yjy888 阅读(139) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/23075397/python-how-to-edit-an-installed-package 阅读全文
posted @ 2020-07-28 18:00 yjy888 阅读(3596) 评论(0) 推荐(0) 编辑
摘要: 1、可以开多进程,但是每个使用独立的webdriver,需要复制多份。(chrome自身的问题,单个webdriver会导致蓝屏?) 2、一定要经常存数据!爬虫不可靠,可能会意外中断。 如果使用mysql 或者sql,每条数据存一次,或者每隔几条村一次;如果使用namedtuple,则用pickle 阅读全文
posted @ 2020-07-23 09:54 yjy888 阅读(828) 评论(0) 推荐(0) 编辑
摘要: record(*[1,2,3]) record(**{‘a':1,'b':1,'c':2}) 阅读全文
posted @ 2020-07-20 10:58 yjy888 阅读(241) 评论(0) 推荐(0) 编辑
摘要: namedtuple可以很容易转换为dataframe df = pd.DataFrame()df = df.append(n_tuple) 阅读全文
posted @ 2020-07-20 09:40 yjy888 阅读(257) 评论(0) 推荐(0) 编辑
摘要: log不打印在控制台 scrapy crawl [spider_name] -s LOG_FILE=spider.log scrapy crawl or runspider 区别:https://blog.csdn.net/mouday/article/details/88549031 阅读全文
posted @ 2020-07-16 15:49 yjy888 阅读(89) 评论(0) 推荐(0) 编辑
摘要: np.random.choice([0,1],p=[0.7,0.3]) 阅读全文
posted @ 2020-07-15 14:31 yjy888 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 因为with里面,一旦结束,就会重新生成with环境变量 https://stackoverflow.com/questions/19277280/preserving-global-state-in-a-flask-application 我们需要保证每个request是独立的,这样才不会造成某个 阅读全文
posted @ 2020-07-08 17:53 yjy888 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 不同的应用如果都需要redis,,可以创建多个 pool = redis.ConnectionPool(host='127.0.0.1', port=6379, decode_responses=True,db=1)r1 = redis.Redis(connection_pool=pool)r1.f 阅读全文
posted @ 2020-07-08 14:16 yjy888 阅读(459) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 24 下一页