ed08724 6 Posted July 18, 2016 Report Share Posted July 18, 2016 given the following html which occurs multiple times per page how can I get the url into a list. <div class="refReferrals"> <a class="replaceClass" href="http://mysite.comt/ajax/referrals/get_list/18287"id="ref-18287" data-id="18287" data-div="downline-18287"> Referrals: 5 </a> </div> I can get the number of referrals with:add list to list(%referrals,$scrape attribute(<div,class="refReferrals">,"innertext"),"Don't Delete","Global") Thanks Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted July 18, 2016 Report Share Posted July 18, 2016 add list to list(%referrals,$scrape attribute(<div,class="refReferrals">,"href"),"Don't Delete","Global") add list to list(%referrals,$scrape attribute(<div,class="refReferrals">,"fullhref"),"Don't Delete","Global") change the drop down option of the item you want to scrape Quote Link to post Share on other sites
deliter 203 Posted July 18, 2016 Report Share Posted July 18, 2016 add list to list(%referrals,$scrape attribute(<div,class="replaceClass">,"href"),"Don't Delete","Global") Quote Link to post Share on other sites
ed08724 6 Posted July 18, 2016 Author Report Share Posted July 18, 2016 I had tried href and that didn't work.I just tried fullhref and that returns the url of the webpage not the url in the div.I had tried all the attributes on the advanced element editor but none returned the correct data.I will try all the ones in the drop down menu as it seems to have more than the advanced element editor. Thanks. Quote Link to post Share on other sites
deliter 203 Posted July 18, 2016 Report Share Posted July 18, 2016 Did you not read my post? Quote Link to post Share on other sites
ed08724 6 Posted July 18, 2016 Author Report Share Posted July 18, 2016 (edited) sorry deliter. I missed your comment.I got this to work which is similar to what you said only with <a vs <divadd list to list(%url,$scrape attribute(<a,class="replaceClass">,"href"),"Don\'t Delete","Global") Thanks guys. P.S. I tried what deliter suggested and that worked also. Edited July 18, 2016 by ed08724 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.