04 2015 档案

摘要:http://www.crummy.com/software/BeautifulSoup/bs4/doc/index.zh.html#id8 阅读全文
posted @ 2015-04-26 14:00 Chris*Chen
摘要:1 import urllib22 url = u"http://www.baidu.com/wd=测试"3 urllib2.urlopen(url.encode('utf-8')).read()对url进行encode编码 阅读全文
posted @ 2015-04-26 13:48 Chris*Chen
摘要:1、Beautiful Soup 4.3.2下载2、下载完成后解压,放在Python的安装目录下,假设放到C:/Python3、运行cmd,切换到C:/Python/Beautiful Soup 4.3.2/目录下(根据自己解压缩的目录和下载的版本号修改) cd/dC:/Python/Beauti... 阅读全文
posted @ 2015-04-26 12:15 Chris*Chen
摘要:这个问题主要是没有headers,加入一些内容就可以了示例:# -*- coding: UTF-8 -*-import urllib2site= "http://www.nseindia.com/live_market/dynaContent/live_watch/get_quote/getHist... 阅读全文
posted @ 2015-04-25 22:15 Chris*Chen
摘要:最近开始学习爬虫,一开始看的是静觅的爬虫系列文章,今天看到糗事百科成人版,心里就邪恶了一下,把图片都爬下来吧,哈哈~虽然后来实现了,但还是存在一些问题,暂且不提,先切入正题吧,没什么好说的,直接上代码如下:环境:Python2.79 1 #coding: utf-8 2 import urllib2... 阅读全文
posted @ 2015-04-23 20:30 Chris*Chen
摘要:之前学习数据结构几度丢弃,我却一直忽略了最重要的一点,开始的学习的不要贪多,每天完成一点点,终会完成既定的目标!插入排序:动画图示:http://visualgo.net/sorting.html代码:(默认排列,小——大) 1 void swap(int *p1, int *p2) 2 { 3... 阅读全文
posted @ 2015-04-22 20:20 Chris*Chen