I am using the code at the far bottom to get weblink, and the Masjid name. however I would like to also get denomination and <
You can check next <div>
element with a class
attribute with value tinyLink
and that contains either a <b>
and a <br>
tags and extract their strings:
...
print pos
div = result.find_next_sibling('div', attrs={"class": "tinyLink"})
if div and div.b and div.br:
print(div.b.next_sibling.string)
print(div.br.next_sibling.string)