import urllib.request
import urllib.parse
req = urllib.request.Request("")
postdata=urllib.parse.urlencode([("a":"b"),...])
req.add_header("c":"d")
resp = urllib.request.urlopen(req,data=postdata.encode('utf-8'))
print(resp.read().decode("utf-8"))
#展示网页
import urllib.parse
req = urllib.request.Request("")
postdata=urllib.parse.urlencode([("a":"b"),...])
req.add_header("c":"d")
resp = urllib.request.urlopen(req,data=postdata.encode('utf-8'))
print(resp.read().decode("utf-8"))
#展示网页
2017-06-06
#python3.4要import request
import urllib.request
resp = urllib.request.urlopen("http://www.baidu.com")
print(resp.read().decode("utf-8"))
import urllib.request
resp = urllib.request.urlopen("http://www.baidu.com")
print(resp.read().decode("utf-8"))
2017-06-06
正确打开方式: 在tools目录下打开命令行python pdf2txt.py ../samples/simple1.pdf
2017-05-25
最新回答 / 卢亮
https://stackoverflow.com/questions/25865104/field-id-doesnt-have-a-default-value
2017-05-24
同时安装了Python2.7跟Python3.X的同学,如果pip3 install beautifulsoup4不好使的话,可以使用:py -3 - m install beautifulsoup4
2017-05-19
为了学Python操作mysql数据库这节课,把电脑上安装的Python3.5卸了安装了Python2.7,然后来到了这个课程。。。。
2017-05-18