随笔分类 -  python爬虫

记录爬虫学习点滴
正则表达式——学习笔记
摘要:正则表达式 1类的命名:FooMeth()方法的命名:say_hello() match(A,B) 如果有匹配的结果,返回匹配对象,可以用group方法查看对象,如果没有匹配的结果,返回None 匹配字符. 匹配任意一个字符,除了\n\d 匹配数字,0-9\D 匹配非数字\s 匹配空白字符 即空格, 阅读全文

posted @ 2021-03-14 20:59 ClarenceSun 阅读(55) 评论(0) 推荐(0)

scrapy爬取数据后存储在本地mysql数据库中
摘要:话不多说,直接上代码 1 # -*- coding: utf-8 -*- 2 3 # Define your item pipelines here 4 # 5 # Don't forget to add your pipeline to the ITEM_PIPELINES setting 6 # 阅读全文

posted @ 2020-06-27 22:17 ClarenceSun 阅读(244) 评论(0) 推荐(0)

JS+Selenium+excel追加写入,使用python成功爬取京东任何商品~
摘要:之前一直是requests库做爬虫,这次尝试下使用selenium做爬虫,效率不高,但是却没有限制,文章是分别结合大牛的selenium爬虫以及excel追加写入操作而成,还有待优化,打算爬取更多信息后进行词云分析 ''' 爬取京东商品信息: 请求url: https://www.jd.com/ 提 阅读全文

posted @ 2020-04-26 22:19 ClarenceSun 阅读(325) 评论(0) 推荐(0)

导航