from bs4 import BeautifulSoup
html = '''
<div class="soundTitle sc-clearfix sc-hyphenate sc-type-h2 sc-text-h4 streamContext m-interactive"><div class="soundTitle__titleContainer">
<div class="soundTitle__playButton">
<a role="button" href="" class="snippetUXPlayButton sc-button-play playButton sc-button sc-button-xlarge" tabindex="0" title="Play" draggable="true">Play</a>
</div>
<div class="soundTitle__usernameTitleContainer">
<div class="sc-type-light sc-text-secondary sc-text-h4 soundTitle__secondary">
<a href="/gracedaviesofficial" class="soundTitle__username sc-link-secondary
sc-link-light">
<span class="soundTitle__usernameText">
Grace Davies
</span>
</a>
</div>
<a class="sc-link-primary soundTitle__title sc-link-dark sc-text-h4" href="/gracedaviesofficial/hello-adele">
<span class="">Hello - Adele</span>
</a>
</div>
<div class="soundTitle__additionalContainer sc-ml-1.5x">
<div class="soundTitle__uploadTime sc-mb-0.5x">
<time class="relativeTime" title="Posted on 26 October 2015" datetime="2015-10-26T14:51:09.000Z"><span class="sc-visuallyhidden">Posted 6 years ago</span><span aria-hidden="true">6 years ago</span></time>
</div>
<div class="soundTitle__tagContainer">
<span class="sc-snippet-badge sc-selection-disabled sc-snippet-badge-medium sc-snippet-badge-grey sc-hidden"></span>
<span class="sc-snippet-badge sc-selection-disabled sc-snippet-badge-small sc-snippet-badge-grey sc-hidden"></span>
<a class="sc-tag soundTitle__tag sc-tag-small" href="/tags/hello"><span class="sc-truncate sc-tagContent">hello</span></a>
</div>
</div>
</div>
</div>
'''
soup = BeautifulSoup(html, 'html.parser')
a_tags = soup.find_all('a', {'class': 'soundTitle__title'})
for a_tag in a_tags:
print(a_tag['href'], a_tag.find('span').text)
$domainsosi = $onsameip['name'];
$domainsosi[] = $onsameip['name'];
<!-- Need more Alexa data? Find our APIs here: https://aws.amazon.com/alexa/ -->
<ALEXA VER="0.9" URL="lol.com/" HOME="0" AID="=" IDN="lol.com/">
<RLS PREFIX="http://" more="0">
<RL HREF="www.wtf.com/" TITLE="WTF?!"/>
<RL HREF="www.nick.com/" TITLE="Nickelodeon Online"/>
<RL HREF="www.naver.com/" TITLE="네이버"/>
<RL HREF="www.miniclip.com/" TITLE="Miniclip"/>
<RL HREF="www.funnyjunk.com/" TITLE="Funny Junk"/>
<RL HREF="www.1001spill.no/" TITLE="1001 Spill"/>
<RL HREF="rofl.com/" TITLE="ROFL.com Staff Flash"/>
<RL HREF="omg.com/" TITLE="Object Management Group"/>
<RL HREF="lolcom.wordpress.com/" TITLE="LOL.com Development"/>
<RL HREF="chatango.com/" TITLE="Chatango - Add Free Live Chat to any Webpage"/>
</RLS>
<SD TITLE="A" FLAGS="" HOST="lol.com">
<OWNER NAME="ZWave, Llc"/>
</SD>
<SD>
<POPULARITY URL="lol.com/" TEXT="755256" SOURCE="panel"/>
<REACH RANK="662033"/>
<RANK DELTA="+133191"/>
</SD>
</ALEXA>
import xml.etree.ElementTree as et
import requests
url = 'http://data.alexa.com/data?cli=20&dat=snbamz&url=lol.com'
root = et.fromstring(requests.get(url).content)
result = [item.attrib.get('HREF') for item in root.findall('.//RL')]
['www.wtf.com/', 'www.nick.com/', 'www.naver.com/', 'www.miniclip.com/', 'www.funnyjunk.com/', 'www.1001spill.no/', 'rofl.com/', 'omg.com/', 'lolcom.wordpress.com/', 'chatango.com/']