大写时没有找到美丽的汤HREF

时间:2012-09-25 21:53:26

标签: python beautifulsoup href

您好我有以下几点:

from BeautifulSoup import BeautifulSoup as bs  
import urllib2

url = 'http://www.blah.com'  
soup = bs(urllib2.urlopen(url))

for link in soup.findAll('a', href=True):
   print link

所以问题是网站使用href和HREF(大写)来表示链接。此脚本仅拉取href。我如何修改代码也获得与HREF的链接?

由于

0 个答案:

没有答案
相关问题