下記wikiのインフォボックスから位置情報を取得したいと思っています。
これが私が試したことです:
r = requests.get('https://en.wikipedia.org/wiki/Alabama_Department_of_Youth_Services_Schools', proxies = proxies)
html_source = r.text
soup = BeautifulSoup(html_source)
school_d['name'] = soup.find('h1', 'firstHeading').get_text()
print soup.find('th', text=re.compile("location")).find_next_sibling()
出力:None
兄弟ではないため、要素にアクセスできないと思います<td>
か??
何かアドバイス?