摘要: import urllib.request def load_baidu(): url= "https://www.baidu.com" header = { #浏览器的版本 "User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) 阅读全文
posted @ 2019-03-24 23:27 hank-li 阅读(157) 评论(0) 推荐(0)
摘要: import urllib.request import urllib.parse import string def get_params(): url = "http://www.baidu.com/s?" params = { "wd":"中文", "key":"zhang", "value" 阅读全文
posted @ 2019-03-24 23:17 hank-li 阅读(205) 评论(0) 推荐(0)
摘要: import urllib.request import urllib.parse import string def get_method_params(): url = "http://www.baidu.com/s?wd=" #拼接字符串(汉字) #python可以接受的数据 #https://www.baidu.com/s?wd=%E7%BE%8E%E... 阅读全文
posted @ 2019-03-24 23:02 hank-li 阅读(138) 评论(0) 推荐(0)
摘要: import urllib.request def load_data(): url = "http://www.baidu.com/" #get的请求 #http请求 #response:http相应的对象 response = urllib.request.urlopen(url) print( 阅读全文
posted @ 2019-03-24 22:52 hank-li 阅读(140) 评论(0) 推荐(0)
摘要: sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql* sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My* edit /etc/h 阅读全文
posted @ 2019-03-24 13:16 hank-li 阅读(160) 评论(0) 推荐(0)