百词斩是一款很不错的单词记忆APP,在学习过程中,它会记录你所学的每个单词及你答错的次数,通过此列表可以很方便地找到自己在记忆哪些单词时总是反复出错记不住。我们来用Python来爬取这些信息,同时学习Python爬虫基础。首先来到百词斩网站:http://www.baicizhan.com/logi...
分类:
编程语言 时间:
2015-12-16 01:39:42
阅读次数:
374
In cassandra 2.1.4, if you run "nodetool status" without any keyspace specified, you will get a Note:?123456789$ nodetool statusDatacenter: datacenter...
分类:
其他好文 时间:
2015-12-14 22:54:54
阅读次数:
993
'''得到当前页面所有连接'''import requestsimport refrom bs4 import BeautifulSoupfrom lxml import etreeurl = 'http://www.ok226.com'r = requests.get(url)r.encoding...
分类:
编程语言 时间:
2015-12-14 06:46:28
阅读次数:
329
测试环境:python2.7 + beautifulsoup4.4.1 + selenium2.48.0测试网址:http://tieba.baidu.com/p/2827883128目的是下载该网页下所有图片,共160+张。可以分为以下几步:1、获取网页源代码。发现直接通过urllib2或者req...
分类:
编程语言 时间:
2015-12-06 15:55:01
阅读次数:
301
概要:利用python进行web数据抓取简单方法和实现。1、python进行网页数据抓取有两种方式:一种是直接依据url链接来拼接使用get方法得到内容,一种是构建post请求改变对应参数来获得web返回的内容。一、第一种方法通常用来获取静态页面内容,比如豆瓣电影内容分类下动画对应的链接:http:...
分类:
编程语言 时间:
2015-12-05 17:29:36
阅读次数:
150
IntroductionThere are few information about how to compile boost with Intel compiler. This article is to describe a simple command steps to let you get a boost library with Intel compiler support.Step...
分类:
其他好文 时间:
2015-12-05 07:15:05
阅读次数:
147
# -*- coding: utf-8 -*-import requestsimport reimport sysreload(sys)sys.setdefaultencoding('utf-8')if __name__ == '__main__': url = 'http://photost...
分类:
编程语言 时间:
2015-12-03 02:07:52
阅读次数:
251
代码:# _*_ coding:utf-8 _*_import urllib2import reimport sys#reload(sys)#sys.setdefaultencoding('utf-8') class Tool: removeImg = re.compile(r'') ...
分类:
编程语言 时间:
2015-11-28 21:37:59
阅读次数:
334
代码:# _*_ coding:utf-8 _*_import urllibimport urllib2import reclass Tool: removingImg = re.compile('| {7}|') removingAddr = re.compile('|') re...
分类:
编程语言 时间:
2015-11-27 19:42:32
阅读次数:
239
#-*- encoding: utf-8 -*- python2.7 '''Created on 2015-11-27@author: max'''import re,urllib,time,uuid,osfor i in re.findall(r'img?src="(.+?\.jpg)"',url...
分类:
编程语言 时间:
2015-11-27 16:57:51
阅读次数:
175