I have this code
<a title="Next Page - Results 1 to 60 " href="bla bla" class="smallfont" rel="next">></a>
I want to grab the a element and get the href .
how can I match the title attribute with Next Page
I want to partially match the text in title attribute of the a element.
There are many a tags on the page similar to it but only difference is that the title attribute contains "Next Page or the text is >.
You would have to use Regex for accomplishing what you want.
First take the entire markup as a string and make a
BeautifulSoupobject with it.Then use the
.findAllmethod of theBeautifulSoupobject as follows