Extracting based on tags names and ignoring derived tags.

12 views
Skip to first unread message

James W

unread,
Nov 26, 2012, 2:09:40 PM11/26/12
to beauti...@googlegroups.com
Hi All,

I am using BS4 on python 2.7, and I try to do the following:

info=soup.find_all('a','mycooltitle')

however, although info contains "mycooltitle", it also seems to find extended tags such as:

<a class="mycooltitle funfor" href="http://www.thehref"</a>

..how can I enforce BS4 not to extract these "extended" class tags? All I want is to extract the one which have:

<a class="mycooltitle" href="http://www.thehref"</a>

..Thanks..
JW
Reply all
Reply to author
Forward
0 new messages