Here is the web CSS from which I want to extract the Location information.
<div class="location">
<div class="listing-location">Location</div>
<div class="location-areas">
<span class="location">Al Bayan</span>
,
<span class="location">Nepal</span>
</div>
<div class="area-description"> 3.3 km from Mall of the Emirates </div>
</div>
Python Beautuifulsoup4 Code I used is:
try:
title= soup.find('span',{'id':'listing-title-wrap'})
title_result= str(title.get_text().strip())
print "Title: ",title_result
except StandardError as e:
title_result="Error was {0}".format(e)
print title_result
Output:
"Al Bayanأ¢â‚¬آھ,أ¢â‚¬آھ
Nepal"
How can I convert the format into the following
['Al Bayan', 'Nepal']
What should be the line second of the code to get this output