今天在用scrapy爬某个网站的数据,其中DOM解析我用的是BeautifulSoup,速度上没有XPath来得快,不过因为用了习惯了,所以一直用的bs,版本是bs4不过在爬取过程中遇到了一些问题,其中一个是Unicode转码问题,这也算是python中一个著名问题了。我遇到的算是Beautiful...
分类:
其他好文 时间:
2014-07-22 22:53:55
阅读次数:
229
http://poj.org/problem?id=1269Time Limit:1000MSMemory Limit:10000KTotal Submissions:10379Accepted:4651DescriptionWe all know that a pair of distinct p...
分类:
其他好文 时间:
2014-07-22 22:53:16
阅读次数:
314
一、 robot framework环境搭建: 官网:http://robotframework.org/ 序号安装包名安装方法下载地址备注1pythonexe文件,直接双击安装https://www.python.org/download/releases/2.7.8/一切的基础,安装...
分类:
其他好文 时间:
2014-07-22 22:53:15
阅读次数:
213
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:
其他好文 时间:
2014-07-22 22:53:14
阅读次数:
184
今天复习了下导航器,把播放器美化了下// ViewController.m// 播放器//// Created by apple on 14-7-18.// Copyright (c) 2014年 apple. All rights reserved.//#import "ViewContr...
分类:
其他好文 时间:
2014-07-22 22:52:14
阅读次数:
229
之前网上的破解方法多是以替换pyo文件为主。 经在win7和win8 下经验发现,替换后,ide就启动不起来了。 除此之外还有大把的反编译破解教程,对于时间不宽裕的孩子,估计更是没心情看。 几经折腾,最后发现这个计算注册码的脚本。 整理后的安装包,破解脚本和破解方法描述文本,整理打包放在百度云盘上。...
分类:
编程语言 时间:
2014-07-22 22:51:54
阅读次数:
278
error1:ERROR 1045 (28000): Access denied for user 'root'@'xyt.local' (using password: YES)grant all on mysql.* to 'root'@'192.168.11.172' identified b...
分类:
其他好文 时间:
2014-07-19 22:38:47
阅读次数:
258
lsof -i :8086 第二个参数需要:开头netstat linux-a (all)显示所有选项,默认不显示LISTEN相关 理解这个很关键, 这是为什么我们netstat -a 不显示listen相关的信息-t (tcp)仅显示tcp相关选项-u (udp)仅显示udp相关选项-...
分类:
Web程序 时间:
2014-07-19 22:34:07
阅读次数:
224
ipconfig/all
route print 显示本机所有的网络
网关是什么
那么网关到底是什么呢?网关实质上是一个网络通向其他网络的IP地址。比如有网络A和网络B,网络A的IP地址范围为“192.168.1.1~192.
168.1.254”,子网掩码为255.255.255.0;网络B的IP地址范围为“192.168.2.1~192.168.2.254”...
分类:
数据库 时间:
2014-07-19 18:41:19
阅读次数:
375
还在为分析nginx大日志犯愁吗?也许你会想到用shell处理,1G文件没有问题,上了10G文件,会消耗很久时间,用shell结合python多线程处理没有错。什么都不用说了,直接上代码了#!/usr/bin/python
#coding:utf8
importthreading#载入多线程模块
importtime#载入时间模块
importos#..
分类:
编程语言 时间:
2014-07-19 18:16:00
阅读次数:
216