import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d';
pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib...
分类:
其他好文 时间:
2015-04-17 18:13:28
阅读次数:
114
sublime text 3安装package control1 import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = '...
分类:
其他好文 时间:
2015-04-14 09:49:44
阅读次数:
95
requests是python的一个HTTP客户端库,跟urllib,urllib2类似,那为什么要用requests而不用urllib2呢?官方文档中是这样说明的: python的标准库urllib2提供了大部分需要的HTTP功能,但是API太逆天了,一个简单的功能就需要一大堆代码1. 安装:方....
分类:
编程语言 时间:
2015-04-13 12:39:40
阅读次数:
166
1 import urllib 2 import urllib2 3 import requests 4 import re 5 6 student = 八位学号 7 password = 密码 8 postdata = urllib.urlencode({ 9 'u':student,...
分类:
其他好文 时间:
2015-04-11 19:17:32
阅读次数:
285
python 爬虫爬取美女图片
#coding=utf-8
import urllib
import re
import os
import time
import threading
def getHtml(url):
page = urllib.urlopen(url)
html = page.read()
return html
def getImg...
分类:
编程语言 时间:
2015-04-11 09:02:27
阅读次数:
226
http模块是一个底层基础模块,实现的功能比较少,正常情况下比较少用到.推荐用urllib, urllib2, httplib2.
?HTTPConnection 对象class httplib.HTTPConnection(host[, port[, strict[, timeout[, source_address]]]])
创建HTTPConnection对象HTTPConnection....
分类:
编程语言 时间:
2015-04-10 22:35:01
阅读次数:
203
#coding: utf-8#title..href...import urllib.requestimport timeurl=['']*230page=15564j=0while j<230: url[j]='http://www.chinacampus.org/show.php?cont...
分类:
其他好文 时间:
2015-04-08 01:07:04
阅读次数:
129
[op@TIM getpage]$ cat job.py #coding: utf-8#title..href...import urllib.requestimport timeurl=['']*30page=83909j=0while j<30: url[j]='http://job.csdn....
分类:
其他好文 时间:
2015-04-07 19:15:02
阅读次数:
93
1 #!usr/bin/env python 2 #-*- coding:utf-8 -*- 3 import urllib 4 import re 5 6 def getHtml(url): 7 page = urllib.urlopen(url) 8 html = page....
分类:
Web程序 时间:
2015-04-07 13:25:57
阅读次数:
145
Enter ctrl+` shortcut
or the View > Show Console
Sublime Text 3
import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282'
+ 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package...
分类:
其他好文 时间:
2015-04-05 09:11:05
阅读次数:
158