I have the source code of a website which contains several lists. Now I would like to extract information of these lists into a usable format in python.
For example, see the the first list entry of a list of countries below:
<ul class='checklist__list'>
<li class=' checklist__item' id='checklist__item--country-111'>
<label class='checklist__label ripple-animation'>
<input class="checklist__input js-checklist__input idb-on-change" type="checkbox" id="111" name="country" value="111">
Germany
</input>
</label>
</li>
Say, I am now interested in the country id (here: 111) and the matching country name (here: Germany) and would like to have that in a usable format in python, for example a pandas dataframe or dictionary.
Does anyone know an easy way to do that? The original list contains >100 countries.
Thank you very much for suggestions!