I want to extract data from this site: https://www.vanguardinvestor.co.uk/investments/vanguard-s-and-p-500-ucits-etf-usd-distributing/distributions
However, I do not get any results. I found that every row starts with something like this:
<tr ng-if="portSpecific.data.distributionHistory.domicile !== 'GB'" data-ng-repeat="fundDistribution in distributionHistoryList | limitTo:10 " data-ng-include="'${app-content-context}partials/includes/detail/distribution-rows.html' | configReplace | vuiCacheBuster" class="" style=""> <td class="vuiFixedCol fundDistributionType">Income Distribution</td>
<td class="alignRgt mostRecent"><span data-ng-bind-html="fundDistribution.mostRecent.currencySymbol">$</span>0.250768
</td>
<!----><td class="exDividendDate" data-ng-if="fund.data.assetClass !== 'Money Market'">24 Sep 2020</td><!---->
<td class="recordDate">25 Sep 2020</td>
<td class="payableDate">07 Oct 2020</td></tr>
When I want to search for a <tr>
element I do not find any results, where am I missing something?
import requests
from bs4 import BeautifulSoup
url = 'https://www.vanguardinvestor.co.uk/investments/vanguard-s-and-p-500-ucits-etf-usd-distributing/distributions'
data = requests.get(url)
soup = BeautifulSoup(data.text, 'html.parser')
data = []
for tr in soup.find_all('tr'):
values = [td.text for td in tr.find_all('td')]
print(values)
print(data)