随笔分类 -  python

Python相关
摘要:#!/usr/bin/python#coding:utf-8from pyquery import PyQueryimport re# 抓取:http://www.stylebop.com/cn/product_details.php?id=606526&special=sale# 获得 产品名... 阅读全文
posted @ 2015-10-20 12:07 超超xc 阅读(526) 评论(0) 推荐(0)
摘要:#!/usr/bin/python#coding:utf-8import MySQLdb,timeimport urllibimport urllib2import threadingdef main(): conn = MySQLdb.connect(host='192.168.1.139'... 阅读全文
posted @ 2015-10-18 22:32 超超xc 阅读(290) 评论(0) 推荐(0)
摘要:#!/usr/bin/python#coding:utf-8import threadingimport timeimport Queueimport random#多线程理解def print_time(threadName,delay,counter): while counter: ... 阅读全文
posted @ 2015-10-18 22:29 超超xc 阅读(277) 评论(0) 推荐(0)
摘要:2015年10月17日09:28:42 python-time访问网站如果不想要缓存的就 在后面加 ?t=123如果网站遭到攻击应该怎么办,做流量清洗,分析包,正确的就放过,否则就抛弃掉。如果攻击的站站带宽满了,就看看是否让运营商帮忙做清洗.一般网站都有所CDN,否则扛不住。CDN: http://... 阅读全文
posted @ 2015-10-17 20:53 超超xc 阅读(3056) 评论(0) 推荐(0)
摘要:#!/usr/bin/python#coding:utf-8import timeimport urllibimport urllib2from bs4 import BeautifulSoupimport reimport cookielibdef main0(): unix_timenow... 阅读全文
posted @ 2015-10-17 20:48 超超xc 阅读(365) 评论(0) 推荐(0)
摘要:我们谈到“文本处理”时,我们通常是指处理的内容。Python 将文本文件的内容读入可以操作的字符串变量非常容易。文件对象提供了三个“读”方法: .read()、.readline() 和 .readlines()。每种方法可以接受一个变量以限制每次读取的数据量,但它们通常不使用变量。 .read()... 阅读全文
posted @ 2015-10-02 16:39 超超xc 阅读(336) 评论(0) 推荐(0)
摘要:其中的html代码类似这样:''' IP端口类型地址, 211.48.77.583128透明韩国 CZ88.NET'''以下代码可直接保存为xxx.py 执行 1 #!/usr/bin/python 2 3 #coding:utf-8 4 5 import re 6 import httplib... 阅读全文
posted @ 2015-09-21 14:24 超超xc 阅读(1709) 评论(0) 推荐(0)

I suppose,were childrenonec.