摘要: items: pipline: 阅读全文
posted @ 2019-01-30 16:34 20180616 阅读(198) 评论(0) 推荐(0) 编辑
摘要: import scrapy from scrapy.linkextractors import LinkExtractor from scrapy.spiders import CrawlSpider, Rule from wxapp.items import WxappItem class WxSpider(CrawlSpider): name = 'wx' allo... 阅读全文
posted @ 2019-01-30 16:29 20180616 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1. 导包 2. 创建 webdriver 3. 操作 1. 常用操作 4 例子 -- 爬去拉钩网招聘信息 过程: 用 selenium 访问首页,然后用lxml解析首页上的每一个职位,获取职位的链接地址,然后再用selenium 访问该地址,用lxml提取职位详情的信息。 get_attribut 阅读全文
posted @ 2019-01-29 16:46 20180616 阅读(220) 评论(0) 推荐(0) 编辑
摘要: # Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyr... 阅读全文
posted @ 2019-01-29 10:21 20180616 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 1. 浅拷贝:只拷贝第一层,更深层的还指向原有的内存地址。 2. 深拷贝: 递归拷贝多层。 1. 先看一例子: G:\envs\flaskenv\Scripts\python.exe G:/workspace/albumy-master/11.py18416499245521841649924552 阅读全文
posted @ 2019-01-19 12:38 20180616 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1. 我们先想一下在python中如果子类方法中想执行父类的方法,有什么方式?大概有三种: Parent.__init__(self, name) # 通过父类的名字,指定调用父类的方法 super().__init__(name, *args, **kwargs) # 通过super()自动调用父 阅读全文
posted @ 2019-01-18 10:36 20180616 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 1. 先看一个关于GIL的面试题 2. python语言的特征 python语言是解释型语言,执行代码的过程是先将代码交给python解释器,由解释器翻译成机器识别的二进制,然后交给CPU去执行。对于python解释器,有C语言写的称之为cpython,也有java写的称之为Jpython,官方推荐 阅读全文
posted @ 2019-01-16 10:14 20180616 阅读(185) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liyqiang/p/6270501.html 阅读全文
posted @ 2019-01-14 16:24 20180616 阅读(164) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liyqiang/p/6010213.html 阅读全文
posted @ 2019-01-14 16:19 20180616 阅读(92) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/liyqiang/p/6056822.html 阅读全文
posted @ 2019-01-14 16:15 20180616 阅读(145) 评论(0) 推荐(0) 编辑