I'm trying to extract multiple genre from below site. (I already know the URLs) https://www.discogs.com/master/1515454-Zedd-Katy-Perry-365
<div class="profile">
<h1 id="profile_title" class="hide_mobile has_action)menu">...<h1>
<div class="head">Genre:<div> ==$0
<div class="content">
<a href="/genre/electronic">Electronic</a>
", "
<a href="/genre/pop">Pop</a>
And here's my Python code
genre = None
try:
genre = driver.find_element_by_xpath("[contains(concat(' ', @class, ' '), ' profile ')]//*[contains(@href, ' /genre/* '").text
How do I extract genres to text? (e.g. Electronic, Pop)