Skip to content

Instantly share code, notes, and snippets.

@jansila
Created April 6, 2020 18:17
Show Gist options
  • Select an option

  • Save jansila/4b96776ccf2b5e31cd086a848bfbe133 to your computer and use it in GitHub Desktop.

Select an option

Save jansila/4b96776ccf2b5e31cd086a848bfbe133 to your computer and use it in GitHub Desktop.
use html pretifier to understand the structure - https://htmlformatter.com/
to get:
<td class="action"><span>25</span>
<div class="bubble" id="cal25">
<p><a href="https://ies.fsv.cuni.cz/cs/news/4641">Scheduled shutdown of servers</a></p>
</div>
</td>
<td class="action"><span>26</span>
<div class="bubble" id="cal26">
<p><a href="https://ies.fsv.cuni.cz/cs/news/4641">Scheduled shutdown of servers</a></p>
</div>
</td>
then look for "a" tag with content
bf = getSoup('https://ies.fsv.cuni.cz/content/tree/index/lang/en')
int(bf.find('a',text='Scheduled shutdown of servers').parent.parent.parent.find('span').text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment