BeautifulSoup to scrape street address

前端 未结 1 451
北荒
北荒 2021-01-29 09:40

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 <

1条回答
  •  自闭症患者
    2021-01-29 09:59

    You can check next

    element with a class attribute with value tinyLink and that contains either a and a
    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)
    

    0 讨论(0)
提交回复
热议问题