<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[m0_47089903的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/m0_47089903</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; m0_47089903]]></copyright><item><title><![CDATA[用爬虫抓取一个图片]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105840950</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105840950</guid><author>m0_47089903</author><pubDate>Wed, 29 Apr 2020 15:33:12 +0800</pubDate><description><![CDATA[百度搜索“新闻”
网页上显示了很多文字及图片信息，假设我们想爬取百度标志图片，右键点击“检查”，会在右侧出现网页的代码，找到指向百度标志图片的url，复制它：https://www.baidu.com/img/bd_logo1.png
进入python3命令行交互模式



import requests






response =requests.get(‘https://www.baid...]]></description><category></category></item><item><title><![CDATA[python爬虫常用库：请求、解析、存储、工具库]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105837759</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105837759</guid><author>m0_47089903</author><pubDate>Wed, 29 Apr 2020 13:21:52 +0800</pubDate><description><![CDATA[请求库：requests, selenium
解析库：lxlm, beautifulsoup, pyquery,
存储库：redis, pymysql, pymongo
工具库：flask, django
python内置库：urllib，re



import urllib






import urllib.request






urllib.request.urlopen(‘ht...]]></description><category></category></item><item><title><![CDATA[python安装第三方库遇到 ERROR: Command errored out with exit status 1:]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105835224</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105835224</guid><author>m0_47089903</author><pubDate>Wed, 29 Apr 2020 11:12:23 +0800</pubDate><description><![CDATA[今天用cmd导入beautifulsoup这个网页解析库，遇到报错

看到这一大串红色字母很是奔溃啊
仔细一看最后一行
you’re trying to run a very old release of BeautifulSoup under python3. Please use BeautifulSoup4.
所以不能直接pip install beautifulsoup
应该pip最新版：...]]></description><category></category></item><item><title><![CDATA[MySQL safe mode]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105659162</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105659162</guid><author>m0_47089903</author><pubDate>Tue, 21 Apr 2020 15:25:19 +0800</pubDate><description><![CDATA[删除数据时会报错:
You are using safe update mode and you tried to update a table without a WHERE clause that uses a KEY column.”
原因是在safe mode下,要强制安全，
要取消这个限制,可以:
SET SQL_SAFE_UPDATES=0;
即可

...]]></description><category></category></item><item><title><![CDATA[查找所有至少连续出现三次的数字]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105640992</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105640992</guid><author>m0_47089903</author><pubDate>Mon, 20 Apr 2020 22:24:06 +0800</pubDate><description><![CDATA[出现几次就创建几次自联结
select distinct a.Num as ConsecutiveNums
from Logs as a,Logs as b,Logs as c
where a.Num=b.Num and b.Num=c.Num and a.id=b.id-1 and b.id=c.id-1;
但这种方法效率不高

...]]></description><category></category></item><item><title><![CDATA[提取排名第n的薪水]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105640741</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105640741</guid><author>m0_47089903</author><pubDate>Mon, 20 Apr 2020 17:53:14 +0800</pubDate><description><![CDATA[select distinct Salary from Employee
order by Salary desc
limit n-1,1
如果有多个人薪水相同
select * from Employee
where Salary =(
select distinct Salary from Employee
order by Salary desc
limit n-1,1)

...]]></description><category></category></item><item><title><![CDATA[MySQL的排名函数]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105640501</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105640501</guid><author>m0_47089903</author><pubDate>Mon, 20 Apr 2020 17:43:02 +0800</pubDate><description><![CDATA[1.rank() over (order by … )
相同的值序号一样，但排序不会连续
2.dense_rank() over (order by … )
排序是连续的，相同的值序号一样
3.row_number() OVER(order by … desc)
序号连续且不重复，over子句中的order by 要与Sql排序记录中的order by 保持一致，否则得到的序号可能不是连续的

...]]></description><category></category></item><item><title><![CDATA[使用mysql workbench导入csv文件失败的解决方法]]></title><link>https://blog.youkuaiyun.com/m0_47089903/article/details/105637028</link><guid>https://blog.youkuaiyun.com/m0_47089903/article/details/105637028</guid><author>m0_47089903</author><pubDate>Mon, 20 Apr 2020 16:12:04 +0800</pubDate><description><![CDATA[n
系统提示不能解析该文件，要求更改编码方式。
解决方法：
1.用记事本打开csv文件，另存的时候，文件名后缀为.csv，保存类型为文本文档，编码方式utf-8。
2.打开workbench, 右键tables选择table import wizard
3.选中记事本保存的csv文件，发现可以解析了，一路next，最后导入成功。
PS:此前我尝试了各种方式解决这个问题，比如用excel更改它的编码...]]></description><category></category></item></channel></rss>