javascript - Getting HREF of an html node -
i have page @ http://www.entrepreneuronfire.com/podcast/edwinhavens/
with image @ http://i.imgur.com/u59iaxb.png
i need download link (i.e. hxxp://traffic.libsyn.com/entrepreneuronfire/edwin_havens.mp3) of mp3 file @ class named spp-dloada
(as web inspector detects) 48 hours attempt ended in smoke.
that download link shows in chrome (as
<a href="http://traffic.libsyn.com/entrepreneuronfire/edwin_havens.mp3" download="edwin_havens.mp3"> <span class="spp-dloada"></span> </a>
) but not in firefox 38 , ie11 need them in these 2 browser.
for firefox , ie11 html snippet
<div class="spp-controls"> <span class="spp-speed"/> <span class="spp-share"> <div class="spp-share-options" style="display: none;"> <a class="spp-share-icon spp-twitter-btn" href="">share</a> <a class="spp-share-icon spp-fb-btn" href="">share</a> <a class="spp-share-icon spp-gplus-btn" href="">share</a> <!--<a href="" class="spp-share-icon spp-email-btn">share</a>--> </div> </span> <span class="spp-dload"/> <span class="spp-play"/>
oddest thing when click on download button (as shown in above image) iframe changes
<iframe class="spp-downloader" style="display:none" src="http://www.entrepreneuronfire.com?spp_download=http://traffic.libsyn.com/entrepreneuronfire/edwin_havens.mp3"/>
what have tried far are-
software:firebug, temper data,modifyheaders
language:xpath, ccs selector, jquery
edit ---- sorry belated adjunct
i need pure xpath expression since different browser behaves differently
n.b. html snippet chrome only
the span inside of link has class, can grab parents 'href' attribute using jquery so:
$('.spp-dloada').parent().attr('href');
(this of course assuming have access modify code on website.)
re: edit
it doesn't ie supports xpath, according answers here: jquery select element xpath
Comments
Post a Comment