2016-08-10 37 views
0

我正在嘗試使用BeautifulSoup在網站上獲取帶有特殊編號的數字。這是我的代碼Web Scraping屬性錯誤

from urllib2 import urlopen 
from bs4 import BeautifulSoup 
import requests, logging 
logging.basicConfig() 
html = urlopen("http://example.com") 
bsObj = BeautifulSoup(str(html), "html.parser") 
select = bsObj.findAll(id="myid") 
print(select.get_text()) 

但我得到'AttributeError:'ResultSet'對象沒有'get_text'屬性。 問題在哪裏?

回答