0
I want to extract the text from the section below:
<div class="matchDate renderMatchDateContainer" data-kickoff="1583784000000">Mon 9 Mar 2020</div>
the text would be "Mon 9 Mar 2020". But when I do:
date = match_bar[0].find_next('div', {'class': 'matchDate renderMatchDateContainer'})
I have as return the following, without the text itself:
<div class="matchDate renderMatchDateContainer" data-kickoff="1583784000000"></div>
When I add.text the return is empty. I don’t have much experience with HTML.
UPDATE:
I realized that when I execute the code:
my_url = 'https://www.premierleague.com/match/{}'.format(i)
client = urlopen(my_url)
page_html = client.read()
The passage in question already appears like this, without the text:
<div class="matchDate renderMatchDateContainer" data-kickoff="1583784000000"></div>
While in the browser I can see the text:
Could anyone help? Thank you.
Hello Jefferon, beauty? Here the result of this same input was blank. In the following section I find the same problem: "<Strong class="renderKOContainer" data-kickoff="1583584200000">09:30</Strong>". The text '09:30' does not appear. In Techos like the following, it usually works: "<div class="Attendance Hide-m">Att: 53,323</div>"
– Otávio Simões Silveira
I updated the post with new information.
– Otávio Simões Silveira