![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
爬虫
captainNYS
这个作者很懒,什么都没留下…
展开
-
python爬虫并将数据存储到MySQL或Excel中
爬虫爬取的是豆瓣top250图书,以存储到MySQL为例,流程如下:1.先建表,可以用命令行,也可以用数据库可视化软件,建立好需要用的到的字段2.写好爬虫,并在爬虫中连接数据库,把爬下来的数据按对应的字段填入数据库中# -*- coding: utf-8 -*-# Captain_Nfrom lxml import etreeimport randomimport req...原创 2018-07-29 11:39:03 · 1739 阅读 · 0 评论 -
check the manual that corresponds to your MySQL server version for the right syntax to use near ###
报错如下:pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like,sponsor) values...转载 2018-08-01 16:54:11 · 1343 阅读 · 0 评论 -
爬虫入门简例
根据机械工业出版社出版的《从零开始学Python网络爬虫》指导,实现其提供的简例。修改了一些小问题,代码见GitHub。1、KuGou.py:爬取酷狗top500,beautifulsoup库解析2、DouPo.py:使用正则表达式爬取小说,并做一定数据清洗3、DouBanTOP250booksExcel.py:爬取豆瓣top250图书存储excel表4、QiDia...原创 2018-12-10 14:50:44 · 354 阅读 · 0 评论