# coding=utf-8
import urllib2
import urllib
import re
class QiuShi:
def _init_(self):
self.page = 1
# 从网页获取糗事
def GetQiuShis(self,page):
#网址
url = "http://www.qiushibaike.com/...
分类:
编程语言 时间:
2014-12-21 15:22:50
阅读次数:
279
LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
List providers = lm.getProviders(true);
/* Loop over the array backwards, and if you get an accurate location, the...
分类:
移动开发 时间:
2014-12-20 19:42:35
阅读次数:
234
目标:以特定语言技术为关键字,爬取八戒网中网站设计开发栏目下发布的任务相关信息需求:用户通过设置自己感兴趣的关键字或正则表达式,来过滤信息。我自己选择的是通过特定语言技术作为关键字,php、java和python。注意:如果不选用正则表达式,就会把javascript也爬进来,那前端的信息就比较多了...
分类:
编程语言 时间:
2014-12-17 22:12:52
阅读次数:
304
Import SHA2 SSL cert to Windows IIS71.You will get 3 piece of certs from GeoTrust, and save them to below1)=server.cert: Issue to "*.domain.cn", Issue...
Git ConceptsThis section helps you to get started with Git and gives you an understanding of the fundamental Git concepts.Repository, Working Tree, Co...
分类:
其他好文 时间:
2014-12-15 23:28:55
阅读次数:
401
因为平时爱好摄影,所以喜欢看看色影无忌论坛的获奖摄影作品,所以写了个小script用来抓取上面的获奖图片,亲自测试可以使用。# -*- coding: UTF-8 -*-#作者Rocky Chen
import re, urllib, sys, os, time, urllib2, cookielib, string
class Download:
def __init__(self...
分类:
编程语言 时间:
2014-12-15 15:33:32
阅读次数:
207
When you get this error from msdeploy:“Error: The remote server returned an error: (401) Unauthorized.”you need to give the remote user elevated right...
分类:
其他好文 时间:
2014-12-11 17:10:22
阅读次数:
231
1.http编程知识http中client 和server的工作模式 client和server建立可靠的tcp链接(在HTTP1.1中这个链接是长时间的,超时断开策略) client通过socket与server通信,发送request并接受response http协议是无状态的,是指每一...
分类:
编程语言 时间:
2014-12-11 11:56:24
阅读次数:
200
下面是一个 Python 爬虫最简单的例子,使用网络库urllib2 和正则表达式库re,模拟浏览器的 User-Agent。#!/usr/bin/env python# -*- coding: utf-8 -*-#引入基础网络库import urllib2#引入正则表达式模块import re#模...
分类:
编程语言 时间:
2014-12-10 19:46:40
阅读次数:
248