https://www.crummy.com/software/BeautifulSoup/bs4/doc/
2016-05-18
您好,我用的py3以上版本,按教程做完。最后爬取的百度python词条output.xml都是0xad,…这样显示的,不清楚哪里不对?能否给个指导,谢谢
2016-05-17
values = {'a':'1'}
data = urllib.urlencode(values)#urllib函数
request.add_data(data)
data = urllib.urlencode(values)#urllib函数
request.add_data(data)
2016-05-15
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import cookielib
url = 'http://www.baidu.com'
print '第一种方法'
response1 = urllib2.urlopen(url)
print response1.getcode()
print len(response1.read())
# -*- coding: utf-8 -*-
import urllib2
import cookielib
url = 'http://www.baidu.com'
print '第一种方法'
response1 = urllib2.urlopen(url)
print response1.getcode()
print len(response1.read())
2016-05-09