Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def extract_by_htag(self, element):
title_list = element.xpath(TITLE_HTAG_XPATH)
if not title_list:
return ''
return title_list[0]