给定值为bs4.BeautifulSoup("<tr><td>Hello!</td><td>World!</td></tr>")的对象soup,如何从所有tr标记中删除感叹号?我得到的最接近的是: for tr in soup.find_all("tr"):
tr.string = tr.decode_contents().replace(
我正在试着做一个小程序,它得到一个随机的网站,并计算元素。下面是我的错误: File "elements counter.py", line 23, in <module>TypeError: 'int' object is unsubscriptablefrom urllib2 import Request,= char
print sort