会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
乔儿
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
13
14
15
16
17
18
19
下一页
2019年3月28日
筛除掉不符合条件的标签
摘要: 就是将图片中<li class="row">的标签删除掉,因为这个标签是广告标签,所以需要将这个标签剔除掉。
阅读全文
posted @ 2019-03-28 18:26 乔儿
阅读(85)
评论(0)
推荐(0)
2019年3月21日
format 插入一个字符,%d,%n
摘要:
阅读全文
posted @ 2019-03-21 23:09 乔儿
阅读(186)
评论(0)
推荐(0)
xpath提取到的中文乱码时的解决办法
摘要: βҳ转换为正常的中文:
阅读全文
posted @ 2019-03-21 22:49 乔儿
阅读(4398)
评论(1)
推荐(1)
2019年3月20日
过滤函数 filter
摘要: 过滤函数,作用就是将“以‘居’结尾的字段都过滤出来,其它的字段都删除掉。”
阅读全文
posted @ 2019-03-20 22:05 乔儿
阅读(298)
评论(0)
推荐(0)
2019年3月19日
redis设置过期时间
摘要:
阅读全文
posted @ 2019-03-19 10:57 乔儿
阅读(125)
评论(0)
推荐(0)
2019年3月17日
split根据一个元素分割语句
摘要: a = ‘https://www.baidu.com/s?wd=%E7%AE%80%E4%B9%A6&rsv_spt=1&rsv_iqid=0xdfa3666f00083a6f&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_en
阅读全文
posted @ 2019-03-17 16:16 乔儿
阅读(600)
评论(0)
推荐(0)
2019年3月16日
scrapy中crawlspide中callback和follow函数的作用及使用方法
摘要: Rule(LinkExtractor(allow=r'i/tems'),callback='parse_item',follow=True) 当前代码的含义就是将当前页面及按照allow=r'i/tems'规则找出来的url的代码返回给callback='parse_item'或者供下一个rule使
阅读全文
posted @ 2019-03-16 11:54 乔儿
阅读(470)
评论(0)
推荐(0)
2019年3月14日
一个class标签里面有多个属性时的提取标签
摘要: <div class="uibox-con carpic-list03 border-b-solid"> #即这个标签同时满足三个class:“uibox”、“carpic-list03”、“border-b-solid”。 提取此标签时:html.xpath("//div[contains(@cl
阅读全文
posted @ 2019-03-14 21:58 乔儿
阅读(353)
评论(0)
推荐(0)
查看当前文件位置,及创建文件夹
摘要:
阅读全文
posted @ 2019-03-14 15:49 乔儿
阅读(108)
评论(0)
推荐(0)
for循环遍历改用map函数
摘要: # for url in urls:# url = response.urljoin(url)# print(url)urls = map(lambda url:response.urljoin(url),urls)print(urls)在这里要情调的是map函数运行完之后会生成一个map对象(<m
阅读全文
posted @ 2019-03-14 13:45 乔儿
阅读(836)
评论(0)
推荐(0)
上一页
1
···
13
14
15
16
17
18
19
下一页
公告