Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _get_confirmations(self) -> List[Confirmation]:
confirmations = []
confirmations_page = self._fetch_confirmations_page()
soup = BeautifulSoup(confirmations_page.text, 'html.parser')
if soup.select('#mobileconf_empty'):
return confirmations
for confirmation_div in soup.select('#mobileconf_list .mobileconf_list_entry'):
_id = confirmation_div['id']
data_confid = confirmation_div['data-confid']
data_key = confirmation_div['data-key']
confirmations.append(Confirmation(_id, data_confid, data_key))
return confirmations