HTTP GET baidu.com
HTTP GET baidu.com
# _*_coding:utf-8_*_
import httplib2
def getHttp(word,pn):
urlstr='http://www.baidu.com/s?wd='+word+'&rn=100&'+pn
hlib=httplib2.Http('.cache')
response,content=hlib.request(urlstr)
print("\n服务器响应:\n")
for r in response.items():
print r
print("\n输出内容:\n")
print(content.decode("utf-8"))
getHttp('inurl:.asp?id=','1')
相关内容
- 暂无相关文章
评论关闭