上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 198 下一页
摘要: #coding:utf8 __author__ = 'wang' class HtmlOutputer(object): def __init__(self): self.datas = []; def collect_data(self, data): if data is None: return ... 阅读全文
posted @ 2016-11-29 22:45 brady-wang 阅读(460) 评论(0) 推荐(0) 编辑
摘要: #coding:utf8 import urlparse from bs4 import BeautifulSoup import re __author__ = 'wang' class HtmlParser(object): def parse(self, page_url, html_cont): if page_url is None or html_con... 阅读全文
posted @ 2016-11-29 22:44 brady-wang 阅读(686) 评论(0) 推荐(0) 编辑
摘要: spider_main.py 阅读全文
posted @ 2016-11-29 22:42 brady-wang 阅读(700) 评论(0) 推荐(0) 编辑
摘要: #coding:utf8 class UrlManager(object): def __init__(self): self.new_urls = set() self.old_urls = set() def add_new_url(self, url): if url is None: return... 阅读全文
posted @ 2016-11-29 22:42 brady-wang 阅读(887) 评论(0) 推荐(0) 编辑
摘要: import re from bs4 import BeautifulSoup html_doc = """ <html><head><title>The Dormouse's story</title></head> <body> <p class="title"><b>The Dormouse' 阅读全文
posted @ 2016-11-29 22:20 brady-wang 阅读(422) 评论(0) 推荐(0) 编辑
摘要: python scripts下 pip install beautifulsoup4 阅读全文
posted @ 2016-11-29 22:00 brady-wang 阅读(209) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- import cookielib import urllib2 url = "http://www.baidu.com" print "第一种方法" response1 = urllib2.urlopen(url) print response1.getcode() print len(response1.read()) print "第二种方... 阅读全文
posted @ 2016-11-29 21:53 brady-wang 阅读(1662) 评论(0) 推荐(0) 编辑
摘要: sz /etc/sysconfig/network-scripts/ifcfg-eth1 阅读全文
posted @ 2016-11-29 09:16 brady-wang 阅读(388) 评论(0) 推荐(0) 编辑
摘要: ci重定向 对于/index.php/abc这种url,Apache和lighttpd会按"index.php?abc"来解释,而nginx会认为是请求名字是“index.php”的目录下的abc文件的内容。所以CI在nginx下不配置rewrite是无法运行的,而在Apache和lighttpd则 阅读全文
posted @ 2016-11-28 18:59 brady-wang 阅读(894) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 4 阅读全文
posted @ 2016-11-26 10:05 brady-wang 阅读(767) 评论(0) 推荐(0) 编辑
上一页 1 ··· 162 163 164 165 166 167 168 169 170 ··· 198 下一页