摘要: http://www.cnblogs.com/JohnnyShy/p/4132113.html需要注意的是:img_url=divs.xpath('.//img/@src2').extract()[0]//img 前面有个点"." 阅读全文
posted @ 2015-04-18 21:32 Mellcap 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 错误存在于更改主机名字后,解决办法如下:sudo gedit /etc/hosts找到如下行:127.0.1.1 XXX将其修改为:127.0.1.1 (你现在的主机名)保存。 阅读全文
posted @ 2015-04-18 18:45 Mellcap 阅读(1769) 评论(0) 推荐(0) 编辑
摘要: \d —— 数字[0-9] —— 例子:a\dc —— a1c\D —— 非数字[^\d] —— 例子:a\Dc —— adc\s —— 空白字符[\t\r\n\f\v] —— 例子:a\sc —— a c\S —— 非空白字符[^\s] —— 例子:a\Sc —— a1c\w —— 单词字符[a... 阅读全文
posted @ 2015-04-18 11:19 Mellcap 阅读(984) 评论(0) 推荐(0) 编辑
摘要: 虫师的文章:需要注意的是:threads =[]t1= threading.Thread(target=music,args=(u'爱情买卖',))threads.append(t1)t2 = threading.Thread(target=move,args=(u'阿凡达',))threads.a... 阅读全文
posted @ 2015-04-18 11:04 Mellcap 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1、在ubuntu中,调用终端时如: f = open('/home/theone/test_input.txt','r')中的txt格式文本不能加后缀正确的应为: f = open('/home/theone/test_input','r')同样的,生成html时:$ python simple_... 阅读全文
posted @ 2015-04-18 11:02 Mellcap 阅读(699) 评论(0) 推荐(0) 编辑